FM for partially known CG pot

31 views
Skip to first unread message

Sikandar Mashayak

unread,
Mar 15, 2011, 6:18:33 PM3/15/11
to vo...@googlegroups.com
Hey

I am thinking of a problem where I have some physical understanding or constraint for CG-CG potential that I want to parameterize. So that, I know say from 0-r1 what is CG-CG potential values and want to determine values from r1-rcut. 

Is there any way I can set up such Force Matching calculations in Votca?

thanks
sikandar

Victor Ruehle

unread,
Mar 23, 2011, 7:13:08 PM3/23/11
to vo...@googlegroups.com
Hmm, don't see any clean way how to do this with the current
implementation. One might be able to subtract the known parts (which
can be calculated using rerun) using --force-trj and setting the
interval only to the unknown region. However this might lead to kinks
due to interpolation effects at the crossing.

The clean way would require extending the code.

2011/3/15 Sikandar Mashayak <symas...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "votca" group.
> To post to this group, send email to vo...@googlegroups.com.
> To unsubscribe from this group, send email to
> votca+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/votca?hl=en.
>

Sikandar Mashayak

unread,
Mar 28, 2011, 6:35:07 PM3/28/11
to vo...@googlegroups.com
thanks victor, I will see how subtracting known parts and setting interval to the unknown range will work out.. i guess good starting point would be check this out with simple 12-6 LJ case...

---
sikandar

Sikandar Mashayak

unread,
Mar 31, 2011, 12:03:03 PM3/31/11
to vo...@googlegroups.com
Hi

Another similar situation I am thinking of is like follow ::

1. I have full atomistic trajectory and forces as a target system.
2. I want to Coarse-Grain and determine CG-CG potential. I also have some knowledge what this CG-CG looks like and and insist on using this information. To do that I plan to do following.
3. Use this knowledge based ( so to call) CG-CG to perform MD-Rerun with full atomistic trajectories and get CG forces.
4.  Now compute the error in forces on CG site for full MD and CG MD-rerun.
5. Use this error force as target force to do Force-Matching and get an estimate for CG-CG potential which reproduces this error.
6. Finally add this error CG potential to original (knowledge based) potential to get more accurate CG-CG potential.


So the question I have is, how do I generate trajectories for just error forces. I mean , is there any way I use two gromacs trajectories and get new trajectory with error force?

thanks
sikandar

Victor Ruehle

unread,
Mar 31, 2011, 12:19:50 PM3/31/11
to vo...@googlegroups.com
Hey

unless you change your basis set for cg force field (cut-off, add
interactions, etc) or add some bias to fit procedure (extension to
code needed), you will probably end up with identical potentials as
doing only force matching.

However, technically it can be done the following:
- csg_map --in traj.trr --out traj_cg.trr --cg mapping.xml (same for conf.gro)
- prepare coarse-grained topolology with already known potentials
- mdrun -rerun traj_cg.trr (trajectory will contain knowledge based forces)
- csg_fmatch --trj traj.trr --force-trj traj_rerun_cg.trr (fill give
error force)

You could test whether you did it correct be using force-matching
potentials as input for rerun -> error force should vanish

Victor

2011/3/31 Sikandar Mashayak <symas...@gmail.com>:

Sikandar Mashayak

unread,
Mar 31, 2011, 12:38:24 PM3/31/11
to vo...@googlegroups.com
Hey

I may need a bit more explanation to understand last two points you make..

- csg_fmatch --trj traj.trr --force-trj traj_rerun_cg.trr (fill give
error force)

::- will the output of this be .trr file with error forces or CG potential which reproduces error forces. Also I don't see the --force-trj option in help text/manual for csg_fmatch.

You could test whether you did it correct be using force-matching
potentials as input for rerun -> error force should vanish

This point is not clear.

thanks
sikandar

Sikandar Mashayak

unread,
Mar 31, 2011, 4:03:57 PM3/31/11
to vo...@googlegroups.com
Also, when running the command 

csg_map --in traj.trr --out traj_cg.trr --cg mapping.xml

i get error " unknown option --in" and when I do it usual way i.e. csg_map --top top.tpr --traj traj.trr --out out.trr I get the .trr file but it has zero forces/no force information.

