gmso icon indicating copy to clipboard operation
gmso copied to clipboard

Add virtual templates

Open rmatsum836 opened this issue 5 years ago • 2 comments

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.

rmatsum836 avatar Jan 24 '20 22:01 rmatsum836

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

rmatsum836 avatar Jan 27 '20 18:01 rmatsum836

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 the Site abstract base class
  • We will either have a site groups in the VirtualSite class itself or a VirtualSitePosition class that handles calculating the virtual site position from the surrounding sites.

rmatsum836 avatar May 06 '20 15:05 rmatsum836