Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
PLMD::cltools::SimpleMD Class Reference
Inheritance diagram for PLMD::cltools::SimpleMD:
Inheritance graph
[legend]

Public Types

enum  { unset, commandline, ifile }
 How is the input specified on the command line or in an input file. More...
 

Public Member Functions

 SimpleMD (const CLToolOptions &co)
 
void setInputData (const std::map< std::string, std::string > &inputData)
 Set the input data: More...
 
const std::map< std::string, std::string > & getInputData ()
 
bool readInput (int argc, char **argv, FILE *in, FILE *out)
 Read the arguments from the command line. More...
 

Static Public Member Functions

static void registerKeywords (Keywords &keys)
 

Public Attributes

enum PLMD::CLTool:: { ... }  inputdata
 How is the input specified on the command line or in an input file. More...
 

Protected Member Functions

template<class T >
bool parse (const std::string &key, T &t)
 Get the value of one of the command line arguments. More...
 
void parseFlag (const std::string &key, bool &t)
 Find out whether one of the command line flags is present or not. More...
 
void error (const std::string &msg)
 Crash the command line tool with an error. More...
 
template<class T >
bool parseVector (const std::string &key, std::vector< T > &t)
 

Private Member Functions

string description () const
 virtual function returning a one-line descriptor for the tool More...
 
void read_input (double &temperature, double &tstep, double &friction, double &forcecutoff, double &listcutoff, int &nstep, int &nconfig, int &nstat, bool &wrapatoms, string &inputfile, string &outputfile, string &trajfile, string &statfile, int &maxneighbours, int &ndim, int &idum)
 
void read_natoms (const string &inputfile, int &natoms)
 
void read_positions (const string &inputfile, int natoms, vector< Vector > &positions, double cell[3])
 
void randomize_velocities (const int natoms, const int ndim, const double temperature, const vector< double > &masses, vector< Vector > &velocities, Random &random)
 
void pbc (const double cell[3], const Vector &vin, Vector &vout)
 
void check_list (const int natoms, const vector< Vector > &positions, const vector< Vector > &positions0, const double listcutoff, const double forcecutoff, bool &recompute)
 
void compute_list (const int natoms, const int listsize, const vector< Vector > &positions, const double cell[3], const double listcutoff, vector< int > &point, vector< int > &list)
 
void compute_forces (const int natoms, const int listsize, const vector< Vector > &positions, const double cell[3], double forcecutoff, const vector< int > &point, const vector< int > &list, vector< Vector > &forces, double &engconf)
 
void compute_engkin (const int natoms, const vector< double > &masses, const vector< Vector > &velocities, double &engkin)
 
void thermostat (const int natoms, const int ndim, const vector< double > &masses, const double dt, const double friction, const double temperature, vector< Vector > &velocities, double &engint, Random &random)
 
void write_positions (const string &trajfile, int natoms, const vector< Vector > &positions, const double cell[3], const bool wrapatoms)
 
void write_final_positions (const string &outputfile, int natoms, const vector< Vector > &positions, const double cell[3], const bool wrapatoms)
 
void write_statistics (const string &statfile, const int istep, const double tstep, const int natoms, const int ndim, const double engkin, const double engconf, const double engint)
 
virtual int main (FILE *in, FILE *out, PLMD::Communicator &pc)
 virtual function mapping to the specific main for each tool More...
 

Private Attributes

bool write_positions_first
 
bool write_statistics_first
 
int write_statistics_last_time_reopened
 
FILE * write_statistics_fp
 

Member Enumeration Documentation

anonymous enum
inherited

How is the input specified on the command line or in an input file.

Enumerator
unset 
commandline 
ifile 

Constructor & Destructor Documentation

PLMD::cltools::SimpleMD::SimpleMD ( const CLToolOptions co)
inlineexplicit

Member Function Documentation

void PLMD::cltools::SimpleMD::check_list ( const int  natoms,
const vector< Vector > &  positions,
const vector< Vector > &  positions0,
const double  listcutoff,
const double  forcecutoff,
bool &  recompute 
)
inlineprivate
void PLMD::cltools::SimpleMD::compute_engkin ( const int  natoms,
const vector< double > &  masses,
const vector< Vector > &  velocities,
double &  engkin 
)
inlineprivate
void PLMD::cltools::SimpleMD::compute_forces ( const int  natoms,
const int  listsize,
const vector< Vector > &  positions,
const double  cell[3],
double  forcecutoff,
const vector< int > &  point,
const vector< int > &  list,
vector< Vector > &  forces,
double &  engconf 
)
inlineprivate
void PLMD::cltools::SimpleMD::compute_list ( const int  natoms,
const int  listsize,
const vector< Vector > &  positions,
const double  cell[3],
const double  listcutoff,
vector< int > &  point,
vector< int > &  list 
)
inlineprivate
string PLMD::cltools::SimpleMD::description ( ) const
inlineprivatevirtual

