# Abstract Representation of a Site in a Molecular Simulation Object Site is the object that represents any general interaction site in a molecular simulation. Sites have been designed to be as general as possible, making no assumptions about representing atoms or beads, or having mass or charge. That is, a Site can represent an atom in an atomistic system, a bead in a coarse-grained system, and much more. In general, a site in a molecular simulation can be of following types (braces represent potential form): 1. Atom (AtomType) 1. Bead (AtomType) 1. Virtual Site (None) 1. Point (None) In this post We will try to explain what each of these `sites` mean in terms of modeling them. From that we will try to derive the properties and methods for common abstract representation of a site. ## Atom and Its Potential Form An atom is the fundamental form of a site with an element, mass and charge and other properties. Properties of an `Atom`: 1. Name : Name for the atom (mandatory) 1. Position : Position (Cartesian Coordinates, unyt based) (mandatory, defaults) 1. Charge : Charge of the Atom (Optional) 1. Mass : Atomic Mass (Optional) 1. Element : Element (Optional) 1. AtomType : AtomType for the Site (The Potential Form) Property preceedence when used with `AtomType`: - Charge (Atom) > Charge (AtomType) - Mass (Atom) > Mass (AtomType) ## Bead and Its Potential Form A bead is like an Atom without an Element, commonly used in coarse-grained simulations. Properties of a `Bead`: 1. Name : Name for the bead (mandatory) 1. Position : Position (Cartesian Coordinates, unyt based) (mandatory, defaults) 1. Charge : Charge of the bead (Optional) 1. Mass : Bead Mass (Optional) 1. AtomType : AtomType for the Site (The Potential Form) Property preceedence when used with `AtomType`: - Charge (Atom) > Charge (AtomType) - Mass (Atom) > Mass (AtomType) Low Priority: Classmethod method to form a bead from group of Atoms. ## Virtual Site or Dummy Atom and Its Potential Form A virtual Site is a Site for which position is determined based on the position of individual atoms constituting the Virtual Site. Properties for `VirtualSite`: 1. Name : Name for the virtual site (mandatory) 1. Charge : Charge of the virtual (Optional) (default = 0.0) 1. Mass : Atomic Mass (Optional) (default = 0.0) 1. AtomType : AtomType for the Virtual Site (The Potential Form) (default parameter values are zeros) ### How to calculate position for a virtual site? We either have a site groups in the class itself or a VirtualSitePosition class that handles calculating positions from Sites that form this virtual site. ## Point Site and Its Potential Form TBD.. ## Connection Rules between Various Types of Sites * Atom - Atom = Bond * Atom - Atom - Atom = Angle * Atom - Atom - Atom - Atom = Dihedral or an Improper * Bead - Bead = Bond * Bead - Bead - Bead = Angle * Bead - Bead - Bead - Bead = Dihedral or an Improper * Bead - Atom = Bond * Bead - Atom - Bead = Angle (any permutation) * Bead - Atom - Bead - Atom = Dihedral or an Improper (any permutation) * VirtualSite = Not allowed in any connections # Abstract Representation of a Connection in a Molecular Simulation Object A Connection that stores data about connections between sites. This class functions as a super-class for any connected groups (bonds, angles, dihedrals, etc). Each instance can have a property for the conection_type (bond_type, angle_type, dihedral_type) which are the subclasses of an Abstract Potential Object In general, a connection in a molecular simulation can be of following types (braces represent potential form): 1. Bond (BondType) 1. Angle (AngleType) 1. Dihedral (DihedralType) 1. Improper (ImproperType) 1. NSiteConnection (NSiteConnectionType) : 2 Body Potential, 3 Body Potential Question: Is an abstraction that is higher than Connection needed to correctly encapsulate all associations and AssociationTypes? ## Bond and Its Potential Form A Bond is a 2 Site connection. See Connection Rules above for the possible Site connections that qualify as a Bond. Properties of a `Bond`: - Name : Name of the Bond - Members : Set/tuple/list of length 2, - Equivalent Members : A datastructure representing equivalent members (To be used by container/topology) - BondType : A Potential object of type BondType ## Angle and Its Potential Form An Angle is a 3 Site connection. See Connection Rules above for the possible Site connections that qualify as an Angle. Properties of a `Angle`: - Name : Name of the Angle - Members : Set/tuple/list of length 3, - Equivalent Members : A datastructure representing equivalent members (To be used by container/topology) - AngleType : A Potential object of type AngleType ## Dihedral/Improper and their Potential Form Both Dihedrals and Impropers represent a 4 Site connection. See Connection Rules above for the possible Site connections that qualify as an Improper/Dihedral. Properties of a `Dihedral/Improper`: - Name : Name of the Dihedral/Improper - Members : Set/tuple/list of length 4, - Equivalent Members : A datastructure representing equivalent members (To be used by container/topology) - DihedralType/ImproperType : A Potential object of type DihedralType/ImproperType How should we allow addition of Bonded Connections between the Sites? Should you be allowed to add an Angle between three sites `A-B-C` if there's no Bond `A-B` or `B-C` or equivalent?