Hello, Is there any simpler (=faster) way of calculating the shortest distance between non-bonded atoms in a molecule?
from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import rdMolTransforms import numpy mol=Chem.MolFromSmiles("Cc2ccsc2c1sccc1C") mol=Chem.AddHs(mol) AllChem.EmbedMolecule(mol) AllChem.MMFFOptimizeMolecule(mol) dm=numpy.multiply(Chem.Get3DDistanceMatrix(mol),numpy.logical_not(Chem.GetAdjacencyMatrix(mol))) print("minimum non-bonded atom-atom distance: {}".format(numpy.min(dm[numpy.nonzero(dm)]))) Best wishes, Michal ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss