baker-laboratory / RoseTTAFold-All-Atom

Other
572 stars 97 forks source link

The error occurs when I use molecules outside of the examples to predict covalent complexes. #64

Open zyrlia1018 opened 3 months ago

zyrlia1018 commented 3 months ago

I find that

/home/zyrlia/zou/Manba/Mamba/envs/RFAA/lib/python3.10/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'covalent.yaml': Defaults list is missing _self_. See https://hydra.cc/docs/1.2/upgrades/1.0_to_1.1/default_composition_order for more information warnings.warn(msg, UserWarning) Using the cif atom ordering for TRP.

*** Open Babel Warning in Build There exists NaN in calculated coordinates.

But there is no problem when using 7s69_glycan.sdf in the example

ZhuofanShen commented 3 months ago

I encountered the same problem when I used PyMOL-generated .sdf files as input files. Since the example input files were generated by OEChem, I guess the problem probably originated from the inconsistent formatting of the .sdf file.

Update: The same error occurred even if I used the online OpenBabel file converter to prepare the .sdf file, so there might be other reasons that caused this issue.

zyrlia1018 commented 3 months ago

I encountered the same problem when I used PyMOL-generated .sdf files as input files. Since the example input files were generated by OEChem, I guess the problem is originated from the inconsistent formatting of the .sdf file.

Thanks for your reply. I also tested the other molecules in the examples whether it used for covalent or in-covalent complex prediction. But in the example, there is no problem only if 7s69_glycan.sdf is used.

kosukeseki commented 3 months ago

I've also encountered this problem when modeling a covalent modification to phenylalanine. Weirdly, the covalent bond formation works on the ortho position, but I run into the same error message when trying to model the covalent bond formation on the meta or para position. So the SDF file works for me. To confirm, I've looked at the obmol object generated by OpenBabel, and regardless of where I place the covalent bond, the generated obmol object has the correct number of bonds and molecular weight. The same error message also happens when I try to model a covalent bond of p-iodobenzene onto alanine, so I am fairly sure the bug in the code is related to the chemical structure itself of the modified amino acid rather than forming the bond.

The bug is in the "recompute_xyz_after_chirality" function, in the

    builder.Build(obmol)

lines of code. The Build function is where this error message pops up. It seems like this is an issue related to OpenBabel rather than RFAA, but I would love to be wrong on that. I wonder if this issue is related #54 about inconsistencies between the SDF parsing and SMILES parsing for certain chemical structures, but I don't know for sure.

kosukeseki commented 2 months ago

I've also encountered this problem when modeling a covalent modification to phenylalanine. Weirdly, the covalent bond formation works on the ortho position, but I run into the same error message when trying to model the covalent bond formation on the meta or para position. So the SDF file works for me. To confirm, I've looked at the obmol object generated by OpenBabel, and regardless of where I place the covalent bond, the generated obmol object has the correct number of bonds and molecular weight. The same error message also happens when I try to model a covalent bond of p-iodobenzene onto alanine, so I am fairly sure the bug in the code is related to the chemical structure itself of the modified amino acid rather than forming the bond.

The bug is in the "recompute_xyz_after_chirality" function, in the

    builder.Build(obmol)

lines of code. The Build function is where this error message pops up. It seems like this is an issue related to OpenBabel rather than RFAA, but I would love to be wrong on that. I wonder if this issue is related #54 about inconsistencies between the SDF parsing and SMILES parsing for certain chemical structures, but I don't know for sure.

As a quick follow-up, I successfully ran RosettaFold-All-Atom by just commenting out the builder.Build(obmol) line of code. Seems to work OK for my purposes but I imagine with more complex covalent modifications it would be useful to be able to build in the 3D coordinates by actually fixing this issue.