In table are reported the atomic types with relative mass, charge and sigma. As a first attempt we have chosen the following parameters.
| Atomtype | mass | charge | sigma |
|---|---|---|---|
| A | 100 Da | 0.0 | 1 |
| Bc | 100 Da | 0.0 | 3 |
| Bs | 100 Da | 0.0 | 1 |
In table are reported the molecules present in our model and the relative sequence.
| Molecule | Sequence |
|---|---|
| polyA | A- |
| B | Bs - Bc |
In table are reported the bond interactions of molecule in our model.
| molecule | atoms | interaciton type | params |
|---|---|---|---|
| polyA | A - A | Harmonic |
|
| B | Bs-Bc | Harmonic |
|
In table are reported all possible non-bonded interaction and the type of function used to described it.
| atoms | type |
|---|---|
| A -A | Lennard - Jones Truncated |
| A - Bs | Wingreen |
| A - Bc | Lennard - Jones Truncated |
| Bs - Bs | Lennard - Jones Truncated |
| Bs - Bc | Lennard - Jones Truncated |
| Bc - Bc | Ashbaugh - Hatch |
Here the explicit analitical expressions of the interactions.
1- Lennard - Jones Troncated
if
if
2 - Wingreen (*)
if
if
3 - Ashbaugh - Hatch
if
if
Using Gromacs to run CG model simulations, we cannot express interactions through analytic functions but we have to use numerical values with tables. We decided to provide 3 tables; each referring to a specific
| atoms | type (index) | table name | |
|---|---|---|---|
| A -A | 1 | 1 |
table_ABsite_ABsite.xvg |
| A - Bs | 2 | 1 |
|
| Bs - Bs | 1 | 1 |
|
| A - Bc | 1 | 2 |
table_ABsite_Bcore.xvg |
| Bs - Bc | 1 | 2 |
|
| Bc - Bc | 3 | 3 |
table_Bcore_Bcore.xvg |
Here is possible to see how the tables are designed.
table_ABsite_ABsite.xvg with
| table_ABsite_ABsite.xvg | ||||||
|---|---|---|---|---|---|---|
| r | f | -f | g | -g' | h | -h' |
| 0.02 |
0.00 | 0.00 | ||||
| 0.02 | 0.00 | 0.00 | ||||
| |
||||||
| |
0.00 | 0.00 | ||||
with
with
table_ABsite_Bcore.xvg with
| table_ABsite_Bcore.xvg | ||||||
|---|---|---|---|---|---|---|
| r | f | -f | g | -g' | h | -h' |
| 0.02 |
0.00 | 0.00 | 0.00 | 0.00 | ||
| 0.02 | 0.00 | 0.00 | 0.00 | 0.00 | ||
| |
||||||
| |
0.00 | 0.00 | 0.00 | 0.00 | ||
with
table_Bcore_Bcore.xvg with
| table_Bcore_Bcore.xvg | ||||||
|---|---|---|---|---|---|---|
| r | f | -f | g | -g' | h | -h' |
| 0.02 |
0.00 | 0.00 | ||||
| 0.02 | 0.00 | 0.00 |
|
|||
| |
||||||
| |
0.00 | 0.00 | ||||
with
with
The following cell shows the expressions of the interactions in Python.
# functions section
def LJ_repulsive(r,sigma,epsilon):
V_r = 4 * epsilon * ((sigma/r)**12 - (sigma/r)**6) * (r<sigma)
return V_r
def force_LJ_repulsive(r,sigma,epsilon):
F_r = 4 * epsilon * ( (12 * (sigma**12) / r**13) - ( 6 * (sigma**6) / r**7 ) ) * (r<sigma)
return F_r
def Wingreen(r,V_0,r_0):
V_r = -0.5 * V_0 * (1 + np.cos( math.pi * r / r_0)) * (r < r_0)
return V_r
def force_Wingreen(r,V_0,r_0):
F_r = -0.5 * V_0 * np.sin( math.pi * r / r_0) * math.pi / r_0 * (r < r_0)
return F_r
def LJ_like(r,sigma,epsilon,lambd):
V_r = (4 * epsilon * ((sigma/r)**12 - (sigma/r)**6) + (1-lambd)*epsilon) * (r<= 2**(1/6)*sigma) + lambd * 4 * epsilon * ((sigma/r)**12 - (sigma/r)**6) * (r> 2**(1/6)*sigma)
return V_r
def force_LJ_like(r,sigma,epsilon,lambd):
F_r = 4 * epsilon * ( (12 * (sigma**12) / r**13) - ( 6 * (sigma**6) / r**7 ) ) * (r<= 2**(1/6)*sigma) + 4 * lambd * epsilon * ( (12 * (sigma**12) / r**13) - ( 6 * (sigma**6) / r**7 ) ) * (x > 2**(1/6)*sigma)
return F_r
#--------------------------------------------------------------------
# for simplicity split 2 terms. One depending on lambda.
def LJ_like_4_table_1(r,sigma,epsilon):
V_r = (( 4 * epsilon * ((sigma/r)**12 - (sigma/r)**6)) + epsilon ) * (r<= 2**(1/6)*sigma)
return V_r
def force_LJ_like_4_table_1(r,sigma,epsilon):
F_r = 4 * epsilon * ( (12 * (sigma**12) / r**13) - ( 6 * (sigma**6) / r**7 ) ) * (r<= 2**(1/6)*sigma)
return F_r
def LJ_like_4_table_2(r,sigma,epsilon):
V_r = -epsilon * (r<= 2**(1/6)*sigma) + 4 * epsilon * ((sigma/r)**12 - (sigma/r)**6) * (r> 2**(1/6)*sigma)
return V_r
def force_LJ_like_4_table_2(r,sigma,epsilon):
F_r = 4 * epsilon * ( (12 * (sigma**12) / r**13) - ( 6 * (sigma**6) / r**7 ) ) * (r> 2**(1/6)*sigma)
return F_rIn the following cell are plotted the analytical funcions describing the interactions in the CG model.
# check analytical functions
fig, ax = plt.subplots(3,2, figsize=(20, 20), sharex=True)
# x points for gromacs
x = np.arange(0,10,0.02)
ax[0,0].set_xlim(0,3)
ax[0,0].set_ylim(-1,3*10)
ax[0,0].plot(x,LJ_repulsive(x, sigma=1, epsilon=2))
ax[0,0].set_title('repulsive LJ (V)')
ax[0,0].set_xlabel('$ \sigma$ ')
ax[0,0].set_ylabel(' V ')
ax[0,1].plot(x,force_LJ_repulsive(x ,sigma=1,epsilon=2), color='r')
ax[0,1].set_ylim(-1,3*10)
ax[0,1].set_title('repulsive LJ (F)')
ax[0,1].set_xlabel('$ \sigma$ ')
ax[0,1].set_ylabel(' F ')
ax[1,0].set_xlim(0,3)
ax[1,0].plot(x,Wingreen(x, V_0=1, r_0=1))
ax[1,0].set_title('Wingreen (V)')
ax[1,0].set_xlabel('$\sigma$ ')
ax[1,0].set_ylabel(' V ')
ax[1,1].plot(x,force_Wingreen(x, V_0=1, r_0=1), color='r')
ax[1,1].set_title('Wingreen (F)')
ax[1,1].set_xlabel('$\sigma$ ')
ax[1,1].set_ylabel(' F ')
ax[2,0].set_xlim(0,3)
ax[2,0].plot(x,LJ_like(x, sigma=1, epsilon=2, lambd=-0.5), '--' , color='C0', label='lambda = -0.5')
ax[2,0].plot(x,LJ_like(x, sigma=1,epsilon=2, lambd=1),'.-.' , color='C0', label='lambda = 1.0')
ax[2,0].plot(x,LJ_like(x, sigma=1, epsilon=2, lambd=0.1), '-', color='C0',label='lambda = 0.1')
ax[2,0].set_ylim(-5,5)
ax[2,0].set_title(' LJ like (V)')
ax[2,0].set_xlabel('$\sigma$ ')
ax[2,0].set_ylabel(' V ')
ax[2,0].legend()
ax[2,1].plot(x,force_LJ_like(x, sigma=1, epsilon=2, lambd=-0.5), '--' , color='r', label='lambda = -0.5')
ax[2,1].plot(x,force_LJ_like(x,sigma=1,epsilon=2, lambd=1),'.-.' , color='r', label='lambda = 1.0')
ax[2,1].plot(x,force_LJ_like(x,sigma=1,epsilon=2, lambd=0.1), '-', color='r',label='lambda = 0.1')
ax[2,1].set_ylim(-5,5)
ax[2,1].set_title(' LJ like (F)')
ax[2,1].set_xlabel('$\sigma$ ')
ax[2,1].set_ylabel(' F ')
ax[2,1].legend();
#plt.plot(x,force_LJ_repulsive(x,1,1))For convenience we set to 0 all parametres (
| [nonbond_params] | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| atoms |
C | A | |
||||||
| A A |
|
0 |
|
||||||
| A Bs | 0 |
|
|||||||
| Bs Bs |
0 | ||||||||
| A Bc | 0 | ||||||||
| Bs Bc | 0 | ||||||||
| Bc Bc | |||||||||
note that
