load_molecules
#
Helpers for loading molecules from parameterisation inputs.
Functions:
-
load_smiles_molecules–Load a single OpenFF Molecule from a SMILES string.
-
load_sdf_molecules–Load one or more unique OpenFF Molecules from an SDF file.
-
load_conformers_for_molecule–Load the conformers of
moleculefrom an SDF, aligned to its atom ordering. -
find_problematic_functional_groups–Collect molecule descriptions for each known problematic SMARTS.
load_smiles_molecules
#
Load a single OpenFF Molecule from a SMILES string.
Source code in presto/load_molecules.py
load_sdf_molecules
#
Load one or more unique OpenFF Molecules from an SDF file.
Source code in presto/load_molecules.py
load_conformers_for_molecule
#
Load the conformers of molecule from an SDF, aligned to its atom ordering.
Every record in the SDF that is graph-isomorphic to molecule is treated as a
conformer of it. Because the atom ordering in the SDF need not match molecule,
each matching record is remapped onto molecule's atom ordering before its
coordinates are extracted, guaranteeing the returned conformers are valid starting
positions for a topology built from molecule. Records that do not match are
ignored (they may belong to another molecule in a multi-molecule SDF).
Parameters:
-
molecule(Molecule) –The molecule whose conformers should be loaded. Defines the canonical atom ordering the returned conformers are aligned to.
-
sdf_path(PathLike) –Path to an SDF file containing one or more conformers of
molecule(and, optionally, of other molecules).
Returns:
list[openff.units.Quantity]
The matching conformers, each aligned to molecule's atom ordering.
Raises:
ValueError
If the path does not exist, does not end in .sdf, or contains no record
matching molecule.
Source code in presto/load_molecules.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
_molecule_description
#
Describe a molecule for user-facing error messages.
Source code in presto/load_molecules.py
find_problematic_functional_groups
#
Collect molecule descriptions for each known problematic SMARTS.