openforcefield / openff-interchange

A project (and object) for storing, manipulating, and converting molecular mechanics data.
https://docs.openforcefield.org/projects/interchange
MIT License
69 stars 22 forks source link

Another thing people use ParmEd for - translate data into a richer format for use in VMD. #356

Open mrshirts opened 2 years ago

mrshirts commented 2 years ago

Example ParmEd use case that we may (or may not!) want to support; just want to mention interconversion uses.


VMD doesn't recognize the gromacs topology files (.top and .itp) which have bond and charge information. When we load a gro/xtc/trr file, VMD simply guesses bonds based on residue and distance information. For accurate visualization of bonds and charges in VMD, it can be useful to instead read a CHARMM psf file. Psf file files can be generated using the information in gromacs topology files with ParmEd. PSF file can be generated as follows:

` import parmed

gmx_top = parmed.load_file("topol.top", xyz = 'coordinates.gro', parametrize= False)

gmx_top.save('structure.psf') `

Then 'structure.psf' can be loaded in VMD along with 'coordinates.gro' and visualize bonds, as well as color code the charge of the atoms.

mattwthompson commented 1 year ago

Is the PSF file format standardized? It looks like there may be several versions floating around out there and I'm not sure which VMD plays nicely with