[gmx-developers] use multiple tables for pair interactions

Berk Hess hessb at mpip-mainz.mpg.de
Mon Jul 17 17:30:42 CEST 2006


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.




More information about the gromacs.org_gmx-developers mailing list