Skip to content

Commit f1965f9

Browse files
committed
bug in metadynamics parsing
1 parent 9681561 commit f1965f9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

psiflow/sampling/metadynamics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def __init__(
2626
_plumed_input = remove_comments_printflush(plumed_input)
2727
assert "METAD" in _plumed_input
2828
if "RESTART" not in _plumed_input:
29-
_plumed_input = "RESTART\n" + _plumed_input
29+
_plumed_input = "\nRESTART\n" + _plumed_input
3030
if "FLUSH" not in _plumed_input: # add at the end!
31-
_plumed_input = _plumed_input + "FLUSH STRIDE=1\nPRINT"
31+
_plumed_input = _plumed_input + "\nFLUSH STRIDE=1\nPRINT"
3232

3333
# PLUMED + WQ cannot deal with nonexisting hills files!
3434
if type(external) in [str, Path]:

tests/test_sampling.py

+1
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ def test_order_parameter(dataset):
448448
state = simulation_output.state.result()
449449
CV = state.order["CV"]
450450
assert state.energy is None
451+
assert np.all(np.isnan(state.per_atom.forces))
451452
assert np.allclose(CV, np.linalg.det(dataset[3].result().cell))
452453

453454
# test batch evaluation of order parameter

0 commit comments

Comments
 (0)