Particle
-
class Particle : public feasst::PropertiedEntity
Particles may be a collection of sites (anisotropic) or a single site (isotropic).
The position of a site is often used as its “center” with respect to whole-particle operations such as the following:
distance-based particle cut-off methods
wrapping positions about periodic boundary conditions
rigid rotation of the particle
Each site has its own position which is not relative to the position of the particle. Reference sites may be stored optionally.
Other
Other utility functions for particles
-
double max_distance() const
Return the maximum distance of a site from the origin.
Sites
Sites of the particle.
-
int num_sites() const
Return the number of Sites.
-
void remove_site(const int index)
Remove a particular site by its index.
Typing
Site types and checks
-
bool is_isotropic()
Return true if the particle is isotropic (e.g., 1 or less sites)
-
void set_site_physical(const int site, const bool physical)
Set a site as physical/nonphysical.
-
void increment_site_types(const int increment)
Increment the types of the sites.
-
void remove_non_unique_types()
Remove sites and bonds which are of the same type as a previous one.
-
void set_site_type(const int site, const int type)
Set the site type.
-
int num_sites_of_type(const int type) const
Return the number of sites of a given type.
Movement
Move the sites and the particle.
Properties
Change the properties of the sites in the particle
-
void replace_properties(const int site_index, const Properties &replacement)
Replace the properties of site by index.
-
void add_site_property(const std::string name, const double value, const int site_index)
Add the property of a site.
-
void add_or_set_site_property(const std::string name, const double value, const int site_index)
Add or set the property of a site.
-
void set_site_property(const std::string name, const double value, const int site_index)
Set the property of a site.
Bonds
Bonds between two sites in the particle
-
int num_bonds() const
Return the number of bonds.
-
void add_bond_property(const int bond, const std::string name, const double value)
Add a property to a bond.
-
void add_bond_model(const int bond, const std::string model)
Add bond model.
-
void erase_bonds()
Erase all bonds from particle.
-
const Bond &bond(const int site_index1, const int site_index2) const
Find the bond between the given site indices.
-
const std::vector<int> &bond_neighbors(const int site) const
List the site indices bonded to the given site.
Angles
Angles between three sites in the particle
-
int num_angles() const
Return the number of angles.
-
void add_angle_property(const int angle, const std::string name, const double value)
Add a property to a bond.
-
void add_angle_model(const int angle, const std::string model)
Add angle model.
-
const Angle &angle(const int site_index1, const int site_index2, const int site_index3) const
Find the angle between given sites 1-2-3, with 2 as the vertex.
-
const std::vector<std::vector<int>> &angle_neighbors(const int site) const
List the site indices that form angles with the given site.
Dihedrals
Dihedrals between four sites in the particle
-
int num_dihedrals() const
Return the number of dihedrals.
-
void add_dihedral_property(const int dihedral, const std::string name, const double value)
Add a property to a bond.
-
void add_dihedral_model(const int dihedral, const std::string model)
Add dihedral model.
-
const Dihedral &dihedral(const int site_index1, const int site_index2, const int site_index3, const int site_index4) const
Find the dihedral between given sites 1-2-3-4.
-
const std::vector<std::vector<int>> &dihedral_neighbors(const int site) const
List the site indices that form dihedrals with the given site.