PLUMED error +++ at OFile.cpp:296

640 views
Skip to first unread message

Zahra Mazhar

unread,
Feb 12, 2022, 8:51:54 PM2/12/22
to PLUMED users
Hello,

Does anyone know what this error, shown below, means?

WARNING: IFile closed in the middle of reading. seems strange!

terminate called after throwing an instance of 'PLMD::Plumed::ExceptionError'

  what():

+++ PLUMED error

+++ at OFile.cpp:296, function void PLMD::OFile::backupFile(const std::basic_string<char, std::char_traits<char>, std::allocator<char>> &, const std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)

+++ message follows +++

cannot backup file histo_theta_contacts maximum number of backup is 101

I would appreciate the help!


Best regards,

Zahra

Zahra Mazhar

unread,
Feb 16, 2022, 10:56:11 AM2/16/22
to PLUMED users
So I figured out the way to avoid the error by adding this line to my bash script :

export PLUMED_MAXBACKUP=-1

but now it is suppressing all back ups and the same file is getting updated each time the file needs to be updated. Is there a way to avoid the same file getting updated and instead getting the back up files so that I can plot the correct FES ?

regards,
Zahra

Michele Invernizzi

unread,
Feb 16, 2022, 11:45:10 AM2/16/22
to plumed...@googlegroups.com
Dear  Zahra,

What are you trying to do exactly? Can you share your input files?
Probably there is a way to achieve the same result without using so many backup files.

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/bc4e1b16-cb20-4d10-b46d-b120b12106b0n%40googlegroups.com.

Zahra Mazhar

unread,
Feb 16, 2022, 12:28:43 PM2/16/22
to PLUMED users
Hello Michele, 
Thanks for the reply. Here is my plumed script

##########################

#vim:ft=plumed

MOLINFO STRUCTURE=5es4_orig.pdb


# Making protein whole

WHOLEMOLECULES  RESIDUES=129-317 MOLTYPE=protein


#Defining groups that will be required

wat: GROUP NDX_FILE=index.ndx NDX_GROUP=TIP3

prot: GROUP NDX_FILE=index.ndx NDX_GROUP=Protein

mg: GROUP NDX_FILE=index.ndx NDX_GROUP=MG

sod: GROUP NDX_FILE=index.ndx NDX_GROUP=SOD

cla: GROUP NDX_FILE=index.ndx NDX_GROUP=CLA


#collective variables

alpha: READ FILE=COLVAR.rw VALUES=alpha IGNORE_TIME

beta: READ FILE=COLVAR.rw VALUES=beta IGNORE_TIME

abpsi: READ FILE=COLVAR.rw VALUES=abpsi IGNORE_TIME

abphi: READ FILE=COLVAR.rw VALUES=abphi IGNORE_TIME

abchi: READ FILE=COLVAR.rw VALUES=abchi IGNORE_TIME

dihall: READ FILE=COLVAR.rw VALUES=dihall IGNORE_TIME

abchiA7: READ FILE=COLVAR.rw VALUES=abchiA7 IGNORE_TIME

dihhvy: READ FILE=COLVAR.rw VALUES=dihhvy IGNORE_TIME

contacts: READ FILE=COLVAR.rw VALUES=contacts IGNORE_TIME

theta: READ FILE=COLVAR.rw VALUES=theta IGNORE_TIME

gyr: READ FILE=COLVAR.rw VALUES=gyr IGNORE_TIME

closed: READ FILE=COLVAR.rw VALUES=closed IGNORE_TIME

open: READ FILE=COLVAR.rw VALUES=open IGNORE_TIME

prog: READ FILE=COLVAR.rw VALUES=prog IGNORE_TIME

dist: READ FILE=COLVAR.rw VALUES=dist IGNORE_TIME


phe295_all: GROUP NDX_FILE=index.ndx NDX_GROUP=phe295

phe295_com: COM ATOMS=phe295_all

phe295_dist: DISTANCE ATOMS=phe295_com,3013


