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

Merge branch 'v2.4'

parents 3549069a 0dd1e0ca
No related branches found
No related tags found
No related merge requests found
...@@ -252,4 +252,5 @@ For developers: ...@@ -252,4 +252,5 @@ For developers:
For users: For users:
- Fixed flag DETAILED_TIMERS in \ref DEBUG (flag was ignored and detailed timers always written). - Fixed flag DETAILED_TIMERS in \ref DEBUG (flag was ignored and detailed timers always written).
- Small fix in \ref DUMPMASSCHARGE (atoms are now correctly requested only at first step).
...@@ -95,10 +95,12 @@ class DumpMassCharge: ...@@ -95,10 +95,12 @@ class DumpMassCharge:
{ {
string file; string file;
bool first; bool first;
bool second;
public: public:
explicit DumpMassCharge(const ActionOptions&); explicit DumpMassCharge(const ActionOptions&);
~DumpMassCharge(); ~DumpMassCharge();
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
void prepare();
void calculate() {} void calculate() {}
void apply() {} void apply() {}
void update(); void update();
...@@ -119,7 +121,8 @@ DumpMassCharge::DumpMassCharge(const ActionOptions&ao): ...@@ -119,7 +121,8 @@ DumpMassCharge::DumpMassCharge(const ActionOptions&ao):
Action(ao), Action(ao),
ActionAtomistic(ao), ActionAtomistic(ao),
ActionPilot(ao), ActionPilot(ao),
first(true) first(true),
second(true)
{ {
vector<AtomNumber> atoms; vector<AtomNumber> atoms;
parse("FILE",file); parse("FILE",file);
...@@ -141,6 +144,13 @@ DumpMassCharge::DumpMassCharge(const ActionOptions&ao): ...@@ -141,6 +144,13 @@ DumpMassCharge::DumpMassCharge(const ActionOptions&ao):
requestAtoms(atoms); requestAtoms(atoms);
} }
void DumpMassCharge::prepare() {
if(!first && second) {
requestAtoms(vector<AtomNumber>());
second=false;
}
}
void DumpMassCharge::update() { void DumpMassCharge::update() {
if(!first) return; if(!first) return;
first=false; first=false;
......
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