Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80993852
calc_table.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 3, 16:20
Size
905 B
Mime Type
text/x-python
Expires
Thu, Sep 5, 16:20 (2 d)
Engine
blob
Format
Raw Data
Handle
20465886
Attached To
rLAMMPS lammps
calc_table.py
View Options
#!/usr/bin/env python
# Calculate a table of pairwise energies and forces between "INT" atoms
# in the lipid membrane model described in
# Brannigan et al, Phys Rev E, 72, 011915 (2005)
# The energy of this interaction U(r) = eps*(0.4*(sigma/r)^12 - 3.0*(sigma/r)^2)
# However it is truncated at rc2 = 22.5 (shifted upwards to maintain continuity)
def
U
(
r
,
eps
,
sigma
):
return
eps
*
(
0.4
*
pow
((
sigma
/
r
),
12
)
-
3.0
*
sigma
*
sigma
/
(
r
*
r
))
def
F
(
r
,
eps
,
sigma
):
return
eps
*
(
12
*
0.4
*
pow
((
sigma
/
r
),
13
)
/
sigma
-
2
*
3.0
*
sigma
*
sigma
/
(
r
*
r
*
r
))
epsilon
=
2.75
/
4.184
# kCal/mole
sigma
=
7.5
Rmin
=
0.02
Rmax
=
22.6
rcut
=
22.5
N
=
1130
for
i
in
range
(
0
,
N
):
r
=
Rmin
+
i
*
(
Rmax
-
Rmin
)
/
(
N
-
1
)
U_r
=
U
(
r
,
epsilon
,
sigma
)
-
U
(
rcut
,
epsilon
,
sigma
)
F_r
=
F
(
r
,
epsilon
,
sigma
)
if
r
>
rcut
:
U_r
=
0.0
F_r
=
0.0
print
(
str
(
i
+
1
)
+
' '
+
str
(
r
)
+
' '
+
str
(
U_r
)
+
' '
+
str
(
F_r
))
Event Timeline
Log In to Comment