Error in using csg_call command

103 views
Skip to first unread message

Sanjeet Singh

unread,
Sep 9, 2022, 3:06:40 PM9/9/22
to votca
Hi Christoph,

I am trying to convert the bonded potential to LAMMPS table. For this, i am using the  following command:

csg_call --ia-type bond --ia-name bond-AB --options bond.xml convert_potential lammps --clean input_bond-AB.pot  table_AB.xvg

I am able to get the final output file table_AB.xvg.

But, i am not able to understand the following lines on TERMINAL.

csg_get_property: No value for 'cg.inverse.scriptpath' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_property: returning emtpy value for 'cg.inverse.scriptpath'
We are using Sim Program: lammps
Running subscript 'potential_to_lammps.sh --clean input_bond-AB.pot ./TABLE/table_AB.xvg' (from tags convert_potential lammps) dir /usr/share/votca/scripts/inverse
Convert input_bond-AB.pot to ./TABLE/table_AB.xvg
csg_get_interaction_property: No value for 'inverse.lammps.table_bins' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_bins'
csg_get_interaction_property: No value for 'inverse.lammps.table_begin' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_begin'
csg_get_interaction_property: No value for 'inverse.lammps.table_end' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_end'
csg_get_interaction_property: No value for 'inverse.lammps.scale' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: value for 'inverse.lammps.scale' from /usr/share/votca/xml/csg_defaults.xml: 1
csg_get_interaction_property: No value for 'inverse.lammps.y_scale' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: value for 'inverse.lammps.y_scale' from /usr/share/votca/xml/csg_defaults.xml: 1
Running critical command 'mktemp input_bond-AB.pot.smooth.XXXXX'
Running critical command 'csg_resample --in input_bond-AB.pot --out input_bond-AB.pot.smooth.I7rqa --grid 0:0.001:1.0'
Running critical command 'mktemp input_bond-AB.pot.extrapol.XXXXX'
csg_get_interaction_property: No value for 'inverse.lammps.table_left_extrapolation' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_left_extrapolation'
csg_get_interaction_property: No value for 'inverse.lammps.table_right_extrapolation' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_right_extrapolation'
Running subscript 'potential_extrapolate.sh --clean --type bond input_bond-AB.pot.smooth.I7rqa input_bond-AB.pot.extrapol.IjNh9' (from tags potential extrapolate) dir /usr/share/votca/scripts/inverse
Extrapolate input_bond-AB.pot.smooth.I7rqa to input_bond-AB.pot.extrapol.IjNh9
Running critical command 'mktemp input_bond-AB.pot.smooth.I7rqa.onlyleft.XXXXX'
Running subscript 'table_extrapolate.pl --function linear --avgpoints 3 --region left input_bond-AB.pot.smooth.I7rqa input_bond-AB.pot.smooth.I7rqa.onlyleft.FDhHj' (from tags table extrapolate) dir /usr/share/votca/scripts/inverse
table_extrapolate.pl: extrapolating the left using linear with gradient -2509.86163466666
Running subscript 'table_extrapolate.pl --function linear --avgpoints 3 --region right input_bond-AB.pot.smooth.I7rqa.onlyleft.FDhHj input_bond-AB.pot.extrapol.IjNh9' (from tags table extrapolate) dir /usr/share/votca/scripts/inverse
table_extrapolate.pl: extrapolating the right using linear with gradient 2241.54540033333
Running critical command 'mktemp input_bond-AB.pot.interpol.XXXXX'
Running critical command 'mktemp input_bond-AB.pot.deriv.XXXXX'
Running critical command 'csg_resample --in input_bond-AB.pot.extrapol.IjNh9 --out input_bond-AB.pot.interpol.LyEum --grid 0:0.001:1.0 --der input_bond-AB.pot.deriv.TAbSL --comment Created on Fri Sep  9 03:02:09 PM EDT 2022 by sanjeetsingh@fedora
called from potential_to_lammps.sh, version 2022-dev
settings file: '/home/sanjeetsingh/Documents/SANJEET-PEO/PEO-TRIAL/MAPPING-TRIAL/RDF-GENERATION/BONDED-POTENTIAL/bond.xml'
working directory: /home/sanjeetsingh/Documents/SANJEET-PEO/PEO-TRIAL/MAPPING-TRIAL/RDF-GENERATION/BONDED-POTENTIAL'
Running critical command 'mktemp input_bond-AB.pot.shift.XXXXX'
Running subscript 'potential_shift.pl --type bond input_bond-AB.pot.interpol.LyEum input_bond-AB.pot.shift.moz4C' (from tags potential shift) dir /usr/share/votca/scripts/inverse
Running subscript 'table_to_tab.pl --header lammps --type bond input_bond-AB.pot.shift.moz4C input_bond-AB.pot.deriv.TAbSL ./TABLE/table_AB.xvg' (from tags convert_potential tab) dir /usr/share/votca/scripts/inverse

