Hi there,

Attached is a crystal_ligand.mol2 for the ACE target from DUDE. I'd like to
generate a number of conformers for this ligand. The trick is it has 2
amide bonds that I'd like to keep planar. As far as I can see neither MMFF
nor UFF will keep those planar by default, at least not for this input
file.

One way around it, is to find all the amide bonds by smarts matching. From
that, find the hydrogen connected to N and add a DihedralConstraint on the
4 atoms before running the minimization.

That's what conformers.py is attempting to do (basing on one of the test
scripts). However, I still get non-planar amide bonds and I'm really
confused as to why. I can filter them out manually with GetDihedralDeg().

Thanks for all the help (I'm using up all the rdkit credits this weekend ;)
)

- Jan

Attachment: crystal_ligand.mol2
Description: application/not-regular-file

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.rdMolTransforms import GetDihedralDeg
mol = Chem.MolFromMol2File("Downloads/crystal_ligand.mol2", removeHs=False)
patt = Chem.MolFromSmarts("[OX1]=CN")
amides = mol.GetSubstructMatches(patt)

constraints = []
for amide in amides:
    print amide

    amide = [mol.GetAtomWithIdx(idx) for idx in amide]
    for a in amide: print a.GetSymbol()
    carbon = [a for a in amide if  a.GetSymbol() == "C"][0]
    oxygen = [a for a in amide if  a.GetSymbol() == "O"][0]
    nitrogen = [a for a in amide if  a.GetSymbol() == "N"][0]
    # there may be a better way of finding the N-H hydrogen
    hydrogens = [ b.GetBeginAtom()  for b in nitrogen.GetBonds() if b.GetBeginAtom().GetSymbol() == "H"] + [ b.GetEndAtom()  for b in nitrogen.GetBonds() if b.GetEndAtom().GetSymbol() == "H"]
    assert(len(hydrogens)==1)
    hydrogen = hydrogens[0]    
    constraints.append((hydrogen.GetIdx(), nitrogen.GetIdx(), carbon.GetIdx(), oxygen.GetIdx()))

confIds = AllChem.EmbedMultipleConfs(mol, 200)
prop = AllChem.MMFFGetMoleculeProperties(mol)
for confId in confIds:
    ff = AllChem.MMFFGetMoleculeForceField(mol, prop, confId=confId)
    for c in constraints:
        ff.MMFFAddTorsionConstraint(c[0], c[1], c[2], c[3], False, -170, 170, 1.0e5)

    print ff.Minimize(maxIts=2000)
    Chem.MolToPDBFile(mol, "conformer_{}.pdb".format(confId), confId)
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to