bonded interactions

75 views
Skip to first unread message

Chandan Choudhury

unread,
Oct 9, 2013, 12:42:42 PM10/9/13
to vo...@googlegroups.com
Dear votca users,

I would like to share my experience regarding the iteration of bonded interactions.

I prefer to use the following script for iterating the bonds:

For the first iteration, I used the tabulated potentials generated from the csg_boltzmann. Upon its completion, I used the following scripts:

#!/bin/sh
    i_in=1
    if [ "$#" -ne 0 ]; then
     echo  $#
     cd step_00$i_in
     echo  `pwd`
     mkdir tables
     mv $1.bond.pot.cur $1.bond.pot.cur_I
     sed -e '1,4d' -e 's/$/ i/' $1.bond.pot.new | tac | sed -e '1,3d' | tac > $1.bond.cut

     source /opt/apps/votca/1.2.3/bin/VOTCARC.bash
     source /opt/apps/gmx/single/463/bin/GMXRC
     csg_call table smooth $1.bond.cut $1.bond.smooth
     csg_resample --in $1.bond.smooth --out $1.bond.refined --grid 0::0.001:0.5
     csg_call table extrapolate --function quadratic $1.bond.refined $1.bond.pot.cur
     csg_call --ia-type bonded --ia-name $1.bond --options ../convert.xml  convert_potential gromacs

     cd ..
     rm 'done'
     i_c=`expr $i_in + 1`
     sed -i s/iterations_max\>$i_in/iterations_max\>$i_c/  settings.xml
     sh run.sh
   fi


The i_in is the variable which is the iteration step.
These commands generate tabulated potentials for the bond type. Then this tabulated potential is the input for the next iteration. (What I did was I stopped the the iteration with the simulation by gromacs starts. Then copy the tabulated potential for the earlier step and again execute run.sh)

The above script comes into picture if there is bad sampled region in the new potential. The bad sampled region is manually identified and the values goes as an input in the sed command. The region is cut and then other commands follow. I use 1.2.3 for this purpose and 1.3-dev gets sourced in the run.sh.
Here, I iterated one bond and then 2nd and so on.

The same procedure is followed for generating optimized potentials for angles.

#!/bin/sh
    i_in=3
    if [ "$#" -ne 0 ]; then
     echo  $#
     cd step_00$i_in
     echo  `pwd`
     mkdir tables
     mv $1.angle.pot.cur $1.angle.pot.cur_I
     sed -e '1,17d' -e 's/$/ i/' $1.angle.pot.new | tac | sed -e '1,0d' | tac > $1.angle.cut

     source /opt/apps/votca/1.2.3/bin/VOTCARC.bash
     source /opt/apps/gmx/single/463/bin/GMXRC
     csg_call table smooth $1.angle.cut $1.angle.smooth
     csg_resample --in $1.angle.smooth --out $1.angle.refined --grid 0::0.001:3.141592654
     csg_call table extrapolate --function quadratic --region left $1.angle.refined $1.angle.refined
     csg_call table extrapolate --function linear --region right $1.angle.refined $1.angle.refined
     awk '{print $1/3.141592654*180.0,$2}' $1.angle.refined > $1.angle.pot.cur
     csg_call --ia-type angle --ia-name $1.angle --options ../convert.xml  convert_potential gromacs

     cd ..
     rm 'done'
     i_c=`expr $i_in + 1`
     sed -i s/iterations_max\>$i_in/iterations_max\>$i_c/  settings.xml
     sh run.sh
   fi

Please share your thought on this.

Chandan
--
Chandan kumar Choudhury
NCL, Pune
INDIA

Pallavi Banerjee

unread,
Oct 8, 2015, 5:25:05 AM10/8/15
to votca

Hello!

I found this post of yours very useful. Could you provide the rationale behind using linear extrapolation for the angles? Shouldn't they be quadratic as well?

-Pallavi Banerjee

Christoph Junghans

unread,
Oct 8, 2015, 5:45:22 AM10/8/15
to vo...@googlegroups.com
2015-10-08 3:25 GMT-06:00 Pallavi Banerjee
<palla...@students.iiserpune.ac.in>:
>
> Hello!
>
> I found this post of yours very useful. Could you provide the rationale
> behind using linear extrapolation for the angles? Shouldn't they be
> quadratic as well?
That is up to you and the system you are studying! In general any
extrapolation is fine as long as it generates a repulsive force.

Christoph
> --
> 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 post to this group, send email to vo...@googlegroups.com.
> Visit this group at http://groups.google.com/group/votca.
> For more options, visit https://groups.google.com/d/optout.



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

Pallavi Banerjee

unread,
Oct 8, 2015, 6:39:52 AM10/8/15
to vo...@googlegroups.com
Thanks. Christoph! Are the only available functions linear and quadratic?

-Pallavi Banerjee


--
You received this message because you are subscribed to a topic in the Google Groups "votca" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/votca/QdlpbKsBdII/unsubscribe.
To unsubscribe from this group and all its topics, send an email to votca+un...@googlegroups.com.

Christoph Junghans

unread,
Oct 8, 2015, 8:12:28 AM10/8/15
to vo...@googlegroups.com
2013-10-09 10:42 GMT-06:00 Chandan Choudhury <iit...@gmail.com>:
> Dear votca users,
>
> I would like to share my experience regarding the iteration of bonded
> interactions.
>
> I prefer to use the following script for iterating the bonds:
What is the advantage of that script over the bonded IBI in VOTCA 1.3?
Most of the stuff below can be done as post-update script as well.

>
> For the first iteration, I used the tabulated potentials generated from the
> csg_boltzmann. Upon its completion, I used the following scripts:
Some comments below:

>
> #!/bin/sh
> i_in=1
> if [ "$#" -ne 0 ]; then
"$#" is "number of arguments"! Does that make sense?

> echo $#
> cd step_00$i_in
> echo `pwd`
Simply use pwd instead.

> mkdir tables
> mv $1.bond.pot.cur $1.bond.pot.cur_I
> sed -e '1,4d' -e 's/$/ i/' $1.bond.pot.new | tac | sed -e '1,3d' | tac
>> $1.bond.cut
Use
$ csg_call table change_flag $1.bond.pot.new $1.bond.cut
instead

>
> source /opt/apps/votca/1.2.3/bin/VOTCARC.bash
> source /opt/apps/gmx/single/463/bin/GMXRC
> csg_call table smooth $1.bond.cut $1.bond.smooth
> csg_resample --in $1.bond.smooth --out $1.bond.refined --grid
> 0::0.001:0.5
Simply add "smooth" to the post_update list of the "bond" interaction
(see spce/realtime example)

> csg_call table extrapolate --function quadratic $1.bond.refined
> $1.bond.pot.cur
same here, add "extrapolate" to the post_update list of the "bond" interaction.

> csg_call --ia-type bonded --ia-name $1.bond --options ../convert.xml
> convert_potential gromacs
>
> cd ..

> rm 'done'
> i_c=`expr $i_in + 1`
> sed -i s/iterations_max\>$i_in/iterations_max\>$i_c/ settings.xml
> sh run.sh
Instead of the above four lines, simply set iterations_max=0 in
settings.xml and call
$ csg_inverse --do-iterations 1 --options settings.xml
to do one iteration at the time.
> --
> 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 post to this group, send email to vo...@googlegroups.com.
> Visit this group at http://groups.google.com/group/votca.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages