mosdef-hub / mbuild

A hierarchical, component based molecule builder
https://mbuild.mosdef.org
Other
171 stars 79 forks source link

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

Open Pablo-Pomares opened 2 months ago

Pablo-Pomares commented 2 months ago

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

jpotoff commented 2 months ago

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.