virtual function returning a one-line descriptor for the tool

Reimplemented from PLMD::CLTool.

void PLMD::CLTool::error ( const std::string &  msg)
protectedinherited

Crash the command line tool with an error.

const std::map<std::string,std::string>& PLMD::CLTool::getInputData ( )
inlineinherited
virtual int PLMD::cltools::SimpleMD::main ( FILE *  in,
FILE *  out,
PLMD::Communicator pc 
)
inlineprivatevirtual

virtual function mapping to the specific main for each tool

Implements PLMD::CLTool.

template<class T >
bool PLMD::CLTool::parse ( const std::string &  key,
T &  t 
)
protectedinherited

Get the value of one of the command line arguments.

void PLMD::CLTool::parseFlag ( const std::string &  key,
bool &  t 
)
protectedinherited

Find out whether one of the command line flags is present or not.

template<class T >
bool PLMD::CLTool::parseVector ( const std::string &  key,
std::vector< T > &  t 
)
protectedinherited
void PLMD::cltools::SimpleMD::pbc ( const double  cell[3],
const Vector vin,
Vector vout 
)
inlineprivate
void PLMD::cltools::SimpleMD::randomize_velocities ( const int  natoms,
const int  ndim,
const double  temperature,
const vector< double > &  masses,
vector< Vector > &  velocities,
Random random 
)
inlineprivate
void PLMD::cltools::SimpleMD::read_input ( double &  temperature,
double &  tstep,
double &  friction,
double &  forcecutoff,
double &  listcutoff,
int &  nstep,
int &  nconfig,
int &  nstat,
bool &  wrapatoms,
string &  inputfile,
string &  outputfile,
string &  trajfile,
string &  statfile,
int &  maxneighbours,
int &  ndim,
int &  idum 
)
inlineprivate
void PLMD::cltools::SimpleMD::read_natoms ( const string &  inputfile,
int &  natoms 
)
inlineprivate
void PLMD::cltools::SimpleMD::read_positions ( const string &  inputfile,
int  natoms,
vector< Vector > &  positions,
double  cell[3] 
)
inlineprivate
bool PLMD::CLTool::readInput ( int  argc,
char **  argv,
FILE *  in,
FILE *  out 
)
inherited

Read the arguments from the command line.

static void PLMD::cltools::SimpleMD::registerKeywords ( Keywords keys)
inlinestatic
void PLMD::CLTool::setInputData ( const std::map< std::string, std::string > &  inputData)
inlineinherited

Set the input data:

void PLMD::cltools::SimpleMD::thermostat ( const int  natoms,
const int  ndim,
const vector< double > &  masses,
const double  dt,
const double  friction,
const double  temperature,
vector< Vector > &  velocities,
double &  engint,
Random random 
)
inlineprivate
void PLMD::cltools::SimpleMD::write_final_positions ( const string &  outputfile,
int  natoms,
const vector< Vector > &  positions,
const double  cell[3],
const bool  wrapatoms 
)
inlineprivate
void PLMD::cltools::SimpleMD::write_positions ( const string &  trajfile,
int  natoms,
const vector< Vector > &  positions,
const double  cell[3],
const bool  wrapatoms 
)
inlineprivate
void PLMD::cltools::SimpleMD::write_statistics ( const string &  statfile,
const int  istep,
const double  tstep,
const int  natoms,
const int  ndim,
const double  engkin,
const double  engconf,
const double  engint 
)
inlineprivate

Member Data Documentation

enum { ... } PLMD::CLTool::inputdata

How is the input specified on the command line or in an input file.

bool PLMD::cltools::SimpleMD::write_positions_first
private
bool PLMD::cltools::SimpleMD::write_statistics_first
private
FILE* PLMD::cltools::SimpleMD::write_statistics_fp
private
int PLMD::cltools::SimpleMD::write_statistics_last_time_reopened
private

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