mstk.topology.VirtualSite¶
- class mstk.topology.VirtualSite¶
Base class for virtual site definitions.
This class should not be constructed directly. Use its subclasses instead or call :create:.
Methods
__init__()Calculate the position of virtual site from parent atoms.
create(type, parents, parameters)Factory function for creating a new virtual site
register(klass)Register a virtual site class so that it can be created.
- calc_position()¶
Calculate the position of virtual site from parent atoms.
- Returns:
position
- Return type:
array_like
- static register(klass)¶
Register a virtual site class so that it can be created.
- Parameters:
klass (subclass of VirtualSite) –
- static create(type, parents, parameters)¶
Factory function for creating a new virtual site
- Parameters:
type (str) – The type of virtual site to be created
parents (list of Atom) – The parent atoms of the new virtual site
parameters (list of float) – Parameters for calculating the position of virtual site from parent atoms
- Returns:
virtual_site
- Return type:
subclass of VirtualSite