schrodinger.application.transforms.ligprep module¶
- class schrodinger.application.transforms.ligprep.LigPrep(arg_string: str = '', filter_string: str = '')¶
Bases:
PTransformA PTransform that ligpreps molecules.
- Example usage::
>>> from rdkit import Chem >>> benzene = Chem.MolFromSmiles('c1ccccc1') >>> with beam.Pipeline() as p: ... ligprepped_benzene = (p ... | beam.Create([benzene]) ... | LigPrep() ... | beam.Map(adapter.to_smiles) ... | beam.LogElements()) c1ccccc1
- Parameters:
arg_string – command line arguments to pass to ligprep, e.g. ‘-nt’, or ‘-nt -bff 16 -epik -s 32’.
filter_string – a filter string to pass to ligprep.
Note: the filter_string is a single string, so if multiple filters are needed they need to be separated by “n”.
- __init__(arg_string: str = '', filter_string: str = '')¶
- classmethod validate(arg_string: str = '', ligprep_filter_path: pathlib.Path | str = '') None¶
- Parameters:
arg_string – command line arguments to pass to ligprep,
ligprep_filter_path – filename or path to the ligprep filter file.
- Raises:
ValueError – if any of the arguments are invalid.
Note: the contents of the ligprep filter file is not validated, only its existence is checked.
- classmethod FromFile(path: Union[str, Path], *, arg_string: str)¶
- Parameters:
path – the path to the ligprep filter file.
arg_string – the command line arguments to pass to ligprep excluding the input and output arguments.
- class schrodinger.application.transforms.ligprep.LigPrepDoFn(arg_string: str)¶
Bases:
_GetLicenseHintsMixin,LigPrepDoFn
- schrodinger.application.transforms.ligprep.validate_opls_license(arg_string: str) None¶
Check if the FFLD_OPLS_MAIN license is available if a opls version > 14 is specified in the command line arguments.
- Parameters:
arg_string – command line arguments to pass to ligprep,
- schrodinger.application.transforms.ligprep.remove_bff(arg_string: str) str¶
Remove the -bff argument from the command line arguments.
- Parameters:
arg_string – command line arguments to pass to ligprep,
- Returns:
the command line arguments without the -bff argument.
- schrodinger.application.transforms.ligprep.validate_arg_string(arg_string: str)¶