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

Replaces @multi with @replicas

As requested by @gtribello (see #221)
parent 855a6f3f
No related branches found
No related tags found
No related merge requests found
...@@ -3,18 +3,18 @@ p1: POSITION ATOM=1 ...@@ -3,18 +3,18 @@ p1: POSITION ATOM=1
p2: POSITION ATOM=2 p2: POSITION ATOM=2
# different coefficients in different replicas # different coefficients in different replicas
f: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@multi:{{1,2,3} {0,0,0} {2,4,6}} PERIODIC=NO f: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@replicas:{{1,2,3} {0,0,0} {2,4,6}} PERIODIC=NO
PRINT ARG=f FILE=colvar PRINT ARG=f FILE=colvar
# equivalent syntax: # equivalent syntax:
#g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@multi:{{1,2,3} {1,0,3} {1,4,3}} PERIODIC=NO #g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@replicas:{{1,2,3} {1,0,3} {1,4,3}} PERIODIC=NO
g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS={1 @multi:{2 0 4} 3} PERIODIC=NO g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS={1 @replicas:{2 0 4} 3} PERIODIC=NO
PRINT ARG=g FILE=colvarg PRINT ARG=g FILE=colvarg
# different arguments in different replicas # different arguments in different replicas
PRINT ARG=@multi:{d,p1.x,p2.x} FILE=multi PRINT ARG=@replicas:{d,p1.x,p2.x} FILE=multi
# typical umbrella sampling stuff # typical umbrella sampling stuff
RESTRAINT ARG=d AT=@multi:{1,2,3} KAPPA=100 RESTRAINT ARG=d AT=@replicas:{1,2,3} KAPPA=100
...@@ -220,7 +220,7 @@ bool Tools::getKey(vector<string>& line,const string & key,string & s,int rep){ ...@@ -220,7 +220,7 @@ bool Tools::getKey(vector<string>& line,const string & key,string & s,int rep){
string tmp=(*p).substr(key.length(),(*p).length()); string tmp=(*p).substr(key.length(),(*p).length());
line.erase(p); line.erase(p);
s=tmp; s=tmp;
const std::string multi("@multi:"); const std::string multi("@replicas:");
if(rep>=0 && startWith(s,multi)){ if(rep>=0 && startWith(s,multi)){
s=s.substr(multi.length(),s.length()); s=s.substr(multi.length(),s.length());
std::vector<std::string> words=getWords(s,"\t\n ,"); std::vector<std::string> words=getWords(s,"\t\n ,");
......
...@@ -155,7 +155,7 @@ bool Tools::parseVector(std::vector<std::string>&line,const std::string&key,std: ...@@ -155,7 +155,7 @@ bool Tools::parseVector(std::vector<std::string>&line,const std::string&key,std:
for(unsigned i=0;i<words.size();++i){ for(unsigned i=0;i<words.size();++i){
T v; T v;
std::string s=words[i]; std::string s=words[i];
const std::string multi("@multi:"); const std::string multi("@replicas:");
if(rep>=0 && startWith(s,multi)){ if(rep>=0 && startWith(s,multi)){
s=s.substr(multi.length(),s.length()); s=s.substr(multi.length(),s.length());
std::vector<std::string> words=getWords(s,"\t\n ,"); std::vector<std::string> words=getWords(s,"\t\n ,");
......
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