Segmentation fault of using plumed driver

863 views
Skip to first unread message

William Hsu

unread,
Sep 30, 2020, 10:54:41 PM9/30/20
to PLUMED users
Dear PLUMED users,
I was trying to follow this tutorial to perform block analysis on my previously run metadynamics simulations. To use the plumed driver, I wrote plumed_analysis.dat as attached. The only difference between this file and plumed.dat (the input file of the previous metadynamics) was that in plumed_analysis.dat I used the RESTART keyword and a very large pace in an attempt to recover the final bias of the simulation. I then used the command: plumed driver --plumed plumed_analysis.dat --mf_xtc sys1.xtc and got a segmentation fault. I'm sorry if this is a naive question, but from the output message I was unable to tell why this was happening. Could anyone please provide me some suggestions for solving this? Thank you! 

The output message is here
DRIVER: Found molfile format trajectory xtc with name sys1.xtc
PLUMED: PLUMED is starting
PLUMED: Version: 2.7.0-dev (git: feebaa620) compiled on Sep 8 2020 at 
19:18:18
PLUMED: Please cite these papers when using PLUMED [1][2]
PLUMED: For further information see the PLUMED web page at http://www.plumed.org
PLUMED: Root: /home/wei-tse/Documents/Software/PLUMED/plumed2/
PLUMED: For installed feature, see /home/wei-tse/Documents/Software/PLUMED/plumed2//src/config/config.txt
PLUMED: Molecular dynamics engine: driver
PLUMED: Precision of reals: 8
PLUMED: Running over 1 node
PLUMED: Number of threads: 1
PLUMED: Cache line size: 512
PLUMED: Number of atoms: 661
PLUMED: File suffix:
PLUMED: FILE: plumed_analysis.dat
PLUMED: Action RESTART
PLUMED:  with label @0
PLUMED:  MD code didn't require restart
PLUMED:  Switching on restart
PLUMED:  Restarting simulation: files will be appended
PLUMED: Action EXTRACV
PLUMED:  with label lambda
PLUMED:  name: lambda
PLUMED: Action METAD
PLUMED:  with label metad
PLUMED:  with arguments lambda
PLUMED:  added component to this action: metad.bias
PLUMED:  Gaussian width 0.010000 Gaussian height 0.500000
PLUMED:  Gaussian deposition pace 10000000
PLUMED:  Gaussian file HILLS_LAMBDA
PLUMED:  Well-Tempered Bias Factor 50.000000
PLUMED:  Hills relaxation time (tau) 2428155511.684000
PLUMED:  KbT 2.477710
PLUMED:  Grid min 0
PLUMED:  Grid max 5
PLUMED:  Grid bin 5
PLUMED:  Grid uses spline interpolation
PLUMED:  added component to this action: metad.work
PLUMED:  WARNING: Using a METAD with a Grid Spacing larger than half of the Gaussians width can produce artifacts
PLUMED:  WARNING: Using a METAD with a Grid Spacing larger than half of the Gaussians width can produce artifacts
PLUMED:  Restarting from HILLS_LAMBDA:   250000 Gaussians read   
PLUMED:  Bibliography [3][4]
PLUMED: Action PRINT
PLUMED:  with label @3
PLUMED:  with stride 1
PLUMED:  with arguments lambda metad.bias
PLUMED:  on file COLVAR
PLUMED:  with format %f
PLUMED: END FILE: plumed_analysis.dat
PLUMED: Timestep: 1.000000
PLUMED: KbT has not been set by the MD engine
PLUMED: It should be set by hand where needed
PLUMED: Relevant bibliography:
PLUMED:  [1] The PLUMED consortium, Nat. Methods 16, 670 (2019)    
PLUMED:  [2] Tribello, Bonomi, Branduardi, Camilloni, and Bussi, Comput. Phys. Commun. 185, 604 (2014)
PLUMED:  [3] Laio and Parrinello, PNAS 99, 12562 (2002)
PLUMED:  [4] Barducci, Bussi, and Parrinello, Phys. Rev. Lett. 100, 020603 (2008)
PLUMED: Please read and cite where appropriate!
PLUMED: Finished setup
Segmentation fault (core dumped)

Best,
Wei-Tse

William Hsu

unread,
Sep 30, 2020, 10:56:00 PM9/30/20
to PLUMED users
Sorry I forgot to attach plumed_analysis.dat.

Here is the content of the file:
RESTART  # read old Gaussians deposited on HILLS file

lambda: EXTRACV NAME=lambda

METAD ...
ARG=lambda
SIGMA=0.01
HEIGHT=0.5
PACE=10000000  # longer than the simulation length so no hills will be 
added
GRID_MIN=0
GRID_MAX=5
GRID_BIN=5
TEMP=298
BIASFACTOR=50
LABEL=metad
FILE=HILLS_LAMBDA
... METAD

PRINT STRIDE=1 ARG=lambda,metad.bias FILE=COLVAR

William Hsu 在 2020年9月30日 星期三下午8:54:41 [UTC-6] 的信中寫道:

Giovanni Bussi

unread,
Oct 1, 2020, 3:20:10 PM10/1/20
to plumed...@googlegroups.com
HI!