I mean, am i doing any mistake?

I am attaching my bond.xml file here.

Can you please help me with this.

Thank you.

Sanjeet 









bond.xml

Christoph Junghans

unread,
Sep 9, 2022, 6:34:03 PM9/9/22
to vo...@googlegroups.com
Is there an error? I don't see any error message above.
Just have a look at table_AB.xvg. The output above is mainly, so you
can see all the sub steps that have done.

In short lines starting with "csg_get_interaction_property" read
values from your xml file (or use the default if empty)
Line with "Running subscript .." run a sub step e.g. interpolation,
extrapolation

Christoph

>
> I am attaching my bond.xml file here.
>
> Can you please help me with this.
>
> Thank you.
>
> Sanjeet
>
>
>
>
>
>
>
>
>
> --
> 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/f13d79c3-fcf7-4f7d-b608-01546106f1b2n%40googlegroups.com.



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

Sanjeet Singh

unread,
Sep 9, 2022, 9:01:10 PM9/9/22
to vo...@googlegroups.com
Hi Christoph,

Thank you for your prompt response. Actually, i am not able to understand the following lines:

csg_get_interaction_property: No value for 'inverse.lammps.table_bins' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_bins'
csg_get_interaction_property: No value for 'inverse.lammps.table_begin' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_begin'

I have given the values of table_bins, table_begin, in my bond.xml file. But, i don't think csg_call is reading these values from there. And same is the case for lammps.scale and lammps.y_scale. Why csg_call is taking the default values, if the values for these parameters are already given in bond.xml file.

And furthermore, what is the meaning of scriptpath in the following lines.

csg_get_property: No value for 'cg.inverse.scriptpath' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_property: returning emtpy value for 'cg.inverse.scriptpath'

Thank you.

Sanjeet





--
Sanjeet Kumar Singh
Postdoctoral Fellow
LPCM Lab.
University De Sherbrooke
Sherbrooke, Canada.

bond.xml

Christoph Junghans

unread,
Sep 9, 2022, 10:42:55 PM9/9/22
to vo...@googlegroups.com
On Fri, Sep 9, 2022 at 7:01 PM Sanjeet Singh <sanje...@gmail.com> wrote:
Hi Christoph,

Thank you for your prompt response. Actually, i am not able to understand the following lines:

csg_get_interaction_property: No value for 'inverse.lammps.table_bins' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_bins'
csg_get_interaction_property: No value for 'inverse.lammps.table_begin' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_interaction_property: returning emtpy value for 'inverse.lammps.table_begin'
  

I have given the values of table_bins, table_begin, in my bond.xml file. But, i don't think csg_call is reading these values from there. And same is the case for lammps.scale and lammps.y_scale. Why csg_call is taking the default values, if the values for these parameters are already given in bond.xml file.

The table properties etc are an per-interaction property (hence the line with csg_get_interaction_property instead of csg_get_property)
So for VOTCA to read it you will have to move that part of the <lammps> block inside the <bond> block, e.g.
<bond>
   <name>foo</name>
   <lammps>
      <table_bins>0.01</table_bins>
  </lammps>
</bond>

 

And furthermore, what is the meaning of scriptpath in the following lines.

csg_get_property: No value for 'cg.inverse.scriptpath' found in bond.xml, trying /usr/share/votca/xml/csg_defaults.xml
csg_get_property: returning emtpy value for 'cg.inverse.scriptpath'
VOTCA has the option to use user-provided scripts, e.g. you can use your own custom interpolation script, and the script path would be the place where you would put them.
For standard usage, this is ok to be empty.
  
Christoph

Sanjeet Singh

unread,
Sep 10, 2022, 12:13:56 PM9/10/22
to votca
Hi Christoph,

I have moved my <lammps> block inside the <bond> block. But again, i am getting the following error.

ERROR:                                                                                                                                                                #
# csg_get_interaction_property: Could not get 'max' for interaction with name 'bond-AB' from bond.xml and no default was found in /usr/share/votca/xml/csg_defaults.xml #
# Details can be found above

And, if i am setting the min, max, and step value, as shown in my bond.xml file, THEN the <lammps> block is not read again, and i am getting the following error.

ERROR:                                                                                                                                                        #
# do_external: subscript                                                                                                                                        #
# /usr/share/votca/scripts/inverse/table_to_tab.pl --header lammps --type bond input_bond-AB.pot.shift.dq5Vy input_bond-AB.pot.deriv.JWRcY ./table/table_AB.xvg #
# (from tags convert_potential tab) failed                                                                                                                      #
# Details can be found above  

