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

Merge branch 'fix-228'

[makedoc]
parents cdec228a 14c57ab0
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ Changes from version 2.3 which are relevant for users:
to recover free energy also in this case.
- PDB files with more than 100k atoms can now be read using [hybrid 36](http://cci.lbl.gov/hybrid_36/) format,
see \issue{226}.
- Trajectories read in \ref driver also support the usual replica convention, that is if
trajectory with replica suffix is not found the driver will look for a trajectory without the replica suffix.
- Internal molfile implementation has been updated to VMD 1.9.3.
- Examples in the documentation now have syntax highlighting and links to the documentation of used actions.
......
#! FIELDS time d
0.000000 1.732051
#! FIELDS time d
0.000000 6.928203
include ../../scripts/test.make
mpiprocs=2
type=driver
# this is to test a different name
arg="--plumed plumed.dat --ixyz traj.xyz --multi 2"
d: DISTANCE ATOMS=1,2
PRINT ARG=d FILE=COLVAR
d: DISTANCE ATOMS=1,3
PRINT ARG=d FILE=COLVAR
3
0 0 0
Ar 1 2 3
Ar 2 3 4
Ar 5 6 7
......@@ -471,13 +471,6 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
p.cmd("setPlumedDat",plumedFile.c_str());
p.cmd("setLog",out);
if(multi) {
string n;
Tools::convert(intercomm.Get_rank(),n);
trajectoryFile=FileBase::appendSuffix(trajectoryFile,"."+n);
}
int natoms;
FILE* fp=NULL; FILE* fp_forces=NULL; OFile fp_dforces;
......@@ -488,6 +481,13 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
if (trajectoryFile=="-")
fp=in;
else {
if(multi) {
string n;
Tools::convert(intercomm.Get_rank(),n);
std::string testfile=FileBase::appendSuffix(trajectoryFile,"."+n);
FILE* tmp_fp=fopen(testfile.c_str(),"r");
if(tmp_fp) { fclose(tmp_fp); trajectoryFile=testfile.c_str();}
}
if(use_molfile==true) {
#ifdef __PLUMED_HAS_MOLFILE_PLUGINS
h_in = api->open_file_read(trajectoryFile.c_str(), trajectory_fmt.c_str(), &natoms);
......
......@@ -45,9 +45,8 @@ If you provide a file for each replica (e.g. plumed.0.dat, plumed.1.dat, etc) yo
setup plumed differently on each replica.
On the other hand, using a single plumed.dat will make all the replicas read the same file.
\warning This rule is true for almost all the files read by PLUMED. Current exceptions
are PDB files, where the replica suffix is not added, and trajectories read by \ref driver,
for which the replica suffix is always added.
\warning This rule is true for almost all the files read by PLUMED. As of
PLUMED version 2.4, the only exception is PDB files, where the replica suffix is not added.
Notice that when PLUMED adds the replica suffix, it recognizes the file extension and add the suffix _before_ the
extension. Before PLUMED 2.2, the only recognized suffix was ".gz". Since 2.2, any suffix with length
......
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