read/write lammps molecule templates #15
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds read/write support for LAMMPS molecule templates to topotools.
readlammpsmol:
Read in atom coordinates, properties, bond, angle, dihedral and other related topology info from a molecule template file, i.e. a file suitable for the
molecule
command. This can be used to check a molecule template for its validity (e.g. for fixes that utilize molecule templates), or for manipulations from within VMD. This subcommand creates a new molecule in VMD and returns its molecule id or -1 in case of failure. The -sel parameter is currently ignored.writelammpsmol:
Write out atom coordinates, properties, bond, angle, dihedral and other related topology info stored inside VMD to a molecule template file, i.e. a file suitable for the
molecule
command. Using the optional 'typelabels' flag will trigger writing a molecule template file with typelabel support requiring LAMMPS version 15Sep2022 or later. By default a traditional molecule template with numerical types will be written. This way VMD can be used to build LAMMPS input with Tcl scripting and convert existing inputs from other MD codes to be used in LAMMPS. Only data that is present will be written.This PR also adds [first|last|step] options for readvarxyz, similar to other topotools commands.