Skip to content
Snippets Groups Projects
Commit 98ae4b1b authored by Max Bonomi's avatar Max Bonomi
Browse files

replaced ParseVector with Parse for NL options

parent 6d97c845
No related branches found
No related tags found
No related merge requests found
...@@ -71,14 +71,14 @@ serial(false) ...@@ -71,14 +71,14 @@ serial(false)
// neighbor list stuff // neighbor list stuff
bool doneigh=false; bool doneigh=false;
vector<double> nl_cut; double nl_cut=0.0;
vector<int> nl_st; int nl_st=0;
parseFlag("NLIST",doneigh); parseFlag("NLIST",doneigh);
if(doneigh){ if(doneigh){
parseVector("NL_CUTOFF",nl_cut); parse("NL_CUTOFF",nl_cut);
assert(nl_cut.size()==1); assert(nl_cut>0.);
parseVector("NL_STRIDE",nl_st); parse("NL_STRIDE",nl_st);
assert(nl_st.size()==1); assert(nl_st>0);
} }
checkRead(); checkRead();
...@@ -86,7 +86,7 @@ serial(false) ...@@ -86,7 +86,7 @@ serial(false)
addValueWithDerivatives(""); addValueWithDerivatives("");
getValue("")->setPeriodicity(false); getValue("")->setPeriodicity(false);
if(doneigh) nl= new NeighborList(ga_lista,gb_lista,dopair,pbc,getPbc(),nl_cut[0],nl_st[0]); if(doneigh) nl= new NeighborList(ga_lista,gb_lista,dopair,pbc,getPbc(),nl_cut,nl_st);
else nl= new NeighborList(ga_lista,gb_lista,dopair,pbc,getPbc()); else nl= new NeighborList(ga_lista,gb_lista,dopair,pbc,getPbc());
requestAtoms(nl->getFullAtomList()); requestAtoms(nl->getFullAtomList());
...@@ -107,7 +107,7 @@ serial(false) ...@@ -107,7 +107,7 @@ serial(false)
if(dopair) log.printf(" with PAIR option\n"); if(dopair) log.printf(" with PAIR option\n");
if(doneigh){ if(doneigh){
log.printf(" using neighbor lists with\n"); log.printf(" using neighbor lists with\n");
log.printf(" update every %d steps and cutoff %lf\n",nl_st[0],nl_cut[0]); log.printf(" update every %d steps and cutoff %lf\n",nl_st,nl_cut);
} }
} }
......
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