I am attaching all my files here for your reference.
bond.xml
input_bond-AB.pot

Sanjeet Singh

unread,
Sep 10, 2022, 12:23:32 PM9/10/22
to votca
Hi,

Can you please check my bond.xml file? if everything is correct there.

Christoph Junghans

unread,
Sep 10, 2022, 9:39:40 PM9/10/22
to vo...@googlegroups.com
On Sat, Sep 10, 2022 at 10:23 AM Sanjeet Singh <sanje...@gmail.com> wrote:
Hi,

Can you please check my bond.xml file? if everything is correct there.
Sorry the entry VOTCA is looking for inverse.lammps.table_bins, and you (and I in my example) missed the <inverse> indentation of the block, try:
<bond>
   <name>foo</name>
   <inverse>
     <lammps>
        <table_bins>0.01</table_bins>
    </lammps>
  </inverse>
</bond>

Also if you set table_begin, table_bins and table_end to the same values as min, step and max respectively, it is kind of pointless to set them.

Christoph

Sanjeet Singh

unread,
Sep 11, 2022, 4:28:12 PM9/11/22
to votca
Hi Christoph,

I followed your suggestion, but again i am getting the following error:

ERROR:                                                                                               #
# potential_to_lammps.sh: cg.inverse.program was not set to 'lammps', but 'gromacs' (mind the default) #

# Details can be found above  

The bond.xml script which i am using is shown below:

<cg>
  <bonded>
    <!-- name of the interaction -->
    <name>bond-AB</name>
    <min>0.20</min>
    <max>0.361</max>
    <step>0.001</step>
    <inverse>
       <program>lammps</program>
       <!--<lammps>-->
        <!-- name of the table for lammps run -->
        <table>CG-BOND-AB.pot</table>
        <!-- nm to angstrom -->
        <scale>10</scale>
        <!-- kJ/mol to kcal/mol -->
        <y_scale>0.239006</y_scale>
        <table_begin>0.20</table_begin>
        <table_end>0.361</table_end>
        <table_bins>0.001</table_bins>
       <!--</lammps>-->
    </inverse>
  </bonded>
</cg>

And i am using the following command:

csg_call --ia-type bond --ia-name bond-AB --options bond.xml convert_potential lammps --clean input_bond-AB.pot table_AB.xvg


Just to keep you updated, i wish to get the bonded potential using boltzmann inversion. I am using the following command to get the bonded distribution:

 csg_boltzmann --top topology.xml --trj Trajectory2.dump --cg PEO-10.xml < boltzmann_cmds

Then, i am using the following command to get the bonded potential:

csg_boltzmann --top topology.xml --trj Trajectory2.dump --cg PEO-10.xml < boltzmann_cmds

Then, i am using the following command for smoothening of the potentials:

csg_call --sloppy-tables table smooth bond.pot.ib input_bond.pot

And finally, the following command to convert the bonded potential to LAMMPS tables form. It is at this point where I am getting the error.

csg_call --ia-type bond --ia-name bond-AB --options bond.xml convert_potential lammps --clean input_bond-AB.pot table_AB.xvg

Also, can you please explain this part: "Also if you set table_begin, table_bins and table_end to the same values as min, step and max respectively, it is kind of pointless to set them". I mean the difference between min and table_begin, max and table_end.

Sorry, for my ignorance and long post.

Thank you.

Sanjeet

Christoph Junghans

unread,
Sep 11, 2022, 8:15:18 PM9/11/22
to vo...@googlegroups.com
On Sun, Sep 11, 2022 at 2:28 PM Sanjeet Singh <sanje...@gmail.com> wrote:
Hi Christoph,

I followed your suggestion, but again i am getting the following error:

ERROR:                                                                                               #
# potential_to_lammps.sh: cg.inverse.program was not set to 'lammps', but 'gromacs' (mind the default) #
# Details can be found above  

The bond.xml script which i am using is shown below:

<cg>
  <bonded>
    <!-- name of the interaction -->
    <name>bond-AB</name>
    <min>0.20</min>
    <max>0.361</max>
    <step>0.001</step>
    <inverse>
       <program>lammps</program>
Well the cg.inverse.program is NOT an interaction property, but a global one, you will have to leave that line in the block below.
Think about it is this way, bond.xml could contain multiple interaction and all interaction properties (csg_get_interaction_property) are inside a <bond> or <non-bonded> block and these can be different for each interaction, while the global properties (csg_get_property) live in the <cg> block out side of the <bond> block.