PRINT ARG=alpha,beta,abpsi,abphi,dihall,abchi,abchiA7,dihhvy,theta,gyr,contacts,closed,open,dist,phe295_dist FILE=COLVAR_check

mm: READ FILE=COLVAR.rw VALUES=mm.bias IGNORE_TIME


bias: REWEIGHT_METAD ARG=mm.bias TEMP=310

PRINT ARG=bias FILE=reweight


HISTOGRAM ...

 ARG=theta,contacts

 GRID_MIN=0,0

 GRID_MAX=126,134

 GRID_BIN=200,200

 LABEL=hh_theta_contacts

 LOGWEIGHTS=bias

 KERNEL=DISCRETE

... HISTOGRAM


HISTOGRAM ...

 ARG=theta,gyr

 GRID_MIN=0,-58

 GRID_MAX=126,63

 GRID_BIN=200,200

 LABEL=hh_theta_gyr

 LOGWEIGHTS=bias

 KERNEL=DISCRETE

... HISTOGRAM



CONVERT_TO_FES GRID=hh_theta_contacts LABEL=FES_theta_contacts TEMP=310

DUMPGRID GRID=FES_theta_contacts FILE=fes_theta_contacts_rw.dat STRIDE=1

DUMPGRID GRID=hh_theta_contacts FILE=histo_theta_contacts  STRIDE=1 FMT=%24.16e


CONVERT_TO_FES GRID=hh_theta_gyr LABEL=FES_theta_gyr TEMP=310

DUMPGRID GRID=FES_theta_gyr FILE=fes_theta_gyr_rw.dat STRIDE=1

DUMPGRID GRID=hh_theta_gyr FILE=histo_theta_gyr STRIDE=1 FMT=%24.16e


#traj_cc: COLLECT_FRAMES ARG=alpha,beta,abpsi,abphi,dihall,abchi,abchiA7,dihhvy,theta,gyr,contacts,closed,open,dist,dist,phe295 LOGWEIGHTS=bias STRIDE=1


UPDATE_IF ARG=theta MORE_THAN=0.75 LESS_THAN=1.0

DUMPATOMS ATOMS=prot,mg FILE=well_1.xyz

UPDATE_IF ARG=theta END


UPDATE_IF ARG=theta MORE_THAN=2.3 LESS_THAN=2.7

DUMPATOMS ATOMS=prot,mg FILE=well_2.xyz

UPDATE_IF ARG=theta END


##########################

Also the job script file is also pasted below:

##########################

# Load the "gromacs" module

module load  GROMACS/2020.4-intel-2020u2-PLUMED-2.7.0


export PLUMED_MAXBACKUP=-1


# Metadynamics Metainference

plumed driver --plumed plumed_mnm_v8_rw.dat --mf_xtc mnm_concat_trj.xtc --kt 2.577483 --mc mcfile --timestep 0.002 

##########################

Thanks again for your help!

regards,
Zahra

Michele Invernizzi

unread,
Feb 16, 2022, 3:58:52 PM2/16/22
to plumed...@googlegroups.com
Dear  Zahra,

I am not sure what your goal is, but have you considered changing each `STRIDE=1` into something like `STRIDE=1000` ? In this way you will have much fewer intermediate files. 

If instead you really need each of these intermediate files, you could split your COLVAR.rw into smaller files with say less than 100 lines (you would have to keep a copy of the header line in each one). Then you can run the post processing multiple times, rename the backedup files and combine the results.

Hope this helps.

Best,
Michele

Zahra Mazhar

unread,
Feb 16, 2022, 5:17:48 PM2/16/22
to plumed...@googlegroups.com
That’s great!! Thank you so much for your help. I will do that. 

From: plumed...@googlegroups.com <plumed...@googlegroups.com> on behalf of Michele Invernizzi <michele.i...@fu-berlin.de>
Sent: Wednesday, February 16, 2022 2:58:36 PM
To: plumed...@googlegroups.com <plumed...@googlegroups.com>
Subject: Re: [plumed-users] Re: PLUMED error +++ at OFile.cpp:296
 
Reply all
Reply to author
Forward
0 new messages