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

Residue name and atom name are forcibly rewritten #1514

Closed
mumeiyamibito opened this issue Dec 19, 2019 · 5 comments
Closed

Residue name and atom name are forcibly rewritten #1514

mumeiyamibito opened this issue Dec 19, 2019 · 5 comments
Labels

Comments

@mumeiyamibito
Copy link

mumeiyamibito commented Dec 19, 2019

In Gromacs, water molecule recognized as the residue name SOL, atom name OW, and HW.
However, save_gro() and save_pdb() output water molecule as residue names HOH, atom names O, H1, and H2.
I'd like to use mdtraj to extract from the trajectory into each frame for use as an initial structure of next MD simulation.
Is there a way to keep residue and atom names in the topology file?

import mdtraj
for frame_idx, frame_obj in enumerate(mdtraj.iterload("test.xtc", top = "test.gro", chunk = 1)):
    if frame_idx == 0:
        frame_obj.save_gro("test.gro", force_overwrite = True)
    else:
        break
@peastman
Copy link
Contributor

I thought Gromacs had switched to using standard PDB names (HOH instead of SOL) years ago?

@mumeiyamibito
Copy link
Author

@peastman Thank you for replying and the information.

In some super computer systems, old version Gromacs is installed for compatibility.

Where does mdtraj get information from? Normally, users think that residue and atom information in output will be based on the given topology.

@peastman
Copy link
Contributor

The names of atoms and residues are standardized as part of the PDB chemical components dictionary. MDTraj tries to follow the principle, "Be tolerant about what you accept as inputs and strict about what you produce as outputs." If your input file uses nonstandard names, it will do its best to interpret them correctly. It then does its best to make the files it writes fully standards compliant.

@mumeiyamibito
Copy link
Author

@peastman OK. I understood.

In output process, I use subprocess with trjconv instead of mdtraj.

@stale
Copy link

stale bot commented Jun 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 17, 2020
@stale stale bot closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants