Relative entropy error in votca

29 views
Skip to first unread message

SAYAN DUTTA

unread,
Apr 18, 2024, 8:05:16 PMApr 18
to votca
Hi, I am facing a trouble for running re, I am trying to use relative entropy framework for liquid methanol (single site coarse grained model), I am getting this error after 2nd iteration
table_average.sh: averaging with awk failed
CG-simulation-with-REM/step_001/A-A.param.cur.9Dv5'
x-value mismatch 0.03125 vs.  0.03  in line 2
Based on this error can you please suggest me any possible mistakes>
I tried with the tutorial of spce, it worked fine. But this error I am getting for other systems like methanol.
Please let me know possible solutions of this problem

Christoph Junghans

unread,
Apr 18, 2024, 8:30:46 PMApr 18
to vo...@googlegroups.com
A mismatch in x value usually hints at a problem in your settings.xml
file, or one of the input files is at a different spacing.
Hard to say, I would try to delete step_000 and step_001 and start over.

Christoph
>
> --
> Join us on Slack: https://join.slack.com/t/votca/signup
> ---
> You received this message because you are subscribed to the Google Groups "votca" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to votca+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/b1bc18b7-8382-4c41-a65e-fc79e212b1cen%40googlegroups.com.



--
Christoph Junghans
Web: http://www.compphys.de

SAYAN DUTTA

unread,
Apr 20, 2024, 8:10:09 PMApr 20
to votca
Hi Christoph, Thank you so much for your reply, I tried to figure it out by couple of possible ways, but failing for unknown reasons. Just trying to understand a couple of viewpoints in terms of working with the relative entropy based framework with votca--
1. In the tutorial of spce/re with gromacs I found table.xvg which I need to copy at every folder though for running simulation I only need table_CG_CG.xvg(obtained from RE iterations), then what is the exact role of the extra table?
2. Do I need to take any special care for setting my Intial guess, I was apperntly extrapolating the pair potential to get CG-CG.param.init, Do I need to follow any specific way to get the initial guess parameters
3. Based on the current implementaion of re in votca, can I employ this for more than one non-bonded interactions?
Please help me with this details

Christoph Junghans

unread,
Apr 20, 2024, 8:21:34 PMApr 20
to vo...@googlegroups.com
On Sat, Apr 20, 2024 at 6:10 PM SAYAN DUTTA <sayan0...@gmail.com> wrote:
>
> Hi Christoph, Thank you so much for your reply, I tried to figure it out by couple of possible ways, but failing for unknown reasons. Just trying to understand a couple of viewpoints in terms of working with the relative entropy based framework with votca--
> 1. In the tutorial of spce/re with gromacs I found table.xvg which I need to copy at every folder though for running simulation I only need table_CG_CG.xvg(obtained from RE iterations), then what is the exact role of the extra table?
Older versions of Gromacs needed that table for all interactions that
weren't covered by the energy group pairs listed in the mdp, even if
the rest group was empty. I believe gromacs 2019 can do without it.

> 2. Do I need to take any special care for setting my Intial guess, I was apperntly extrapolating the pair potential to get CG-CG.param.init, Do I need to follow any specific way to get the initial guess parameters
Yes, these are just the parameter from a fit of the PMF to the tabulated form.

> 3. Based on the current implementaion of re in votca, can I employ this for more than one non-bonded interactions?
Yes, see the methanol-water/X_* examples.

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/3188da5a-fa07-456a-8a82-94f9c593418fn%40googlegroups.com.

SAYAN DUTTA

unread,
Apr 22, 2024, 2:41:46 PMApr 22
to votca
Hi Cristoph, I want to ask you this second question once again, because based on the implementation of relative entropy it seems quite important to start with initial_guess properly
I did this part as following way:
settings.xml file

<cg>

  <non-bonded>
    <name>CG-CG</name>
    <type1>CG</type1>
    <type2>CG</type2>
    <min>0</min>
    <max>1.5</max>
    <step>0.01</step>
    <force>true</force>
  </non-bonded>

</cg>
So this is giving me the potential of mean force- CG-CG.force.new by csg_stat (PMF)
Then I am using CSG_resample as follows:
csg_resample --in CG-CG.force.new --out CG-CG.param.init --grid 0:0.02:1.5
But I am very much doubtful in this way of doing it, because apparently csg_resample can do the linear extrapolation in non-sampled region, but non-bonded interactions entry can be extrapolated asymptotically with some other functions if I am thinking correctly. This will be very much helpful to me if you mark some hints in my way of estimating the initial guess because with this obtained intitial guess I am encountering the problem like negative Hessian matrix, which is failing with further iterations

Christoph Junghans

unread,
Apr 22, 2024, 4:58:59 PMApr 22
to vo...@googlegroups.com
On Mon, Apr 22, 2024 at 11:41 AM SAYAN DUTTA <sayan0...@gmail.com> wrote:
>
> Hi Cristoph, I want to ask you this second question once again, because based on the implementation of relative entropy it seems quite important to start with initial_guess properly
> I did this part as following way:
> settings.xml file
>
> <cg>
>
> <non-bonded>
> <name>CG-CG</name>
> <type1>CG</type1>
> <type2>CG</type2>
> <min>0</min>
> <max>1.5</max>
> <step>0.01</step>
> <force>true</force>
> </non-bonded>
>
> </cg>
> So this is giving me the potential of mean force- CG-CG.force.new by csg_stat (PMF)
> Then I am using CSG_resample as follows:
> csg_resample --in CG-CG.force.new --out CG-CG.param.init --grid 0:0.02:1.5
> But I am very much doubtful in this way of doing it, because apparently csg_resample can do the linear extrapolation in non-sampled region, but non-bonded interactions entry can be extrapolated asymptotically with some other functions if I am thinking correctly. This will be very much helpful to me if you mark some hints in my way of estimating the initial guess because with this obtained intitial guess I am encountering the problem like negative Hessian matrix, which is failing with further iterations
For preparation of the potential see: https://www.votca.org/csg/preparing.html
Just to clarify the param.init files contain the spline parameters or
parameter of the <function>, just for cbspl it is similar to the
forces.

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/b152ce64-3f2e-4df1-b021-edede931e9a5n%40googlegroups.com.

SAYAN DUTTA

unread,
Apr 23, 2024, 2:58:43 PMApr 23
to vo...@googlegroups.com
Thank you Christoph, this seems to be working, but I am trying to apply pressure correction with the potentials obtained from relative entropy. I assume since works same like ibi, I added the pressure correction with settings.xml file as follows :
<inverse>
      <!-- target distribution (rdf), just give gromacs rdf.xvg -->
      <target>CG-CG.dist.tgt</target>
      <!-- target pressure -->
       <p_target>1.0</p_target>
       <!-- update cycles -->
       <do_potential>0 1 0</do_potential>
       <!-- additional post processing of dU before added to potential-->
       <post_update>scale pressure smooth</post_update>
       <post_update_options>
         <scale>0.5</scale>
         <pressure>
           <type>simple</type>
           <do>1 0 1</do>
           <simple>
             <scale>0.001</scale>
           </simple>
         </pressure>
          <smooth>
         <iterations>5</iterations>
         </smooth>
       </post_update_options> 

with this I am encountering a error like this : calc_pressure_gromacs.sh: Gromacs tpr file 'topol.tpr' not found
can you please help me with the possible modifications based on this error



Christoph Junghans

unread,
Apr 23, 2024, 4:53:16 PMApr 23
to vo...@googlegroups.com
Not a 100% sure, can you post your inverse.log?

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/CAKQ31qnLFDf8vB9sUp%2B%3Dxh1KEhcsg7b5JLj05QS-%3DU3Tfz1bhg%40mail.gmail.com.

SAYAN DUTTA

