smores.EspMolecule#
- class smores.EspMolecule(atoms, positions, dummy_index, attached_index, electrostatic_potential)[source]#
Bases:
objectCalculates
StericParametersfrom electrostatic potentials.Examples
Calculate steric parameters
>>> import smores >>> molecule = smores.EspMolecule.from_cube_file("HBr", dummy_index=0, attached_index=1) >>> molecule.get_steric_parameters() StericParameters(L=3.57164113574581, B1=1.9730970556668774, B5=2.320611610648539)
Initialize an
EspMolecule.- Parameters:
atoms (list[str]) – The elemental symbol of each atom of the molecule.
positions (list[list[float]]) – The coordinates of each atom of the molecule, provided as an N x 3 matrix.
dummy_index (int) – The index of the dummy atom.
attached_index (int) – The index of the attached atom of the substituent.
electrostatic_potential (VoxelGrid) – The electrostatic potential used for calculating the steric parameters.
Methods
Get a molecule from a
.cubefile.Get a molecule from an
rdkitmolecule.Get the index of the atom attached to the substituent.
Get the index of the dummy atom.
Get the steric parameters from the electrostatic potential.
- classmethod from_cube_file(path, dummy_index, attached_index)[source]#
Get a molecule from a
.cubefile.- Parameters:
- Returns:
The molecule.
- Return type:
- classmethod from_rdkit(molecule, dummy_index, attached_index, electrostatic_potential, conformer_id=0)[source]#
Get a molecule from an
rdkitmolecule.- Parameters:
molecule (Mol) – The
rdkitmolecule. It must have at least one conformer.dummy_index (int) – The index of the dummy atom.
attached_index (int) – The index of the attached atom of the substituent.
electrostatic_potential (VoxelGrid) – The electrostatic potential used for calculating the steric parameters.
conformer_id (int) – The id of the conformer to use.
- Returns:
The
smoresmolecule.- Return type:
- get_attached_index()[source]#
Get the index of the atom attached to the substituent.
- Returns:
The index of the atom attached to the substituent.
- Return type:
- get_dummy_index()[source]#
Get the index of the dummy atom.
- Returns:
The index of the dummy atom.
- Return type: