Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskrt committed May 23, 2024
1 parent 5c90742 commit 3fffd9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def filter_stubbed(

seed = Chem.MolFromSmiles(target) # type: ignore

seed_atoms = len(list(seed.GetAtoms()))
seed_atoms = len(list(seed.GetAtoms())) # type: ignore
seed_bonds = seed.GetNumBonds() # type: ignore

smis: List[str] = []
Expand All @@ -77,8 +77,8 @@ def filter_stubbed(
continue
try:
mol = Chem.MolFromSmiles(smi) # type: ignore
num_atoms = len(list(mol.GetAtoms()))
num_bonds = mol.GetNumBonds()
num_atoms = len(list(mol.GetAtoms())) # type: ignore
num_bonds = mol.GetNumBonds() # type: ignore

if num_atoms > (threshold * seed_atoms) and num_bonds > (
threshold * seed_bonds
Expand Down
4 changes: 2 additions & 2 deletions src/gt4sd/frameworks/gflownet/ml/models/mxmnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,8 @@ def rdkit_conformation(mol, n=5, addHs=False):
confs = AllChem.EmbedMultipleConfs(mol, numConfs=n, params=params)
minc, aminc = 1000, 0
for i in range(len(confs)):
mp = AllChem.MMFFGetMoleculeProperties(mol, mmffVariant="MMFF94s")
ff = AllChem.MMFFGetMoleculeForceField(mol, mp, confId=i)
mp = AllChem.MMFFGetMoleculeProperties(mol, mmffVariant="MMFF94s") # type: ignore
ff = AllChem.MMFFGetMoleculeForceField(mol, mp, confId=i) # type: ignore
if ff is None:
continue
e = ff.CalcEnergy()
Expand Down
2 changes: 1 addition & 1 deletion src/gt4sd/properties/scores/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def score(self, smiles: str) -> float:
A score for the given SMILES
"""
scoring_function = SMARTSScoringFunction(self.target_smile, self.inverse)
return scoring_function.score_mol(Chem.MolFromSmiles(smiles))
return scoring_function.score_mol(Chem.MolFromSmiles(smiles)) # type: ignore


class QEDScorer(TargetValueScorer):
Expand Down

0 comments on commit 3fffd9c

Please sign in to comment.