moleculekit.tools.moleculechecks module#
- moleculekit.tools.moleculechecks.areLigandsDocked(prot_file, sdf_file, threshold=10, max_check=None)#
Check whether all ligands in an SDF file are docked to a protein.
Each ligand in
sdf_fileis tested against the protein withisLigandDocked().- Parameters:
prot_file (
str) – Path to the protein structure file.sdf_file (
str) – Path to the SDF file containing one or more ligands.threshold (
float) – Maximum allowed closest protein-ligand distance, in Angstrom, for a ligand to count as docked.max_check (
int|None) – If given, only the firstmax_checkligands are checked.
- Returns:
- moleculekit.tools.moleculechecks.areLigandsOptimized(sdf_file, max_check=None)#
Check whether all ligands in an SDF file have optimized 3D geometries.
Each ligand in
sdf_fileis tested withisLigandOptimized().- Parameters:
- Returns:
- moleculekit.tools.moleculechecks.closestDistance(mol1, mol2)#
Compute the minimum distance between the atoms of two molecules.
The two molecules are temporarily combined and the smallest pairwise distance between any atom of
mol1and any atom ofmol2is returned.
- moleculekit.tools.moleculechecks.isLigandDocked(prot, lig, threshold=10)#
Check whether a ligand is docked close to a protein.
- Parameters:
- Returns:
docked – True if the closest protein-ligand distance is below
threshold, False otherwise.- Return type:
- moleculekit.tools.moleculechecks.isLigandOptimized(mol, atol=1e-06)#
Check whether a ligand has a 3D-optimized (non-flat) geometry.
All dihedral angles being either 0 or +/-pi means the ligand is planar, which indicates that it has not been optimized into a 3D conformation. Ligands with three or fewer atoms cannot be planar and are always considered optimized.
- Parameters:
- Returns:
optimized – True if at least one dihedral angle deviates from a planar value (or the ligand has three or fewer atoms), False if the ligand is flat.
- Return type:
- moleculekit.tools.moleculechecks.isProteinProtonated(mol)#
Heuristically check whether a protein carries its hydrogen atoms.
Counts the protein hydrogens versus protein heavy atoms and decides that the protein is protonated only if there is a significant number of hydrogens relative to the heavy atoms.
- moleculekit.tools.moleculechecks.proteinHasBonds(mol)#
Check whether the protein atoms of a molecule are bonded together.
Counts the bonds whose both atoms are protein atoms and compares against the number of protein atoms. A fully connected protein chain of
natoms has at leastn - 1bonds.