Skip to content
Snippets Groups Projects
Commit d0ead429 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added --kt to driver

Added possibility to specify kt in driver
parent 7f862e60
No related branches found
No related tags found
No related merge requests found
......@@ -229,6 +229,7 @@ void Driver<real>::registerKeywords( Keywords& keys ) {
keys.add("optional","--length-units","units for length, either as a string or a number");
keys.add("optional","--mass-units","units for mass in pdb and mc file, either as a string or a number");
keys.add("optional","--charge-units","units for charge in pdb and mc file, either as a string or a number");
keys.add("optional","--kt","set kBT, it will not be necessary to specify temperature in input file");
keys.add("optional","--dump-forces","dump the forces on a file");
keys.add("optional","--dump-forces-fmt","( default=%%f ) the format to use to dump the forces");
keys.addFlag("--dump-full-virial",false,"with --dump-forces, it dumps the 9 components of the virial");
......@@ -351,6 +352,8 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
if( debugforces!="" && (debug_dd || debug_pd) ) error("cannot debug forces and domain/particle decomposition at same time");
if( debugforces!="" && sizeof(real)!=sizeof(double) ) error("cannot debug forces in single precision mode");
real kt=-1.0;
parse("--kt",kt);
string trajectory_fmt;
bool use_molfile=false;
......@@ -631,6 +634,9 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
natoms=0;
}
if( checknatoms<0 ) {
if(kt>=0) {
p.cmd("setKbT",&kt);
}
checknatoms=natoms;
p.cmd("setNatoms",&natoms);
p.cmd("init");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment