OPES restart error

152 views
Skip to first unread message

BMK

unread,
Feb 14, 2023, 5:26:42 AM2/14/23
to PLUMED users
Dear PLUMED users/developers,

I'm trying to restart an OPES simulation, but I get the following error:

PLUMED: Action OPES_METAD
PLUMED:   with label opes
PLUMED:   with arguments diff
PLUMED:   added component to this action:  opes.bias
PLUMED:   RESTART - make sure all used options are compatible
PLUMED:     restarting from: PREVSTATE
PLUMED:     it should be a STATE file (not a KERNELS file)
WARNING: IFile closed in the middle of reading. seems strange!
PLUMED:
PLUMED:
PLUMED: ################################################################################
PLUMED:
PLUMED:
PLUMED: +++ PLUMED error
PLUMED: +++ at IFile.cpp:207, function PLMD::IFile& PLMD::IFile::scanField()
PLUMED: +++ assertion failed: fields[i].read
PLUMED: +++ message follows +++
PLUMED: field action was not read: all the fields need to be read otherwise you could miss important infos
PLUMED:
PLUMED: ################################################################################

I'm using PLUMED 2.8.0 together with CP2K 2022.1. Attached are the full output and the relevant files to restart the simulation.

With kind Regards,
Bas
plumed.dat
plumed.out
PREVSTATE

Michele Invernizzi

unread,
Feb 14, 2023, 8:26:34 AM2/14/23
to plumed...@googlegroups.com
Dear Bas,

I think the error is due to the fact that in the file PREVSTATE multiple states are stored. You should provide only the state you want to use for restart. If that is the last one stored, you could do something like 
tac PREVSTATE |awk '{print $0;if ($2=="FIELDS") exit}'|tac > LAST_STATE
and then use LAST_STATE file for the restart

Best,
Michele

--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/e2982cc8-f149-4167-8c0c-eca7706c808dn%40googlegroups.com.

BMK

unread,
Feb 14, 2023, 9:37:05 AM2/14/23
to PLUMED users
Dear Michele,

Thanks for the quick reply! The resubmitted job is still pending, but when I test using the LAST_STATE file with the plumed driver it now works, so thank you for that. I first copied this section manually, but somehow I did something wrong since I recieved the same error. If the error persists when the simulation starts I'll send another reply.

Besides this I have three other questions, if you don't mind. The first two are just out of curiosity, the third one is more related to my research.
  1. In the OPES_METAD section of the manual it is mentioned that one can sample a flat target distrubition and that this is in some very specific cases. What kind of cases would this be?
  2. It is also mentioned that if one of the minima is much lower than the others, that one should start the simulation from there. Why is that so?
  3. Because I'm performing AIMD simulations, the total simulation time is quite limited. Would it make sense to first do a short ordinary/untempered MTD simulation in order to quickly fill the minima, and then switch to OPES to smoothen the FES using the MTD bias as a static bias (append this to EXTRA_BIAS)? Or wouldn't this approach quicken the FES convergence?
Besides that, it would be nice if there was a file-based multiple walkers implementation of OPES_METAD since this would allow one to use multiple walkers OPES in CP2K. However, I don't know how much work or feasible this would be (I can't write c++).

Thanks again for your answer.

Regards,
Bas
Op dinsdag 14 februari 2023 om 14:26:34 UTC+1 schreef Michele Invernizzi:

Michele Invernizzi

unread,
Feb 15, 2023, 3:59:00 PM2/15/23
to plumed...@googlegroups.com
Dear Bas,

Sure, I am always happy to answer questions about OPES :)
  1. Generally speaking, a well-tempered target distribution leads to better convergence and to higher sampling efficiency when reweighting. One might want to use a different target distribution e.g. to gather more samples from the transition region. A uniform distribution would be better than a well-tempered one in this case. But one can do even better and define a custom target, as shown in an example in the doc.
  2. This was an empirical observation from my tests. Intuitively by starting from the most stable basin the initial guess of the FES will be closer to the correct one, making the self consistent procedure converge faster.
  3. I don't think having an initial METAD run would help. OPES_METAD is typically faster than METAD at filling the basins, if the BARRIER parameter is high enough. Due to how OPES works, it should not be slowed down by the depth of the basin, but only by the suboptimality of the CV. Thus having an initial static bias should not help. What you can try is to use OPES_METAD_EXPLORE, which (similarly to METAD) is more forgiving on the quality of the CV. In my experience, OPES_METAD_EXPLORE was still faster than METAD to converge a FES (see here, Fig.4b), but this might change depending on how well the hyperparameters of the two methods are tuned.
In principle it is possible to have a file-based version of multiple walkers also for OPES, but it does require writing quite some code, and I don't know when I will have time to do it. Also, probably it would be better if CP2K was to implement MPI support...

Best,
Michele

Qinghua Liao

unread,
Feb 21, 2023, 6:46:27 PM2/21/23
to PLUMED users
Hello Bas,

Just comment on the OPES_METAD with multiple walkers, not sure about your system, maybe you can try to run the simulations with Gromacs 2022.3 /CP2K/PLUMED 2.8.1,
then you can use OPES_METAD with multiple walkers. Right now, I am testing it.


All the best,
Qinghua

BMK

unread,
Mar 1, 2023, 8:48:41 AM3/1/23
to PLUMED users


Dear Michele and Qinghua,

Sorry for my late response, but thank you for your replies!

@Michele:
Those are some interesting remarks. I found that the CV that I used was somewhat degenerate regarding the product state (besides being suboptimal), which might (partly) explain why some of my OPES tests didn’t work out for some systems.
I’m primarly interested in the transition mechanism towards the product state(s) in kinetically controlled reactions, and therefore I guess I would like to sample mostly the reactant and transition states. Would this be easily applicable in OPES with a custom target, or is my best option to sample the WT target distribution?
Besides that I would like to try the adaptive path CV, and I think in order to converge the initial path I would either need METAD or OPES_METAD_EXPLORE.

@Qinghua
Oh that’s a clever idea! I’m curious to know whether you succeeded in this, given you had the time. I knew you could do QM/MM in GROMACS/CP2K, but I didn’t think of providing GROMACS with a fully QM CP2K input.

With kind regards,

Bas

Op woensdag 22 februari 2023 om 00:46:27 UTC+1 schreef Qinghua Liao:
Reply all
Reply to author
Forward
0 new messages