Problem with extrapolation for bonds

34 views
Skip to first unread message

Saeed Norouzi

unread,
Aug 4, 2023, 4:18:28 AM8/4/23
to vo...@googlegroups.com
Dear Christoph and Votca users,


I have an annoying problem with the bonded interactions in my coarse grained model. mainly its because of the bond potential which lets the bond length > table cut off in my lammps simulations.  as far as I know the potential that I get from the votca seems smooth enough (to not have high values for forces in lammps simulations), but I get a weird extrapolation for both ends. I have attached the picture of bond energy, the bond target distribution and also the .xml for the  bond. I would really appreciate your help with this.

 <cg>

<!--Bond Part -->

  <bonded>
    <!-- name of the interaction -->
    <name>bond.1</name>
    <min>3.39</min>
    <max>3.84</max>
    <step>0.001</step>
    <inverse>
      <!-- target distribution -->
      <target>bond.1.dist.tgt</target>
      <do_potential>1</do_potential>
   <lammps>
        <table>table_b1.xvg</table>
        <table_begin>0.0001</table_begin>
        <table_end>5</table_end>
        <table_bins>0.0001</table_bins>
   </lammps>
    </inverse>
  </bonded>Figure_1.png
bond.1.dist.tgt

Christoph Junghans

unread,
Aug 4, 2023, 11:31:40 AM8/4/23
to vo...@googlegroups.com
On Fri, Aug 4, 2023 at 02:18 Saeed Norouzi <norou...@gmail.com> wrote:
Dear Christoph and Votca users,


I have an annoying problem with the bonded interactions in my coarse grained model. mainly its because of the bond potential which lets the bond length > table cut off in my lammps simulations.  as far as I know the potential that I get from the votca seems smooth enough (to not have high values for forces in lammps simulations), but I get a weird extrapolation for both ends. I have attached the picture of bond energy, the bond target distribution and also the .xml for the  bond. I would really appreciate your help with this.
i saw that issue before, try to make range smaller by increasing min and decreasing the max, that hopefully helps to get the slop and hence the extrapolation right.

Christoph



 <cg>

<!--Bond Part -->

  <bonded>
    <!-- name of the interaction -->
    <name>bond.1</name>
    <min>3.39</min>
    <max>3.84</max>
    <step>0.001</step>
    <inverse>
      <!-- target distribution -->
      <target>bond.1.dist.tgt</target>
      <do_potential>1</do_potential>
   <lammps>
        <table>table_b1.xvg</table>
        <table_begin>0.0001</table_begin>
        <table_end>5</table_end>
        <table_bins>0.0001</table_bins>
   </lammps>
    </inverse>
  </bonded>Figure_1.png

--
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/CAJZjMJYrs%3DyvnHDgB3RVJkxDPqM3mDOFP9-h4NrfZ9j%3DyoZmqA%40mail.gmail.com.
--
Christoph Junghans
Web: http://www.compphys.de

Saeed Norouzi

unread,
Aug 9, 2023, 4:56:51 AM8/9/23
to vo...@googlegroups.com
Dear Christoph,

Thank you for your reply. making the range smaller did not help me. Still the same problem, but I tried to use the higher step size and it helps with the extrapolation a little bit (the wrong extrapolation happens less frequently, also using different extrapolation functions improves it). I have another problem with the dihedrals. My target distribution for dihedrals is not periodic (means the both ends are not same -pi and pi). I have the setting for the dihedrals below. Do you know how I can fix this problem? By the way, I a, using  votca/gcc/single/dev-25Jan19.

    <bonded>
        <name>dihedral.1</name>
        <min>-3.1415</min>
        <max>3.1415</max>
        <step>0.02</step>
    </bonded>
    <bonded>
        <name>dihedral.2</name>
        <min>-3.1415</min>
        <max>3.1415</max>
        <step>0.01</step>
    </bonded>
    <bonded>
        <name>dihedral.3</name>
        <min>-3.1415</min>
        <max>3.1415</max>
        <step>0.02</step>
    </bonded>
Screenshot from 2023-08-09 10-56-13.png

Screenshot from 2023-08-09 10-55-39.png

dihedral.1.dist.new

Christoph Junghans