The EXTRACV action is only going to work on the fly. In post processing you should pass it’s value to plumed separately, e.g. using the READ action and a properly formatted file that contains the time series of the extra cv stored with the correct pace (typically the same as the frames in the xtc you are reading).

Given this, segfault is not what should happen.. I will fix the code so that it reports a meaningful error in this case.

thanks!

Giovanni

--


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/7298501c-6e72-40ab-b22f-b2ffa516ac91n%40googlegroups.com.


--
Sent from Gmail mobile

William Hsu

unread,
Oct 1, 2020, 9:06:40 PM10/1/20
to PLUMED users
Hi Dr. Bussi, 
Thank you for your reply! To understand the READ action, I wrote plumed_test.dat to read in my COLVAR file from the previous metadynamics run. The content of plumed_test.dat is as follows:
lambda: READ FILE=COLVAR VALUES=lambda EVERY=100
PRINT STRIDE=1 ARG=lambda FILE=COLVAR_test
And I used the command: plumed driver --plumed plumed_test.dat --mf_xtc sys1.xtc 

My metadynamics run was done by GROMACS with PLUMED, in which dt=0.002 (ps) and the frequency of logging the data in the .xtc file was 1000 steps (so 2 ps). The simulation length was 5 ns, so there were only 2501 data points in the simulation trajectory, which was much less than the number of data points in the COLVAR file (250001 data points). Since my stride of writing the COLVAR file was 10 steps, I set the value of the parameter EVERY in plumed_test.dat as 100. To my understanding, I thought this should allow PLUMED to read the COLVAR file every 100 lines, which was 100 * 10 steps or every 2 ps, same as the printing frequency of my xtc file. However, I got the following error: 
+++ PLUMED error
+++ at Action.cpp:243, function void PLMD::Action::error(const string&) const
+++ message follows +++
ERROR in input to action READ with label lambda : mismatched times in colvar files : colvar time=0.04 plumed time=2. Add IGNORE_TIME to ignore error.
Aborted (core dumped)

Although using IGNORE_TIME or adding --timestep 0.02 at the end of my command didn't return any error, in COLVAR_test (the output file of the command), only the first 2501 data points were printed, instead of 2501 points corresponding to the data points every 2 ps (or 100 lines) in the original COLVAR file. Therefore, I don't think this is the right way to solve the problem. I guess I'm not sure what the "colvar time" and "plumed time" in the error message was referring to. Could you please give me some hints for solving this issue? Also, just to make sure, since I am just retrieving the final bias from the simulation, I guess I could safely use IGNORE_FORCES. Is this correct? 

Thank you so much for your help!

Best,
Wei-Tse


giovann...@gmail.com 在 2020年10月1日 星期四下午1:20:10 [UTC-6] 的信中寫道:

Giovanni Bussi

unread,
Oct 2, 2020, 6:12:45 PM10/2/20
to plumed...@googlegroups.com
Hi,

concerning IGNORE_FORCES, yes you can use it.

Concerning EVERY, it should skip lines while reading, so I am surprised that in your case it reads the first 2501 lines. To quickly have something that works, you can just manually (or with awk) remove the proper lines from the colvar files. However, I would be happy if you can provide a minimal example where EVERY doesn't work since there might be a bug

Thanks!

Giovanni


William Hsu

unread,
Oct 5, 2020, 4:11:23 AM10/5/20
to PLUMED users
Hi Dr. Bussi,
I'm sorry for the late reply! In the link here, I have attached three files that should reproduce the issue, including COLVAR, plumed_test.dat and COLVAR_test. Given COLVAR, running the command plumed driver --plumed plumed_test.dat --mf_xtc sys1.xtc should output COLVAR_test. As can be seen in COLVAR_test, the 2500 data points in the file are the first 2500 data points in COLVAR, which just shows the issue that the keyword EVERY did not work.  Thank you so much for your help!

Best,
Wei-Tse

giovann...@gmail.com 在 2020年10月2日 星期五下午4:12:45 [UTC-6] 的信中寫道:

Giovanni Bussi

unread,
Oct 5, 2020, 5:40:44 PM10/5/20
to plumed...@googlegroups.com
Hi,

I cannot run your test without the sys1.xtc file

Giovanni


William Hsu

unread,
Oct 5, 2020, 5:55:58 PM10/5/20
to PLUMED users
Hi Dr. Bussi,
Sorry for my carelessness! I've added sys1.xtc to the shared folder. Thanks!
Best,
Wei-Tse

giovann...@gmail.com 在 2020年10月5日 星期一下午3:40:44 [UTC-6] 的信中寫道:

Giovanni Bussi

unread,
Oct 7, 2020, 2:55:15 AM10/7/20
to plumed...@googlegroups.com
Hi,

I should have fixed the issue in branches v2.5 v2.6 and master (will be in the next releases as well).

In particular: EVERY was only working when used with the `driver --noatoms` keyword. Now it is also working with a real trajectory (see https://github.com/plumed/plumed2/issues/619)

Giovanni


Giovanni


William Hsu

unread,
Oct 8, 2020, 1:20:12 PM10/8/20
to PLUMED users
Sounds good. Thanks a lot for the help!

Best,
Wei-Tse

giovann...@gmail.com 在 2020年10月7日 星期三上午12:55:15 [UTC-6] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages