Couple of questions regarding the SW potential obtained via FM

16 views
Skip to first unread message

Cecília Álvares

unread,
Oct 26, 2025, 3:20:47 PMOct 26
to votca
Hello! 

I have a system that corresponds to a porous solid with some gas adsorbed. In the CG resolution chosen to study this system, there will be 3 bead types (i.e. 3 chemically distinct beads): beads types 1 and 2 replace groups of atoms of the porous solid while beads type 3 replace gas molecules. To make a long story short, I am only fitting some of the potentials of the CG force field using FM - I have taken care of feeding to VOTCA a physically consistent trajectory where I duly exclude atomic interactions, so no worries about that. Amongst the potentials I am fitting, there are two three-body Stillinger-Weber potentials: 1-2-3 and 2-1-3, where the central atom of the angle in each case is the 2nd index in my previous notation. Given that these are angles formed by 3 distinct bead types (and thus is a bit different from the scenario in the water tutorial), my questions are the following:

1) in the fmatch.xml file, should the bead type in the center of the angle be informed under <type1> or under <type2> ? (because LAMMPS for example uses a notation where the central atom is informed first, so I am not sure).

2) in my case, should I declare only two potentials or should I also declare their equivalents? What i mean is: assuming the central atom is informed in the second slot (i.e. under <type2>), should I declare in the fmatch.xml a potential 123 and another potential for 321 for the 3 body interaction between 1-2-3? I am asking this bcs the corresponding pair_style in LAMMPS seems to require redundance in the .sw file, so I was wondering if VOTCA also.

3) In the water tutorial where, both, a pairwise potential and a 3 body SW term were fit, I saw in the LAMMPS input file (found at https://gitlab.mpcdf.mpg.de/votca/votca/-/blob/master/csg-tutorials/spce/3body_sw/spce.in) that the potential parameters are informed in the following order:
pair_coeff 1 1 table table_CG_CG.txt VOTCA 
pair_coeff * * sw/angle/table spce.sw type
But shouldnt pair_coeff commands specified for a same pair of atoms override each other? At least that's what the LAMMPS manual seem to imply (https://docs.lammps.org/pair_coeff.html -  "Note that a pair_coeff command can override a previous setting for the same I,J pair"). I am asking just to know if I will face this problem in my case also, as I have pairs involved in the SW and in pair interactions.

Thank you soooooooooo much in advance for any clarification !
Cecilia

Christoph Junghans

unread,
Oct 28, 2025, 1:15:28 PMOct 28
to vo...@googlegroups.com
I haven’t used SW myself, so I will leave these questions for the MPI-P folks to respond to.

Christoph

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


--
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 visit https://groups.google.com/d/msgid/votca/709b8ef5-1e86-4d54-aab5-13edf67f5b59n%40googlegroups.com.

Cecília Álvares

unread,
Nov 9, 2025, 10:00:25 AMNov 9
to votca
FWIWI, the third question is stupid (ops!): apparently the pair_style hybrid/overlay within LAMMPS allows defining more than one pair_coeff entry for a same pair of atom types without overriding provided that the underlying pair_styles are different in each pair_coeff entry.

I guess the answer to the first and second questions can be figured out with some level of confidence by checking structural data (e.g. if I am meeting the expected average pair distances and 3 body angles in the first case and how sharp RDFs are in the second case), but I have emailed another developer to see if he knows the answer to the question. I will write a feedback here about these questions once I get an answer !

Cecília Álvares

unread,
Nov 18, 2025, 4:02:36 PMNov 18
to votca
Hey, 

Sorry for the delay! 

I am passing along the information I kindly and readily got from Christoph Scherer concerning questions 1 and 2, although he did say to take the anwsers with a grain of salt because he isnt working anymore in this field *and* it has been a while that he implemented the parametrization of the SW 3 body term in VOTCA as well as the corresponding pair_style that is meant to use it within LAMMPS (https://docs.lammps.org/pair_sw_angle_table.html). Having this in mind, here is a copy/paste of what I got as a reply:

"1) The bead type in the center of the angle has to be informed under <type1>. This is also (as I remember and still understand it) the notation in LAMMPS (see: https://docs.lammps.org/pair_sw_angle_table.html)

2) That is correct. As far as I remember, in LAMMPS the entry of the .sw file has to contain both entries as you assumed. In this case (central atom of type 2! is <type1>) it than has to contain 213 and another potential for 231 for the 3 body interaction between 1-2-3. In votca (FM) I think, you also then should include two potentials (and define both of them in the fmatch.xml file, as described in https://www.votca.org/csg/methods.html#force-matching and also the tutorial) here with the entries

<threebody>true</threebody>  
<type1>2<type1>
 <type2>1<type2>
 <type3>3<type3>

and

<threebody>true</threebody> 
<type1>2<type1> 
<type2>3<type2> 
<type3>1<type3>

But I would try both. With two entries and with only one, as e.g.

<threebody>true</threebody>  
<type1>2<type1> 
<type2>1<type2> 
<type3>3<type3>

and then compare the result. I would assume that in the second case the potential f(3b)(theta) is just 2 times the one of the first case. But please double check."

Concerning the second question, I did a quick test of declaring redundant angle potentials (i.e. swapping the order of the 1st and 3rd atom forming the angle) in the fmatch.xml. I got some very weird results: the plots below are the forces I got as an output (before any smoothening, for what is worth it) for redundant 3 body terms. In the plots, the sequence of three atoms corresponding to each line are now informed with the central atom coming first and the blue line is the sum of both forces, showing that the forces of redundant potentials mirror each other and sum to 0. Basically all the "force matching" is being done with the other two pairwise potentials I had in the fmatch.xml file.

pic.png

I am gonna leave my files here in a tarball in case anyone is interested in reproducing/exploring further (https://drive.google.com/file/d/1oMWZbv2wzf_ZO5iAogu7M2r7MIRlN8WG/view?usp=sharing). For what is worth it, you probably can extend a bit the min/max range for the 3 body terms as I didnt put precisely the most optimal values within the scope of the sampled region to make this test. Given that I got reasonable results by not declaring redundant potentials in the xml file, I would say that you should not declare redundant potentials in the fmatch.xml file (but yes, ofc later in the LAMMPS pair_style the story changes as you can find out in the LAMMPS manual).

Reply all
Reply to author
Forward
0 new messages