unread,
Aug 9, 2023, 9:02:46 AM8/9/23
to vo...@googlegroups.com


On Wed, Aug 9, 2023, 02:56 Saeed Norouzi <norou...@gmail.com> wrote:
Dear Christoph,

Thank you for your reply. making the range smaller did not help me. Still the same problem, but I tried to use the higher step size and it helps with the extrapolation a little bit (the wrong extrapolation happens less frequently, also using different extrapolation functions improves it). I have another problem with the dihedrals. My target distribution for dihedrals is not periodic (means the both ends are not same -pi and pi). I have the setting for the dihedrals below. Do you know how I can fix this problem? By the way, I a, using  votca/gcc/single/dev-25Jan19.
If that stands for 25 Jan 2019, I think you will need to update first. We had a couple of dihedral improvements in the meanwhile and it is hard to work around bugs in old versions.

Christoph


Saeed Norouzi

unread,
Aug 9, 2023, 12:31:57 PM8/9/23
to vo...@googlegroups.com
Dear  Christoph,

I am trying to install the new version, but there is an error with cmake --build builddir

[ 10%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/optionshandler.cc.o
[ 11%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/property.cc.o
[ 11%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/propertyiomanipulator.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/rangeparser.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/reducededge.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/reducedgraph.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/spline.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/table.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/thread.cc.o
[ 14%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/tokenizer.cc.o
[ 14%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/version.cc.o
[ 15%] Linking CXX shared library libvotca_tools.so
[ 15%] Built target votca_tools
[ 16%] Building CXX object tools/src/tools/CMakeFiles/votca_property.dir/votca_property.cc.o
[ 16%] Linking CXX executable votca_property
[ 16%] Built target votca_property
[ 16%] Building votca_property manpage
  File "/home/snorouzi/programs/VOTCA/votca/tools/scripts/votca_help2doc", line 34
    """
      ^
SyntaxError: invalid syntax
tools/src/tools/CMakeFiles/votca_property_manpage.dir/build.make:73: recipe for target 'tools/src/tools/votca_property.man' failed
gmake[2]: *** [tools/src/tools/votca_property.man] Error 1
CMakeFiles/Makefile2:1588: recipe for target 'tools/src/tools/CMakeFiles/votca_property_manpage.dir/all' failed
gmake[1]: *** [tools/src/tools/CMakeFiles/votca_property_manpage.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
gmake: *** [all] Error 2
[snorouzi@master VOTCA]

Christoph Junghans

unread,
Aug 9, 2023, 2:35:54 PM8/9/23
to vo...@googlegroups.com
On Wed, Aug 9, 2023 at 10:31 AM Saeed Norouzi <norou...@gmail.com> wrote:
Dear  Christoph,

I am trying to install the new version, but there is an error with cmake --build builddir

[ 10%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/optionshandler.cc.o
[ 11%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/property.cc.o
[ 11%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/propertyiomanipulator.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/rangeparser.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/reducededge.cc.o
[ 12%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/reducedgraph.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/spline.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/table.cc.o
[ 13%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/thread.cc.o
[ 14%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/tokenizer.cc.o
[ 14%] Building CXX object tools/src/libtools/CMakeFiles/votca_tools.dir/version.cc.o
[ 15%] Linking CXX shared library libvotca_tools.so
[ 15%] Built target votca_tools
[ 16%] Building CXX object tools/src/tools/CMakeFiles/votca_property.dir/votca_property.cc.o
[ 16%] Linking CXX executable votca_property
[ 16%] Built target votca_property
[ 16%] Building votca_property manpage
  File "/home/snorouzi/programs/VOTCA/votca/tools/scripts/votca_help2doc", line 34
    """
      ^
SyntaxError: invalid syntax
Hmm, something seems to be wrong with your python install...
Can you look at the output from the previous cmake command, which python was found?
You can also try to disable the manpage build with  -DBUILD_MANPAGES=OFF.

Christoph

 

Saeed Norouzi

unread,
Aug 10, 2023, 4:45:30 AM8/10/23
to vo...@googlegroups.com
Dear Christoph,

The problem was with the boots package on my machine. I turned off the DBUILD_MANPAGES, and the installation was successful, however, I cannot run my setting file for the same python error(below is the error from inverse.log). 
I think this is the same problem with DBUILD_MANPAGES, and my VOTCA is using python2.7 (the default version from the machine). How can I introduce the new version for python?  I already tried to change the version using (-DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.10) but did not word.

cmake -B builddir -S votca -DBUILD_XTP=OFF -DBUILD_MANPAGES=OFF \
-DCMAKE_INSTALL_PREFIX=${prefix} -DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT:PATHNAME=/home/snorouzi/programs/boost_1_82_0 \
-DBoost_LIBRARY_DIRS:STRING=/home/snorouzi/programs/boost_1_82_0/stage/lib \
-DBoost_INCLUDE_DIRS:PATH=/home/snorouzi/programs/boost_1_82_0 \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.10





csg_get_property: returning emtpy value for 'cg.non-bonded.inverse.imc.reg'
Running subscript 'check_csg_xml.py /data/snorouzi/data/ibi_PLA/VOTCA_newversion/settings.xml /home/snorouzi/programs/VOTCA/installdir/share/votca/xml/csg_defaults.xml' (from tags check csg_xml) dir /home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse
  File "/home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse/check_csg_xml.py", line 76
    child_path = f"{path}/{child.tag}"
                                     ^
SyntaxError: invalid syntax

Callstack:
/home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse/inverse.sh - linenumber 111
    do_external - linenumber 183 in /home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse/functions_common.sh


Christoph Junghans

unread,
Aug 10, 2023, 9:52:56 AM8/10/23
to vo...@googlegroups.com
On Thu, Aug 10, 2023 at 2:45 AM Saeed Norouzi <norou...@gmail.com> wrote:
Dear Christoph,

The problem was with the boots package on my machine. I turned off the DBUILD_MANPAGES, and the installation was successful, however, I cannot run my setting file for the same python error(below is the error from inverse.log). 
I think this is the same problem with DBUILD_MANPAGES, and my VOTCA is using python2.7 (the default version from the machine). How can I introduce the new version for python?  I already tried to change the version using (-DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.10) but did not word.

cmake -B builddir -S votca -DBUILD_XTP=OFF -DBUILD_MANPAGES=OFF \
-DCMAKE_INSTALL_PREFIX=${prefix} -DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT:PATHNAME=/home/snorouzi/programs/boost_1_82_0 \
-DBoost_LIBRARY_DIRS:STRING=/home/snorouzi/programs/boost_1_82_0/stage/lib \
-DBoost_INCLUDE_DIRS:PATH=/home/snorouzi/programs/boost_1_82_0 \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.10





csg_get_property: returning emtpy value for 'cg.non-bonded.inverse.imc.reg'
Running subscript 'check_csg_xml.py /data/snorouzi/data/ibi_PLA/VOTCA_newversion/settings.xml /home/snorouzi/programs/VOTCA/installdir/share/votca/xml/csg_defaults.xml' (from tags check csg_xml) dir /home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse
  File "/home/snorouzi/programs/VOTCA/installdir/share/votca/scripts/inverse/check_csg_xml.py", line 76
    child_path = f"{path}/{child.tag}"
This is a bit strange as check_csg_xml.py explicitly calls for python3:
Anyhow as a workaround just make there is a python3 in your path that points to your /usr/local/bin/python3.10.
E.g.
echo $PATH # pick a path
cd /home/christoph/.local/bin # e.g. this one
ln -s /usr/local/bin/python3.10 python3 # link it.

Christoph

Saeed Norouzi

unread,
Aug 10, 2023, 10:21:29 AM8/10/23
to vo...@googlegroups.com
Dear Christoph,

I just changed the python3 to python3.10 in the check_csg_xml.py script and it's working fine.

Thanks for the help, 


Christoph Junghans

unread,
Aug 10, 2023, 1:08:44 PM8/10/23
to vo...@googlegroups.com
On Thu, Aug 10, 2023 at 8:21 AM Saeed Norouzi <norou...@gmail.com> wrote:
Dear Christoph,

I just changed the python3 to python3.10 in the check_csg_xml.py script and it's working fine.
That works, too, just make sure to do the same for all other python scripts as well.

Christoph 
Reply all
Reply to author
Forward
0 new messages