[gmx-developers] use multiple tables for pair interactions (segmentation fault)

Dongsheng Zhang dong at pampas.chem.purdue.edu
Tue Jul 18 07:58:59 CEST 2006


Dear Berk,


Thank you very much for your great help. I can use tablep.xvg for three
different pair interactions now. If I simulation only one long triblock
polymer chain, it works fine. However, the program gave me "Segmentation
fault" when I simulated 30 chains. The log file seems fine, as follows:

           Step           Time         Lambda
           5000       10.00000        0.00000

   Energies (kJ/mol)
           Bond          Angle          LJ-14     Coulomb-14        LJ
(SR)
    1.10604e+04    2.16255e+04    3.01743e+02    6.81742e+01   -1.29044e
+05
   Coulomb (SR)      Potential    Kinetic En.   Total Energy
Temperature
    0.00000e+00   -9.59881e+04    2.95806e+04   -6.64076e+04    2.99508e
+02
Pressure (bar)
    8.75619e+00

           Step           Time         Lambda
           6000       12.00000        0.00000

   Energies (kJ/mol)
           Bond          Angle          LJ-14     Coulomb-14        LJ
(SR)
    1.17095e+04    2.20613e+04    2.40772e+02    6.78325e+01   -1.31923e
+05
   Coulomb (SR)      Potential    Kinetic En.   Total Energy
Temperature
    0.00000e+00   -9.78433e+04    2.96119e+04   -6.82314e+04    2.99825e
+02
Pressure (bar)
    4.47005e+00

The program stopped at step 6990.

When I ran the program with -debug, I got a different log file, as
follows:

++++ PLEASE READ AND CITE THE FOLLOWING REFERENCE ++++
H. J. C. Berendsen, J. P. M. Postma, A. DiNola and J. R. Haak
Molecular dynamics with coupling to an external bath
J. Chem. Phys. 81 (1984) pp. 3684-3690
-------- -------- --- Thank You --- -------- --------

Large VCM(group rest):     -0.00000,     -0.00000,      0.00000,
ekin-cm:  3.11775e-21
   Energies (kJ/mol)
           Bond          Angle          LJ-14     Coulomb-14        LJ
(SR)
    1.00042e+04    1.01454e+04    1.36360e+03    6.50650e+00   -2.68845e
+04
   Coulomb (SR)      Potential    Kinetic En.   Total Energy
Temperature
    0.00000e+00   -5.36480e+03    2.96549e+04    2.42901e+04    3.00260e
+02
Pressure (bar)
   -2.46133e+01

Large VCM(group rest):     -0.00000,     -0.00000,      0.00000,
ekin-cm:  2.79878e-21

The program stopped at step 3600, and there is no output for step 1000,
2000 3000 even though I set nstlog = 1000 in my mdp file.


With -debug, I got three of ctab.xvg dtab.xvg, rtab.xvg, and one of
ctab14.xvg dtab14.xvg, rtab14.xvg. In table_*_*.xvg, I only use C6 term,
three dtab.xvg matches my input table_*_*.xvg. ctab.xvg and rtab.xvg
should be zeros, but I find some large negative values in the last
several line as follows:

#ctab.xvg.1 (for EO-EO COUL term)
3.3980000953e+00  -2.5368847225e+15  -5.3233641970e+22
3.3984000953e+00  -4.4703197993e+22  -2.2346273246e+26
3.3988000953e+00  -1.7877019745e+23  -4.4687222761e+26
3.3992000953e+00  -4.0220100090e+23  -6.7028177811e+26
3.3996000954e+00  -7.1499560834e+23  -8.9369125481e+26

#rtab.xvg.1 (for EO-EO C12 term)
3.3980000953e+00  -3.0786326528e+10  9.1349993896e+02
3.3984000953e+00  -3.0786326528e+10  1.0232022095e+03
3.3988000953e+00  -3.0786326527e+10  1.3522044678e+03
3.3992000953e+00  -3.0786326527e+10  1.9005067139e+03
3.3996000954e+00  -3.0786326526e+10  2.6681091309e+03


These are the only things I find specious. Could you please help me to
found what cause segmentation fault?


All the best!


Dongsheng

