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

Merge branch 'v2.0'

parents 0ba48bbb 5de24f52
No related branches found
No related tags found
No related merge requests found
......@@ -18,11 +18,15 @@ In addition, it is now much easier to contribute new functionality to the code b
- Developer and user documentation
Version 2.0.1 (unpublised yet, check out branch v2.0 on git repository)
For users:
- Several small fixes in documentation and log file
- Fixed a bug in HISTOGRAM with REWEIGHT_BIAS. Reweighting was only done when also temperature-reweighing was enabled.
- Added message when "plumed simpled" is used on a non-existing file
For developers:
- Several small fixes in documentation
- Added possibility to setup replica exchange from MD codes in fortran (commands "GREX setMPIFIntercomm" and "GREX setMPIFIntracomm")
- cmd("setStopFlag") should now be called after PLUMED initialization.
*/
include ../../scripts/test.make
type=driver
# this is to test a different name
arg="--plumed plumed.dat --ixyz trajectory.xyz"
#! FIELDS x probs
#! SET min_x 0.0
#! SET max_x 3.0
#! SET nbins_x 101
#! SET periodic_x false
0.0000 0.0000
0.0300 0.0000
0.0600 0.0000
0.0900 0.0000
0.1200 0.0000
0.1500 0.0000
0.1800 0.0000
0.2100 0.0000
0.2400 0.0000
0.2700 0.0000
0.3000 0.0000
0.3300 0.0000
0.3600 0.0000
0.3900 0.0000
0.4200 0.0000
0.4500 0.0000
0.4800 0.0000
0.5100 0.0000
0.5400 0.0000
0.5700 0.0000
0.6000 0.0000
0.6300 0.0000
0.6600 0.0000
0.6900 0.0000
0.7200 0.0000
0.7500 0.0000
0.7800 0.0000
0.8100 0.0000
0.8400 0.0000
0.8700 0.0000
0.9000 0.0000
0.9300 0.0000
0.9600 0.0000
0.9900 0.0000
1.0200 0.0000
1.0500 0.0000
1.0800 0.0000
1.1100 0.0000
1.1400 0.0031
1.1700 0.0086
1.2000 0.0221
1.2300 0.0521
1.2600 0.1119
1.2900 0.2199
1.3200 0.3947
1.3500 0.6476
1.3800 0.9709
1.4100 1.3304
1.4400 1.6661
1.4700 1.9069
1.5000 1.9947
1.5300 1.9069
1.5600 1.6661
1.5900 1.3304
1.6200 0.9724
1.6500 0.6520
1.6800 0.4067
1.7100 0.2497
1.7400 0.1799
1.7700 0.1937
1.8000 0.2921
1.8300 0.4788
1.8600 0.7517
1.8900 1.0893
1.9200 1.4485
1.9500 1.7603
1.9800 1.9552
2.0100 1.9848
2.0400 1.8414
2.0700 1.5613
2.1000 1.2099
2.1300 0.8568
2.1600 0.5546
2.1900 0.3281
2.2200 0.1774
2.2500 0.0876
2.2800 0.0396
2.3100 0.0163
2.3400 0.0062
2.3700 0.0000
2.4000 0.0000
2.4300 0.0000
2.4600 0.0000
2.4900 0.0000
2.5200 0.0000
2.5500 0.0000
2.5800 0.0000
2.6100 0.0000
2.6400 0.0000
2.6700 0.0000
2.7000 0.0000
2.7300 0.0000
2.7600 0.0000
2.7900 0.0000
2.8200 0.0000
2.8500 0.0000
2.8800 0.0000
2.9100 0.0000
2.9400 0.0000
2.9700 0.0000
3.0000 0.0000
#! FIELDS x probs
#! SET min_x 0.0
#! SET max_x 3.0
#! SET nbins_x 101
#! SET periodic_x false
0.0000 0.0000
0.0300 0.0000
0.0600 0.0000
0.0900 0.0000
0.1200 0.0000
0.1500 0.0000
0.1800 0.0000
0.2100 0.0000
0.2400 0.0000
0.2700 0.0000
0.3000 0.0000
0.3300 0.0000
0.3600 0.0000
0.3900 0.0000
0.4200 0.0000
0.4500 0.0000
0.4800 0.0000
0.5100 0.0000
0.5400 0.0000
0.5700 0.0000
0.6000 0.0000
0.6300 0.0000
0.6600 0.0000
0.6900 0.0000
0.7200 0.0000
0.7500 0.0000
0.7800 0.0000
0.8100 0.0000
0.8400 0.0000
0.8700 0.0000
0.9000 0.0000
0.9300 0.0000
0.9600 0.0000
0.9900 0.0000
1.0200 0.0000
1.0500 0.0000
1.0800 0.0000
1.1100 0.0000
1.1400 0.0027
1.1700 0.0077
1.2000 0.0199
1.2300 0.0469
1.2600 0.1008
1.2900 0.1979
1.3200 0.3553
1.3500 0.5829
1.3800 0.8740
1.4100 1.1975
1.4400 1.4997
1.4700 1.7165
1.5000 1.7954
1.5300 1.7165
1.5600 1.4997
1.5900 1.1975
1.6200 0.8756
1.6500 0.5877
1.6800 0.3684
1.7100 0.2307
1.7400 0.1755
1.7700 0.2027
1.8000 0.3169
1.8300 0.5250
1.8600 0.8262
1.8900 1.1981
1.9200 1.5931
1.9500 1.9362
1.9800 2.1505
2.0100 2.1830
2.0400 2.0253
2.0700 1.7172
2.1000 1.3307
2.1300 0.9424
2.1600 0.6100
2.1900 0.3609
2.2200 0.1951
2.2500 0.0964
2.2800 0.0435
2.3100 0.0180
2.3400 0.0068
2.3700 0.0000
2.4000 0.0000
2.4300 0.0000
2.4600 0.0000
2.4900 0.0000
2.5200 0.0000
2.5500 0.0000
2.5800 0.0000
2.6100 0.0000
2.6400 0.0000
2.6700 0.0000
2.7000 0.0000
2.7300 0.0000
2.7600 0.0000
2.7900 0.0000
2.8200 0.0000
2.8500 0.0000
2.8800 0.0000
2.9100 0.0000
2.9400 0.0000
2.9700 0.0000
3.0000 0.0000
x: DISTANCE ATOMS=1,2
RESTRAINT ARG=x SLOPE=1.0 AT=0.0
HISTOGRAM ...
ARG=x
TEMP=300
GRID_MIN=0.0
GRID_MAX=3.0
GRID_BIN=100
BANDWIDTH=0.1
GRID_WFILE=histoA
FMT=%8.4f
RUN=1
... HISTOGRAM
HISTOGRAM ...
ARG=x
TEMP=300
GRID_MIN=0.0
GRID_MAX=3.0
GRID_BIN=100
BANDWIDTH=0.1
GRID_WFILE=histoB
FMT=%8.4f
REWEIGHT_BIAS
RUN=1
... HISTOGRAM
2
0 0 0
X 0 0 0
X 0 0 1
2
0 0 0
X 0 0 0
X 0 0 1.5
2
0 0 0
X 0 0 0
X 0 0 2
......@@ -222,9 +222,9 @@ void Analysis::calculate(){
double energy=plumed.getAtoms().getEnergy()+bias;
// Reweighting because of temperature difference
ww=-( (1.0/rtemp) - (1.0/simtemp) )*(energy+bias) / plumed.getAtoms().getKBoltzmann();
// Reweighting because of biases
if( !biases.empty() ) ww += bias/( plumed.getAtoms().getKBoltzmann()*simtemp );
}
// Reweighting because of biases
if( !biases.empty() ) ww += bias/( plumed.getAtoms().getKBoltzmann()*simtemp );
if(single_run){
// Get the arguments and store them in a vector of vectors
......
......@@ -256,8 +256,6 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
int rr=sizeof(real);
p.cmd("setRealPrecision",&rr);
int checknatoms=-1;
int plumedStopCondition=0;
p.cmd("setStopFlag",&plumedStopCondition);
int step=0;
if(Communicator::initialized()){
if(multi){
......@@ -327,7 +325,7 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
while(true){
if(!noatoms){
if(!Tools::getline(fp,line)) break;
} else if ( plumedStopCondition ) break;
}
int natoms;
bool first_step=false;
......@@ -421,7 +419,9 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
}
}
int plumedStopCondition=0;
p.cmd("setStep",&step);
p.cmd("setStopFlag",&plumedStopCondition);
if(!noatoms){
if(trajectory_fmt=="xyz"){
if(!Tools::getline(fp,line)) error("premature end of trajectory file");
......@@ -559,6 +559,8 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
fprintf(fp_forces,fmt.c_str(),forces[3*i],forces[3*i+1],forces[3*i+2]);
}
if(noatoms && plumedStopCondition) break;
step+=stride;
}
p.cmd("runFinalJobs");
......
......@@ -289,11 +289,11 @@ void PlumedMain::cmd(const std::string & word,void*val){
CHECK_NOTINIT(initialized,word);
CHECK_NULL(val,word);
log.open(static_cast<char*>(val),"w");
// other commands that should be used after initialization:
} else if(word=="setStopFlag"){
CHECK_NOTINIT(initialized,word);
CHECK_INIT(initialized,word);
CHECK_NULL(val,word);
stopFlag=static_cast<int*>(val);
// other commands that should be used after initialization:
} else if(word=="getExchangesFlag"){
CHECK_INIT(initialized,word);
CHECK_NULL(val,word);
......
......@@ -7,7 +7,7 @@
PLUMED does not yet have any automatic configuration procedure and most of the
decisions should be taken by the user. As a first step configure with the command:
\verbatim
> ./configure
> ./configure.sh
\endverbatim
You will have to choose among a set of available preconfigured files.
......
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