Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling SYBYL atom type in Mol2 parser #291

Open
ppxasjsm opened this issue Aug 28, 2019 · 3 comments
Open

Handling SYBYL atom type in Mol2 parser #291

ppxasjsm opened this issue Aug 28, 2019 · 3 comments

Comments

@ppxasjsm
Copy link
Collaborator

When loading a molecule form amber prm7 and rst7 and then writing it out to mol2, the atom types are set to dummy, this means the mol2 file cannot be read by other mol2 file readers.

The code below should reproduce this.

import BioSimSpace as BSS
ethane = BSS.IO.readMolecules(['ethane.prm7','ethane.rst7'])
BSS.IO.saveMolecules('ethane_mol2', ethane,"mol2")

mol2_issue.zip

@lohedges lohedges transferred this issue from michellab/BioSimSpace Aug 29, 2019
@lohedges lohedges changed the title BioSimSpace mol2 writer does not write correct atom types Handling SYBL atom type in Mol2 parser. Aug 29, 2019
@lohedges lohedges self-assigned this Aug 29, 2019
@lohedges
Copy link
Member

lohedges commented Aug 29, 2019

When writing the Mol2 parser we decided not to attempt to infer the SYBYL atom type. This means that Mol2 files written by Sire following a format conversion can't be read by other Mol2 parsers.

If anyone has a comprehensive reference for this format, or a link to existing code that robustly implements a way to infer the type, then let me know. (I might be able to use RDKit to get the type, that add that as a molecule property before writing with BioSimSpace.)

@lohedges
Copy link
Member

I had previously looked at the specification at the end of this document, although it is quite technical to implement this in code.

Someone is currently working on a Mol2 writer for RDKit here. Once this is merged, we could use this to generate the SYBYL atom type for any molecules in the system. (They can infer the SYBYL atom type from their internal molecule representation.)

I've also looked at other packages (OpenBabel and ParmEd) and they don't infer the type on format conversion either.

@lohedges lohedges changed the title Handling SYBL atom type in Mol2 parser. Handling SYBYL atom type in Mol2 parser Aug 29, 2019
@chryswoods
Copy link
Member

Agree - better to reuse rdkit code once they get it working. It is a very challenging problem which has many ambiguous edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants