Loading...
Searching...
No Matches
PLMD::fixedTrajectory Class Reference

A decorator for fixing the state of the trajectory. More...

Inheritance diagram for PLMD::fixedTrajectory:

Public Member Functions

 fixedTrajectory (std::unique_ptr< AtomDistribution > &&d, unsigned newStride=0)
 
void frame (std::vector< Vector > &posToUpdate, std::vector< double > &box, unsigned step, Random &rng)
 Update the input vectors with the position and the box of the frame.
 
void frame (View< Vector > posToUpdate, View< double, 9 > box, unsigned step, Random &rng) override
 Update the input vectors with the position and the box of the frame.
 
bool overrideNat (unsigned &natoms) override
 If necessary changes the number of atoms, returns true if that number has been changed.
 

Static Public Member Functions

static std::unique_ptr< AtomDistributiondecorate (std::unique_ptr< AtomDistribution > &&d, std::string_view cmd)
 
static std::unique_ptr< AtomDistributiondecorateAtomDistribution (std::unique_ptr< AtomDistribution > &&ad, std::string_view decoratorsDistr)
 
static std::unique_ptr< AtomDistributiongetAtomDistribution (std::string_view atomicDistr)
 
static std::vector< documentationgetDecoratorsDocumentation ()
 
static std::vector< std::string > getDecoratorsList ()
 
static std::vector< documentationgetDistributionDocumentation ()
 
static std::vector< std::string > getDistributionList ()
 

Static Public Attributes

static constexpr auto doc
 
static constexpr auto id ="fix"
 

Private Attributes

std::unique_ptr< AtomDistributiondistribution
 
std::array< double, 9 > fixedBox
 
bool generate =true
 
std::vector< Vectorpositions = {}
 
unsigned stride =0
 

Detailed Description

A decorator for fixing the state of the trajectory.

Constructor & Destructor Documentation

◆ fixedTrajectory()

PLMD::fixedTrajectory::fixedTrajectory ( std::unique_ptr< AtomDistribution > && d,
unsigned newStride = 0 )
inline

Member Function Documentation

◆ decorate()

static std::unique_ptr< AtomDistribution > PLMD::fixedTrajectory::decorate ( std::unique_ptr< AtomDistribution > && d,
std::string_view cmd )
inlinestatic

◆ decorateAtomDistribution()

std::unique_ptr< AtomDistribution > PLMD::AtomDistribution::decorateAtomDistribution ( std::unique_ptr< AtomDistribution > && ad,
std::string_view decoratorsDistr )
staticinherited

◆ frame() [1/2]

void PLMD::AtomDistribution::frame ( std::vector< Vector > & posToUpdate,
std::vector< double > & box,
unsigned step,
Random & rng )
inherited

Update the input vectors with the position and the box of the frame.

◆ frame() [2/2]

void PLMD::fixedTrajectory::frame ( View< Vector > posToUpdate,
View< double, 9 > box,
unsigned step,
Random & rng )
inlineoverridevirtual

Update the input vectors with the position and the box of the frame.

Implements PLMD::AtomDistribution.

◆ getAtomDistribution()

std::unique_ptr< AtomDistribution > PLMD::AtomDistribution::getAtomDistribution ( std::string_view atomicDistr)
staticinherited

◆ getDecoratorsDocumentation()

std::vector< AtomDistribution::documentation > PLMD::AtomDistribution::getDecoratorsDocumentation ( )
staticinherited

◆ getDecoratorsList()

std::vector< std::string > PLMD::AtomDistribution::getDecoratorsList ( )
staticinherited

◆ getDistributionDocumentation()

std::vector< AtomDistribution::documentation > PLMD::AtomDistribution::getDistributionDocumentation ( )
staticinherited

◆ getDistributionList()

std::vector< std::string > PLMD::AtomDistribution::getDistributionList ( )
staticinherited

◆ overrideNat()

bool PLMD::fixedTrajectory::overrideNat ( unsigned & )
inlineoverridevirtual

If necessary changes the number of atoms, returns true if that number has been changed.

This is used principally in the benchmark. All the atoms distributions usually acts all the atoms passed by the vector of positions, so this does not change the input

But the "reading file" ones will only work if the number of atoms is the same of the one in the file, so this set the input to that number

And in case of the ones that replicate the trajectory this multiplies the input by the number of replicated "systems" this this is needed to inform benchmark that if you asked for replicating N atoms X*Y*Z times it will need an array of N*X*Y*Z atoms Outside of the specific usecase of the benchmark this is less important, because replicate will generate the inner trjectory on a limited number of atoms and the it will replicate it

Reimplemented from PLMD::AtomDistribution.

Member Data Documentation

◆ distribution

std::unique_ptr<AtomDistribution> PLMD::fixedTrajectory::distribution
private

◆ doc

auto PLMD::fixedTrajectory::doc
staticconstexpr
Initial value:
=R"=(Fixes the trajectory for stride steps, or forever if stride is 0
usage:
fix (optional stride=0))="

◆ fixedBox

std::array<double,9> PLMD::fixedTrajectory::fixedBox
private
Initial value:
= {0.0,0.0,0.0,
0.0,0.0,0.0,
0.0,0.0,0.0
}

◆ generate

bool PLMD::fixedTrajectory::generate =true
private

◆ id

auto PLMD::fixedTrajectory::id ="fix"
staticconstexpr

◆ positions

std::vector<Vector> PLMD::fixedTrajectory::positions = {}
private

◆ stride

unsigned PLMD::fixedTrajectory::stride =0
private

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