Molecular Geometry
- get_center(mol)[source]
Get the geometric center of an RDKit molecule
- Parameters:
mol – RDKit molecule
- Return type:
ndarray- Returns:
center as a numpy array
- get_shape_moments(mol)[source]
Calculate principal moments of inertia as defined in https://pubs.acs.org/doi/10.1021/ci025599w
- Parameters:
mol – RDKit molecule
- Return type:
- Returns:
first 2 moments as a tuple
- gen_3d(mol)[source]
Generate a 3D structure for a RDKit molecule
- Parameters:
mol (
Mol) – input molecule- Return type:
Optional[Mol]- Returns:
molecule with 3D coordinates
- refine_conformers(mol, energy_threshold=50, rms_threshold=0.5)[source]
Refine the conformers of a molecule by removing those with high energy or low RMSD.
- Parameters:
- Return type:
Mol- Returns:
RDKit molecule with refined conformers.
- mcs_rmsd(mol_1, mol_2, id_1=0, id_2=0)[source]
Calculate the RMSD (Root Mean Square Deviation) between the MCS (Maximum Common Substructure) of two molecules.
- mol_to_3D_view(mol_list, size=(300, 300), style='stick', surface=False, opacity=0.5)[source]
Draw a list of molecules in 3D
- Mol_list:
list[rdMol], a list of rdMols to show
- Size:
tuple(int, int), canvas size
- Style:
str, type of drawing molecule, style can be ‘line’, ‘stick’, ‘sphere’, ‘carton’
- Surface:
bool, display SAS
- Opacity:
float, opacity of surface, range 0.0-1.0
- Return type:
view- Returns:
viewer: py3Dmol.view, a class for constructing embedded 3Dmol.js views in ipython notebooks.