schrodinger.forcefield.minimizer module¶
- class schrodinger.forcefield.minimizer.Restraint(force_constant, target_value, atom_index1, atom_index2, atom_index3, atom_index4, flat_bottom_half_width)[source]¶
Bases:
object
Class representing restraints.
- class schrodinger.forcefield.minimizer.Constraint(atom_index1, atom_index2, type_index1, type_index2, use_rigorous=False)[source]¶
Bases:
object
Class representing constraints.
- class schrodinger.forcefield.minimizer.MinimizationOptions(opls_version: int = 16, nonbond_cutoff: float = 14.0, max_step: int = 1500, energy_convergence: float = 5e-09, gradient_convergence: float = 0.05, line_search_method: int = 1, min_method: int = 0, no_restrain_zob: bool = False, bend_conj_amines: bool = False, perturb: bool = False, restraints: Optional[List[schrodinger.forcefield.minimizer.Restraint]] = None, constraints: Optional[List[schrodinger.forcefield.minimizer.Constraint]] = None, debug_outfile: Optional[str] = None)[source]¶
Bases:
tuple
Class for assigning the mmffld minimization options.
- opls_version: int¶
Alias for field number 0
- nonbond_cutoff: float¶
Alias for field number 1
- max_step: int¶
Alias for field number 2
- energy_convergence: float¶
Alias for field number 3
- gradient_convergence: float¶
Alias for field number 4
- line_search_method: int¶
Alias for field number 5
- min_method: int¶
Alias for field number 6
- no_restrain_zob: bool¶
Alias for field number 7
- bend_conj_amines: bool¶
Alias for field number 8
- perturb: bool¶
Alias for field number 9
- restraints: Optional[List[schrodinger.forcefield.minimizer.Restraint]]¶
Alias for field number 10
- constraints: Optional[List[schrodinger.forcefield.minimizer.Constraint]]¶
Alias for field number 11
- debug_outfile: Optional[str]¶
Alias for field number 12
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- schrodinger.forcefield.minimizer.minimize_structure(st: schrodinger.structure._structure.Structure, options: Optional[schrodinger.forcefield.minimizer.MinimizationOptions] = None, archive_path: Optional[os.PathLike] = None)[source]¶
Minimizes a single structure. For minimizing multiple structures, the performance improves drastically if the forcefield handle instantiation happens outside the iteration loop.
- Parameters
st – structure
options – mmffld minimization options
archive_path – path to specific .opls file
- Returns
minimization results
- Return type
mm.MinimizeResults
- schrodinger.forcefield.minimizer.iterate_minimize_structure(st, iteration, options=None)[source]¶
Minimize a single structure multiple times. This function instantiates the forcefield handle before the iteration loop and hence increases the performance by eliminating instantiation repetitions.
- Parameters
st (schrodinger.structure object) – structure
iteration (int) – iteration number
options (MinimizationOptions namedtuple) – mmffld minimization options
- Returns
minimization results
- Return type
mm.MinimizeResults
- schrodinger.forcefield.minimizer.minimize_substructure(st: schrodinger.structure._structure.Structure, atoms_to_minimize: Iterable[schrodinger.structure._structure._StructureAtom]) schrodinger.structure._structure.Structure [source]¶
Given a structure, minimizes the specified atoms in it, and returns it
- Parameters
st – The structure containing the atoms to be minimized
atoms_to_minimize – The subset of atoms in the structure to be minimize
- Returns
The structure with the atoms minimized
- schrodinger.forcefield.minimizer.minimize_ligands(st: schrodinger.structure._structure.Structure, **kwargs) schrodinger.structure._structure.Structure [source]¶
Given a structure, returns that structure with all the ligands minimized
- Parameters
st – The structure containing ligands to be minimized
**kwargs – Any options to supply to
analyze.find_ligands
- Returns
The structure with the ligands minimized
- schrodinger.forcefield.minimizer.write_restraints(filename, restraints)[source]¶
Writes restraints into filename.
- Parameters
filename (string) – restraint filename
restraints (list of Restraints) – a list to be filled with restraints
- schrodinger.forcefield.minimizer.read_restraints(filename, restraints=None, constraints=None)[source]¶
Reads restraints and constraints arguments from a file and creates separate lists for Restraint and Constraint objects.
- Parameters
filename (string) – restraint/constraint filename
restraints (list of Restraints) – a list to be filled with restraints
constraints (list of Constraints) – a list to be filled with constraints