unread,
Apr 23, 2024, 5:52:48 PMApr 23
to votca
Here is the part of inverse.log which is throwing the error:
For all non-bonded
for_all: run 'do_external post_update_single re' for interaction named 'CG-CG'
Running subscript 'post_update_re_single.sh' (from tags post_update_single re) dir /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse
csg_get_property: No value for 'cg.inverse.restart_file' found in /home/sdutta/Project/CG-simulation-with-REM/settings.xml, trying /home/sdutta/Softwares/votca-2024/share/votca/xml/csg_defaults.xml
csg_get_property: value for 'cg.inverse.restart_file' from /home/sdutta/Softwares/votca-2024/share/votca/xml/csg_defaults.xml: restart_points.log
Postupd tasks for CG-CG: scale pressure smooth
Doing postupd task 'scale' for 'CG-CG'
Running critical command 'mv CG-CG.pot.new CG-CG.pot.1'
Running subscript 'postupd_scale.sh CG-CG.pot.1 CG-CG.pot.new' (from tags postupd scale) dir /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse
scaling potential for CG-CG update by factor 0.5
Running subscript 'table_linearop.pl CG-CG.pot.1 CG-CG.pot.new 0.5 0' (from tags table linearop) dir /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse
table_linearop.pl: CG-CG.pot.1 to CG-CG.pot.new with y' = 0.5*y + 0
Doing postupd task 'pressure' for 'CG-CG'
Running critical command 'mv CG-CG.pot.new CG-CG.pot.2'
Running subscript 'postupd_pressure.sh CG-CG.pot.2 CG-CG.pot.new' (from tags postupd pressure) dir /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse
csg_get_property: No value for 'cg.inverse.gromacs.g_energy.topol' found in /home/sdutta/Project/CG-simulation-with-REM/settings.xml, trying /home/sdutta/Softwares/votca-2024/share/votca/xml/csg_defaults.xml
csg_get_property: returning emtpy value for 'cg.inverse.gromacs.g_energy.topol'
csg_get_property: No value for 'cg.inverse.gromacs.topol' found in /home/sdutta/CG-simulation-with-REM/settings.xml, trying /home/sdutta/Softwares/votca-2024/share/votca/xml/csg_defaults.xml
csg_get_property: value for 'cg.inverse.gromacs.topol' from /home/sdutta/Softwares/votca-2024/share/votca/xml/csg_defaults.xml: topol.tpr

Callstack:
/home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/inverse.sh - linenumber 161
    do_external - linenumber 182 in /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/functions_common.sh
        /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/prepare_re.sh - linenumber 40
            critical - linenumber 4 (see 'csg_call --cat function critical')
                do_external - linenumber 19 (see 'csg_call --cat function do_external')
                    /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/post_update_generic.sh - linenumber 31
                        for_all - linenumber 22 (see 'csg_call --cat function for_all')
                                do_external - linenumber 19 (see 'csg_call --cat function do_external')
                                    /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/post_update_re_single.sh - linenumber 44
                                        do_external - linenumber 19 (see 'csg_call --cat function do_external')
                                            /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/postupd_pressure.sh - linenumber 44
                                                do_external - linenumber 19 (see 'csg_call --cat function do_external')
                                                    /home/sdutta/Softwares/votca-2024/share/votca/scripts/inverse/calc_pressure_gromacs.sh - linenumber 34
                                                        die - linenumber 2 (see 'csg_call --cat function die')
########################################################################################################################################
#                                                                                                                                      #
# ERROR:                                                                                                                               #
# calc_pressure_gromacs.sh: Gromacs tpr file 'topol.tpr' not found                                                                     #
# For details see the logfile /home/sdutta/Project/CG-simulation-with-REM/inverse.log #
#                                                                                                                                      #
########################################################################################################################################
die: (called from 3578195)  CSG_MASTER_PID is 3576660
die: pids to kill: 3576660 3577748 3577924 3578030 3578044 3578133 3578195

Christoph Junghans

unread,
Apr 23, 2024, 5:55:30 PMApr 23
to vo...@googlegroups.com
On Tue, Apr 23, 2024 at 2:52 PM SAYAN DUTTA <sayan0...@gmail.com> wrote:
>
> Here is the part of inverse.log which is throwing the error:
Send the full file, I want to look at the output to run_gromacs.sh as
well above the error as well.

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/22248e8b-0d0c-4463-8879-ae2890e11662n%40googlegroups.com.

SAYAN DUTTA

unread,
Apr 23, 2024, 6:22:35 PMApr 23
to vo...@googlegroups.com
Here with I am attaching inverse.log and settings.xml file.

inverse.log
settings.xml

Christoph Junghans

unread,
Apr 23, 2024, 7:02:33 PMApr 23
to vo...@googlegroups.com
On Tue, Apr 23, 2024 at 3:22 PM SAYAN DUTTA <sayan0...@gmail.com> wrote:
>
> Here with I am attaching inverse.log and settings.xml file.
Thanks, I understand the error, but it seems nobody has ever done
relative entropy with pressure correction, hence it is not
implemented.
I think the way you could make that work is to do one iteration
without pressure correction and then change the settings file and add
it back.
Use at your own risk!

Christoph
> To view this discussion on the web visit https://groups.google.com/d/msgid/votca/CAKQ31qnWboZ2dPQ%2Bb7rgEC3HO5OpYxf-WzkpFY18-17kMDvZRw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages