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

mb.Compound.save() feature returns a PDB file without bonds #1190

Open
Pablo-Pomares opened this issue Jun 8, 2024 · 2 comments
Open

mb.Compound.save() feature returns a PDB file without bonds #1190

Pablo-Pomares opened this issue Jun 8, 2024 · 2 comments

Comments

@Pablo-Pomares
Copy link

Bug summary

When trying to save to a PDB file, it returns a file without bonds.

Code to reproduce the behavior

Please include a code snippet that can be used to reproduce this bug.

import mbuild as mb
from mbuild.lib.recipes import Alkane
hex = Alkane(6)

hex.save("hexane.pdb", overwrite=True)

The previous command yields (converted to txt for attachment):

hexane.txt

But the following is expected (converted to txt for attachment):

hexane1.txt

Software versions

  • Which version of mBuild are you using? 0.17.0
  • Which version of Python (python --version)? 3.11.0
  • Which operating system? Pop!_OS 22.04 LTS
@jpotoff
Copy link
Contributor

jpotoff commented Jun 9, 2024

Normally, we are using the PDB file in connection with the PSF file, which contains all of the connectivity information. To put connectivity information in a PDB file is, therefore, redundant.

@CalCraven
Copy link
Contributor

Just following up on this issue as we are aware of the lack of support. Since mBuild 1.0 will strip out most writers and migrate them to GMSO, we can dump reliance on other packages that perform some of these operations. For instance, ParmEd is used to save pdb, and mdtraj to write pdb currently. So this should be switched over so GMSO can handle both file types, and we can be certain to get support for reading and writing bonds.

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

No branches or pull requests

3 participants