Hi all,

I am trying to generate structures of calixarenes in a set shape, I am trying 
to use constrain distances but struggling. The lowest energy conformer is not 
what I want as I want it in the bowl shape. I labelled 4 oxygens with O17 (for 
finding purposes) and set the distance of them as that should set the geometry 
but it isn’t working. Any help would be great. Code below.

mol= 
Chem.MolFromSmiles('[17OH]C1=C2C=C([Y])C=C1CC3=C([17O-])C(CC4=C([17OH])C(CC5=C([17OH])C(C2)=CC(S(=O)([O-])=O)=C5)=CC(S(=O)([O-])=O)=C4)=CC([Y])=C3')
y= Chem.MolFromSmiles('OC1=CC=C([Y])C=C1')
rxn = AllChem.ReactionFromSmarts("[Y][*:1].[Y][*:2]>>[*:1][*:2]")
results=rxn.RunReactants([mol,y])
for products in results:
    for mol in products:
        m2=mol
results2=rxn.RunReactants([m2,y])
for products in results2:
    for mol in products:
        m3=mol
m4=Chem.MolToSmiles(m3)
x=Chem.MolFromSmiles(m4)
index={}
k=0
for atom in x.GetAtoms():
    if atom.GetSymbol() == 'O':
        if atom.GetIsotope() == 17:
            index[k]=atom.GetIdx()
            k+=1
m5=Chem.AddHs(x)
AllChem.EmbedMolecule(m5, useRandomCoords=True)
ff=AllChem.UFFGetMoleculeForceField(m5)
ff.UFFAddDistanceConstraint( index[0], index[1], False, 3.5, 4.5, 99.0)
ff.UFFAddDistanceConstraint( index[0], index[2], False, 3.5, 4.5, 99.0)
ff.UFFAddDistanceConstraint( index[0], index[3], False, 3.5, 4.5, 99.0)
m6=ff.Minimize(maxIts=50)

David
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to