The output will tell if it is a global property (line starts with csg_get_property) or an interaction specific one (csg_get_interaction_property).

       <!--<lammps>-->
        <!-- name of the table for lammps run -->
        <table>CG-BOND-AB.pot</table>
        <!-- nm to angstrom -->
        <scale>10</scale>
        <!-- kJ/mol to kcal/mol -->
        <y_scale>0.239006</y_scale>
        <table_begin>0.20</table_begin>
        <table_end>0.361</table_end>
        <table_bins>0.001</table_bins>
       <!--</lammps>-->
    </inverse>
  </bonded>
</cg>

And i am using the following command:

csg_call --ia-type bond --ia-name bond-AB --options bond.xml convert_potential lammps --clean input_bond-AB.pot table_AB.xvg


Just to keep you updated, i wish to get the bonded potential using boltzmann inversion. I am using the following command to get the bonded distribution:

 csg_boltzmann --top topology.xml --trj Trajectory2.dump --cg PEO-10.xml < boltzmann_cmds

Then, i am using the following command to get the bonded potential:

csg_boltzmann --top topology.xml --trj Trajectory2.dump --cg PEO-10.xml < boltzmann_cmds

Then, i am using the following command for smoothening of the potentials:

csg_call --sloppy-tables table smooth bond.pot.ib input_bond.pot

And finally, the following command to convert the bonded potential to LAMMPS tables form. It is at this point where I am getting the error.

csg_call --ia-type bond --ia-name bond-AB --options bond.xml convert_potential lammps --clean input_bond-AB.pot table_AB.xvg
That looks fine, I think you can also do
$ csg_call --ia-type bond --ia-name bond-AB --options bond.xml prepare_single ibi
to do the same. And provide the to be inverted distribution in the inverse.target interaction property of the xml file.

For iterative boltzmann inversion csg_inverse will also do boltzmann inversion in the initial step as well.
Bonded interactions are always a bit flaky, so doing it manually might be better.

 

Also, can you please explain this part: "Also if you set table_begin, table_bins and table_end to the same values as min, step and max respectively, it is kind of pointless to set them". I mean the difference between min and table_begin, max and table_end.
In most cases you want to do a boltzmann inversion on a certain range (where the distribution is >0), but then write out a table that is much longer (up to the interaction cutoff) or finer grained (finer table_bins than the bin size you want to the inversion on - for statistics reasons), hence VOTC has both.
 
Christoph

Sanjeet Singh

unread,
Sep 12, 2022, 3:57:13 PM9/12/22
to votca
Hi Christoph,

Thank you for your suggestions. Now, I am able to get the LAMMPS table.

But, now I have some other doubt regarding the min, max, table_begin, and table_end.

I am trying to get the potential for a bond using csg_boltzmann. The distribution function for this bond obtained using csg_boltzmann shows values ranging from 0.292337 to 0.351548.

Now, I am using the bond distribution obtained in the last step to get the bonded potential. Again here, the min and max values used in the boltzmann_cmds file is similar to the boundary values obtained from bonded distribution file i.e. 0.292337 to 0.351548.

Then, I am converting the bonded potential to lammps table using the bond.xml script shown below:  

<cg>
  <bonded>
    <!-- FIRST BOND TYPE -->
    <name>bond-AB</name>
    <min>0.300337</min>     
    <max>0.343548</max>
    <step>0.001</step>
    <inverse>
       <lammps>

        <!-- name of the table for lammps run -->
        <table>CG-BOND-AB.pot</table>
        <!-- nm to angstrom -->
        <scale>10</scale>
        <!-- kJ/mol to kcal/mol -->
        <y_scale>0.239006</y_scale>
        <table_begin>0.2</table_begin>   
        <table_end>0.35</table_end>
        <table_bins>0.001</table_bins>
       </lammps>
    </inverse>
  </bonded>
  <inverse>
       <program>lammps</program>       
  </inverse>
</cg>

Here, i have used the min as 0.300337 (0.292337 + 0.008) and max as (0.351548 - 0.008) to leave room for interpolation . Is this correct?

Or, am I setting some incorrect values here?

Thank you.

Sanjeet 

Christoph Junghans

unread,
Sep 12, 2022, 4:25:04 PM9/12/22
to vo...@googlegroups.com
On Mon, Sep 12, 2022 at 1:57 PM Sanjeet Singh <sanje...@gmail.com> wrote:
Hi Christoph,

Setting min and max is more art than anything else, you will have to play with that a bit and see.

Also your step with 0.001 is very tiny and hopefully you have enough statistics in the histogram, so it is smooth. Otherwise the extrapolation might be problematic.

Christoph
 
Reply all
Reply to author
Forward
0 new messages