Define a pair potential energy function corresponding to the soft core repulsive potential with energy proportional to volume of intersecting spheres
where \(r_{ij}\) is the distance between particles \(i,j\) \(C\) is potential strength, \(R\) is the sphere radius. Note that cutoff distance is two times \(R\).
parameters of potential can be defined directly within the python input script or read from a restart file.
Adding Fix
FixTICG(state=..., handle=...)
Arguments
Setting parameters from within the Python environment is done with setParameter.
setParameter(param=...,handleA=...,handleB=...,val=...,)
Arguments
name of parameter to set. Can be C, rCut.
rCut parameter has a default value equal to state.rCut. Note that R is half of rCut.
it is possible to get value of the parameters within the Python environment with getParameter.
val = getParameter(param=...,handleA=...,handleB=...)
Arguments
Adding the fix
#adding TICG potential
ticg = FixTICG(state, handle='TICG')
Setting parameters in python
ticg.setParameter(param='eps', handleA='A', handleB='B', val=1.0)
ticg.setParameter(param='sig', handleA='B', handleB='B', val=1.0)
Setting same parameters for all types in python
#list of all types
types=['A','B','C','S','P','N']
for A in types:
for B in types:
ticg.setParameter(param='C', handleA=A, handleB=B, val=1.0)
ticg.setParameter(param='rCut', handleA=A, handleB=B, val=0.2)
Activating the fix
#Activate fix
state.activateFix(ticg)
rCut, C