Victor Ruehle

unread,
Mar 31, 2011, 5:09:27 PM3/31/11
to vo...@googlegroups.com
sorry, sure it is --trj. This will generate a mapped trajectory. Then
you have to calculate forces using gromacs mdrun -rerun giving a
coarse-grained topology which contains forces you already know. To
summarize -> csg_map will generate a coarse-grained trajectory from
atomistic one (only positions), mdrun -rerun adds forces

on csg_fmatch --trj-force (mixed it up --force-trj was wrong):
indeed, it seems like i forgot to merge that into the stable/default
branch. Will fix it by tomorrow and let you know when done.

on testing:
With --trj-force you can specify a coarse-grained trajectory whose
forces are subtracted before force fitting procedure. If you now put
in the potentials obtained in a previous forcematching step, these are
subtracted -> the forces which are fitted should be zero (the fit
depends on specified interactions, if you don't change these it should
give identical results, since these are already subtracted -> zero).
This is good to check whether your setup of coarse-grained topology is
correct (interactions specified correctly) and all steps I mentioned
went fine.

Hope that helped.

Cheers,

Sikandar Mashayak

unread,
Mar 31, 2011, 6:00:50 PM3/31/11
to vo...@googlegroups.com
yeah sure it helps.. just to be sure that I understand it correctly

when --traj ref.trr --trj-force cg.trr is used with csg_fmatch then it computes the difference between forces on cg site in ref.trr and cg.trr and use error forces as a target force to be matched using the CG potentials with given options..

right?

also, is there any gromacs utility can be used to compute force difference between two .trr with same positions and generate new .trr with error force? 

thanks
sikandar

Victor Ruehle

unread,
Apr 1, 2011, 6:20:15 PM4/1/11
to vo...@googlegroups.com
if i understood correctly what you mean with error force (=force
difference) then yes.

I made changes and options should be available now. Please reinstall
csg (either stable or developer version from repositories). Tarballs
are not yet updated.

I'm not aware of any gromacs tool which does it. However that would be
a perfect exercise to get startet with votca development :) It's 3
additional lines in the template.cc. I can help you to get started.

Victor

2011/4/1 Sikandar Mashayak <symas...@gmail.com>:

Sikandar Mashayak

unread,
Apr 1, 2011, 10:11:19 PM4/1/11
to vo...@googlegroups.com
yeah, I have been using template.cc for doing post-processing the trajectories, but I am used to writing the analyzed data in ascii format, not sure how to generate .trr format files with modified data... looking into xtc gromacs library...  your input on this will be helpful...

thanks
sikandar

Victor Ruehle

unread,
Apr 2, 2011, 3:10:10 AM4/2/11
to vo...@googlegroups.com
Check e.g. in csg_map.cc
(http://doxygen.votca.googlecode.com/hg/csg__map_8cc_source.html)

string out = "foo.trr";
_writer = TrjWriterFactory().Create(out);
if(_writer == NULL)
throw runtime_error("output format not supported: " + out);
_writer->Open(out);
_writer->Write(top);
_writer->Close();
delete _writer;

You can access topology class to make changes
(http://doxygen.votca.googlecode.com/hg/classvotca_1_1csg_1_1Topology.html)

2011/4/2 Sikandar Mashayak <symas...@gmail.com>:

Sikandar Mashayak

unread,
Apr 4, 2011, 12:17:06 AM4/4/11
to vo...@googlegroups.com
Hey Victor

I was able to use template.c to write out new trr with error forces. Also, it may be useful for me to modify csg_map to generate output trajectory in .trr format with force information, I will give it a try whenever possible. Right now, as I said earlier, I need to do fmatch on error forces. As you suggested, I am trying to use "--trj-force" option to accomplish that. But when I try to download updated csg source code and compile it I get the errors. I have attached the build log file . Can you please help me with that

thanks
sikandar
csg_build.log

Sikandar Mashayak

unread,
Apr 6, 2011, 10:17:21 AM4/6/11
to vo...@googlegroups.com
hey

I got the newly uploaded 1.1.2 tar and it installed well...

thanks
sikandar
Reply all
Reply to author
Forward
0 new messages