gmso
gmso copied to clipboard
Add virtual templates
Really primitive VirtualSite
class. My plan was originally to inherit from the Connection
class. However virtual sites are not technically connected to the other members, so I decided to create a new class. I could be doing this wrong though so feel free to provide any criticism/ feedback.
In this class, I've separated out the attributes so that virtual_site
and virtual_site_members
are separate attributes. The underlying virtual_site_type
needs work but hoping we can discuss this sometime.
Per our conversation today, it seems like Gromacs and OpenMM both handle virtual sites similarly.
the VirtualSites
tag in OpenMM contains the weights for each atom to compute a weighted average of the atom positions to determine the coordinates of the virtual site. Gromacs .top
file contains a
and b
parameters which are used to compute the weights.
Not sure LAMMPS handles generic virtual sites (https://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l.2014-2015/1869.html). For TIP4P, the virtual site atom isn't even supposed to be included in the data file and I guess is handled under the hood with pair_style lj/cut/tip4p
Based on recent discussion regarding the GMSO API, this PR will get refactored based on the following design decisions:
-
VirtualSite
will be a subclass of theSite
abstract base class - We will either have a site groups in the
VirtualSite
class itself or aVirtualSitePosition
class that handles calculating the virtual site position from the surrounding sites.