diff --git a/src/cltools/Driver.cpp b/src/cltools/Driver.cpp index 203f561b340d887a74ae7282d51bdf7e3d964777..5076321ad29b5c0c2fdee9645c19af32e3590605 100644 --- a/src/cltools/Driver.cpp +++ b/src/cltools/Driver.cpp @@ -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");