Hello everyone,

I will repeat the problem here:
Input: SMILES string of Chemical A ('c1ccccc1') an its calculated 3D
coordinates from rdkit and SMILES of Chemical B ('Oc1ccccc1')

Ouput: 3D coordinates of chem B that aligns with Chemical A

After looking at a few example, I came up with this code:
prbChem = Chem.MolToSmiles(Chem.MolFromSmiles('Oc1ccccc1'))
prbMol = Chem.MolFromSmiles(prbChem)
prbMolwithH = Chem.AddHs(prbMol)
##Molecule used as reference fr the alignment
refChem = Chem.MolToSmiles(Chem.MolFromSmiles('c1ccccc1'))
refMol = Chem.MolFromSmiles(refChem)
refMolwithH = Chem.AddHs(refMol)

MolChemwithHs = [prbMolwithH, refMolwithH]

for x in MolChemwithHs:
rdDistGeom.EmbedMolecule(x)
for x in MolChemwithHs:
AllChem.UFFOptimizeMolecule(x)

tform = rdMolAlign.GetAlignmentTransform(prbMolwithH, refMolwithH)

*Is it true that if I can find tform, I can convert the coordinates of
chemical B using AllChem.TransformMol(probMol, tform) ? *

*Also, with the code, I got the error of *
Traceback (most recent call last):
  File "3DAlignment.py", line 27, in <module>
    tform = rdMolAlign.GetAlignmentTransform(prbMolwithH, refMolwithH)
RuntimeError: std::exception

Would you please help me with this error?

Thank you so much for your help :)

-- 
Phuong Chau
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to