diff --git a/CHANGES/v2.4.md b/CHANGES/v2.4.md index d64b99fc55a9848139a3fdeb98abe7a3e6dd1082..ff90f931e29a49dad05ac6d5130e7cbcf8432181 100644 --- a/CHANGES/v2.4.md +++ b/CHANGES/v2.4.md @@ -155,6 +155,7 @@ Fixes after beta release: - (developers) `plumed config makefile_conf` can be used to retrieve `Makefile.conf` file a posteriori. - Added patch for Quantum ESPRESSO 6.2 (thanks to Ralf Meyer). - Implemented HREX for gromacs-2016.4. + - Added possibility to pass `--kt` from \ref driver. - (developers) Store `MPIEXEC` variable at configure time and use it later for running regtests. Notice that in case `MPIEXEC` is not specified regtests will be run using the command stored in env var `PLUMED_MPIRUN` or, if this is also not defined, using `mpirun`. diff --git a/regtest/basic/rt67/config b/regtest/basic/rt67/config index ce858d0c5a1fc8ff0fa3f73d5836edaf432c82e8..e960f8cb31c6f87fc30d9850689ea8c30e3d3d7b 100644 --- a/regtest/basic/rt67/config +++ b/regtest/basic/rt67/config @@ -1,3 +1,3 @@ type=driver # this is to test a different name -arg="--plumed plumed.dat --trajectory-stride 500 --timestep 0.002 --igro traj.gro" +arg="--plumed plumed.dat --trajectory-stride 500 --timestep 0.002 --igro traj.gro --kt 2.494339" diff --git a/regtest/basic/rt67/plumed.dat b/regtest/basic/rt67/plumed.dat index 6eed71d034826ddb7913b5f77f947c68276f6605..95c5cd685ecf5e97d5a522c74bf4f1be4f9c3239 100644 --- a/regtest/basic/rt67/plumed.dat +++ b/regtest/basic/rt67/plumed.dat @@ -6,7 +6,6 @@ METAD ... SIGMA=0.20,0.20 HEIGHT=1.20 BIASFACTOR=10 - TEMP=300.0 PACE=500 LABEL=metad FILE=HILLS diff --git a/src/cltools/Driver.cpp b/src/cltools/Driver.cpp index 05ad5cf2b5cd56b671b36f49a69212686d575ba7..c4b05ee8d27007dd247e5f33926c024e149ef4f8 100644 --- a/src/cltools/Driver.cpp +++ b/src/cltools/Driver.cpp @@ -230,6 +230,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; @@ -633,6 +636,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");