peleffy.forcefield.OpenFFOPLS2005ForceField¶
-
class
peleffy.forcefield.
OpenFFOPLS2005ForceField
(forcefield_name)[source]¶ It defines an hybrid force field from the combination of OpenFF and OPLS2005.
-
__init__
(forcefield_name)[source]¶ It initializes the OpenFFOPLS2005ForceField class.
- Parameters
openff_name (str) – The name of the OpenFF forcefield to employ
Examples
Load a molecule and generate its parameters with an hybrid OpenFF-OPLS2005 force field
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenFFOPLS2005ForceField
>>> hybridff = OpenFFOPLS2005ForceField('openff_unconstrained-1.2.1.offxml') >>> parameters = hybridff.parameterize(molecule)
We can customized it by selecting which force field employ for each parameter type. For example, below we are parameterizing all force field elements with OPLS2005 except for the dihedrals
>>> from peleffy.topology import Molecule
>>> molecule = Molecule('molecule.pdb')
>>> from peleffy.forcefield import OpenFFOPLS2005ForceField
>>> hybridff = OpenFFOPLS2005ForceField('openff_unconstrained-1.2.1.offxml')
>>> hybridff.set_nonbonding_parameters('OPLS2005') >>> hybridff.set_bond_parameters('OPLS2005') >>> hybridff.set_angle_parameters('OPLS2005') >>> hybridff.set_dihedral_parameters('OpenFF')
>>> parameters = hybridff.parameterize(molecule)
-
parameterize
(molecule, charge_method=None)¶ It parameterizes the supplied molecule.
- Parameters
molecule (a peleffy.topology.Molecule) – The peleffy’s Molecule object to parameterize
charge_method (str) – The name of the charge method to employ
- Returns
parameters – The parameter wrapper containing the parameters generated with the current force field
- Return type
a peleffy.forcefield.parameters.BaseParameterWrapper object
-
set_angle_parameters
(selection)[source]¶ It sets which force field to use to assign parameters to angles.
- Parameters
selection (str) – The force field to employ. One of (‘OpenFF’, ‘OPLS2005’)
-
set_bond_parameters
(selection)[source]¶ It sets which force field to use to assign parameters to bonds.
- Parameters
selection (str) – The force field to employ. One of (‘OpenFF’, ‘OPLS2005’)
-
set_dihedral_parameters
(selection)[source]¶ It sets which force field to use to assign parameters to dihedrals.
- Parameters
selection (str) – The force field to employ. One of (‘OpenFF’, ‘OPLS2005’)
-
set_nonbonding_parameters
(selection)[source]¶ It sets which force field to use to assign nonbonding parameters. Nonbonding parameters are: ‘atom_types’, ‘sigmas’, ‘epsilons’, ‘SGB_radii’, ‘vdW_radii’, ‘gammas’, ‘alphas’, ‘GBSA_radii’ and ‘GBSA_scales’.
- Parameters
selection (str) – The force field to employ. One of (‘OpenFF’, ‘OPLS2005’)
Attributes
name
It returns the name of the force field.
parameters
It returns the parameters obtained with the force field.
type
It returns the type of the force field.
-