faunus
Public Member Functions | List of all members
Faunus::Region::WithinMoleculeType Class Reference

Within a spherical cutoff distance from a molecule type. More...

#include <regions.h>

Inheritance diagram for Faunus::Region::WithinMoleculeType:
Inheritance graph
[legend]
Collaboration diagram for Faunus::Region::WithinMoleculeType:
Collaboration graph
[legend]

Public Member Functions

 WithinMoleculeType (const Space &spc, std::string_view molecule_name, double threshold, bool use_region_mass_center, bool use_group_mass_center)
 
 WithinMoleculeType (const Space &spc, const json &j)
 
bool isInside (const Point &position) const override
 
std::optional< double > volume () const override
 
void to_json (json &j) const override
 

Detailed Description

Within a spherical cutoff distance from a molecule type.

Checks if within a radial distance from any particle in any groups of the given molecular id (molecule_name). If the group is molecular, com can be used to check for a spherical volume around the mass center. If so, volume() returns the spherical volume, otherwise nullopt

Constructor & Destructor Documentation

◆ WithinMoleculeType()

Faunus::Region::WithinMoleculeType::WithinMoleculeType ( const Space spc,
std::string_view  molecule_name,
double  threshold,
bool  use_region_mass_center,
bool  use_group_mass_center 
)
Parameters
spcSpace to operate on
molecule_nameMolecule type to target
thresholdRadial distance threshold to particles or mass center in target groups
use_mass_centerUse mass-center distance for molecular groups
use_group_mass_centerUse group mass-center of when testing if molecules are within region
Exceptions
ifuse_mass_center==true and the given molecule type is not molecular, i.e. has ill-defined mass center

The documentation for this class was generated from the following files: