You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After version 2024_03_1, which changes EmbedMolecule() incompatibly, EmbedMolecule() returns the coodinates 0, 0, 0 for all atoms of some peptides derived from MolFromHELM.
e.g.
ATOM 1 N PHE A 1 0.000 0.000 0.000 1.00 0.00 N
ATOM 2 CA PHE A 1 0.000 0.000 0.000 1.00 0.00 C
ATOM 3 C PHE A 1 0.000 0.000 0.000 1.00 0.00 C
...
To Reproduce
The below python codes works well on rdkit ver. 2023.03.3, but it does not work for seq3 on ver. 2024.03.2.
seq1 = "GGGGGGG" # EmbedMolecule() works well
seq2 = "FFFFFF" # EmbedMolecule() works well
seq3 = "FFFFFFF" # EmbedMolecule() returns coordinates 0, 0, 0 without any error
tempPdbName = "./" + seq1 + ".pdb"
m = Chem.MolFromHELM("PEPTIDE1{" + str.join(".", list(seq1)) + "}$$$$")
AllChem.EmbedMolecule(m)
Chem.MolToPDBFile(m, tempPdbName)
tempPdbName = "./" + seq2 + ".pdb"
m = Chem.MolFromHELM("PEPTIDE1{" + str.join(".", list(seq2)) + "}$$$$")
AllChem.EmbedMolecule(m)
Chem.MolToPDBFile(m, tempPdbName)
tempPdbName = "./" + seq3 + ".pdb"
m = Chem.MolFromHELM("PEPTIDE1{" + str.join(".", list(seq3)) + "}$$$$")
AllChem.EmbedMolecule(m)
Chem.MolToPDBFile(m, tempPdbName)
Expected behavior
The pdb files of seq3 has non-zero coodinates like seq1 and seq2.
Configuration (please complete the following information):
following the documentation of the code you provide, it seems that the problem you have is that you are missing to explicitly add the hydrogens to the molecule before calling the EmbedMolecule method. With the code below you should be fine with the seq3 case. The change from what I see in Greg's source code @greglandrum , is made in this ticket #3807
importrdkitfromrdkit.ChemimportAllChem,rdmolopsfromrdkitimportChemseq1="GGGGGGG"# EmbedMolecule() works wellseq2="FFFFFF"# EmbedMolecule() works wellseq3="FFFFFFF"# EmbedMolecule() returns coordinates 0, 0, 0 without any errortempPdbName="./"+seq3+".pdb"m=Chem.MolFromHELM("PEPTIDE1{"+str.join(".", list(seq3)) +"}$$$$",)
m=rdmolops.AddHs(m)
AllChem.EmbedMolecule(m)
Chem.MolToPDBFile(m, tempPdbName)
Thank you for your help. I was struggling to understand the cause of the problem, so your guidance was very helpful. I checked the ticket you mentioned, and it seems that displaying an error would make it clearer.
Describe the bug
After version 2024_03_1, which changes EmbedMolecule() incompatibly, EmbedMolecule() returns the coodinates 0, 0, 0 for all atoms of some peptides derived from MolFromHELM.
e.g.
To Reproduce
The below python codes works well on rdkit ver. 2023.03.3, but it does not work for seq3 on ver. 2024.03.2.
Expected behavior
The pdb files of seq3 has non-zero coodinates like seq1 and seq2.
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: