Skip to content

improved DOCKing

Latest
Compare
Choose a tag to compare
@davidegraff davidegraff released this 17 Mar 20:53
· 13 commits to main since this release

the main thrust of this release adds new support for DOCK6 receptor and DOCKing parameters. The remainder of the changes is mostly logical improvements in the codebase that will (unfortunately) break some client code. The CalculationData has been renamed to a Simulation and the CalculationRunner.prepare_and_run() methods now return the Result object rather than the full Simulation (as was done previously. This will speed up task distribution for virtual screening purposes but now loses the added information of the prepared_ligand and prepared_receptor filenames (which will be lost forever if utilizing the VirtualScreen interface.) We'll look back into adding this information back, but we don't think any users were actually taking advantage of this information.

Additionally, a full VirtualScreen used to crash when handed an invalid molecule. Theoretically, users could always prevent this via pre-filtering what molecules are passed, but now the returned score array just handles them silently and indicates nan values in their place. Note that nan could also indicate that the molecule failed during simulation itself, which means it could be attempted again and possibly succeed (about 1% of molecules randomly fail.) Now, however a nan could mean one of those two things. If this distinction is important, you can do the following:

import numpy as np
from rdkit import Chem
import pyscreener as ps

# smis: Iterable[str]
vs = ps.virtual_screen(...)
s = vs(smis)
failed_idxs = np.arange(len(s))[np.isnan(s)]
invalid_mol_idxs = set(i for i in failed_idxs if Chem.MolFromSmiles(smis[i]) is None)
failed_sim_idxs = set(failed_idxs) -inavlid_mol_idxs

happy screening!