On Mon, 2006-07-17 at 17:30 +0200, Berk Hess wrote: 
> Dongsheng Zhang wrote:
> 
> >On Mon, 2006-07-17 at 15:13 +0200, Berk Hess wrote:
> >  
> >
> >>Dongsheng Zhang wrote:
> >>
> >>    
> >>
> >>>Dear Hess,
> >>>
> >>>Thank you very for your reply.
> >>>
> >>>
> >>>On Mon, 2006-07-17 at 08:46 +0200, hessb at mpip-mainz.mpg.de wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>>Dear GMX developers,
> >>>>>
> >>>>>I want to use a coarse grained model, which includes several tabulated
> >>>>>potentials for pair interactions, but no COUL term. Currently Gromacs
> >>>>>can only read one table for pair interactions. Could you please help me
> >>>>>modify the source code such that Gromacs can support multiple tables for
> >>>>>pair interactions?
> >>>>>
> >>>>>Another way I am thinking to solve my problem is to fool gromacs to take
> >>>>>advantage of COUL term in VDWs table since my coarse grained model does
> >>>>>have COUL term. In other words, I put all pair interaction values in
> >>>>>COUL term in the regular VDWs tables (Gromacs can read multiple VDWs
> >>>>>tables), so when gromacs wants to calculate pair interaction energys,
> >>>>>gromacs will use the codes for calculate COUL energy by reading VDWs
> >>>>>tables. Here I need to modify the source code to change the flow. If you
> >>>>>think this is a good idea, could you please shine a light o tell me
> >>>>>where I need to modify in source code (where gromacs calculate the
> >>>>>nonbonded energies and forces)?
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>Changing the code is somewhat involved,
> >>>>as the pair interactions are bonded interactions and they
> >>>>are therefore not assigned to charge groups.
> >>>>
> >>>>I have used the other option you mention several times.
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>I'll try to word it differently.
> >>
> >>You apparently want to use different forms of pair interactions for 
> >>different
> >>atom pairs in the [ pairs ] section of your topology.
> >>    
> >>
> >
> >  
> >
> >>Without changing the code you can only use the 3 functional forms
> >>that are supplied in tablep.xvg.
> >>If you need 2 functional forms, things are easy since your can indepently
> >>modify the 2 functions normally used for 1/r^6 and 1/r^12.
> >>If you need more than 3 you are out of luck.
> >>If you need 3 functional forms, you can use the electrostatics part of 
> >>tablep.xvg.
> >>Here you need to take into account the factor f*q1*q2 in the potential.
> >>Also the electrostatics functions in all table_?_?.xvg files should be zero,
> >>as otherwise you will get unwanted non-bonded interactions.
> >>
> >>    
> >>
> >
> >
> >Dear Berk,
> >
> >
> >To my understanding, one tablep.xvg can only take care of one type ( two
> >specific atoms) of pair interaction, even though there are three
> >functional forms. In my case, The pair interaction potential does not
> >include COUL term, and the potential is completed tabulated (means there
> >is no formula e.g. 1/r^6), so I will only use one functional form
> >(attractive or replusive part) and  C6 and c12 are unities.
> >
> >Now I give you my case. I try to use a coarse grained model for
> >PEO-PPO-PEO triblock polymers. There are three different pair
> >interactions, namely, PEO-PEO, PPO-PPO, PEO-PPO. I thought I need three
> >tablep_*_*.xvg files for them. Could you please kindly tell how I can
> >change tablep.xvg to calculate those three different types of pair
> >interactions without modifying the source code? 
> >
> >  
> >
> OK.
> 
> So you can store 3 functional forms in tablep.xvg.
> Set pair parameters as follows:
> at1  at2   C6  C12
> PEO PEO  1   0
> PEO PPO  0   1
> PPO PPO  0   0
> The charges:
> PEO 0
> PPO 1
> Now you can use the first LJ function in tablep.xvg for PEO-PEO
> Now you can use the second LJ function in tablep.xvg for PEO-PPO
> And the electrostatics function in tablep.xvg for PPO-PPO (note
> that this potential is multplied by the electrostatics constant f,
> see the manual).
> 
> Don't forget to make the electrostatics function in all table_?_?.xvg 
> files zero.
> 
> Berk.
> 
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.



More information about the gromacs.org_gmx-developers mailing list