Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91600465
fep.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, Nov 12, 14:38
Size
480 B
Mime Type
text/x-python
Expires
Thu, Nov 14, 14:38 (2 d)
Engine
blob
Format
Raw Data
Handle
22264970
Attached To
rLAMMPS lammps
fep.py
View Options
#!/usr/bin/env python
# fep.py - calculate free energy from compute fep results
import
sys
,
math
if
len
(
sys
.
argv
)
<
2
:
print
"Free Energy Perturbation"
print
"usage: fep.py temperature < fep.lmp"
sys
.
exit
()
rt
=
0.008314
/
4.184
*
float
(
sys
.
argv
[
1
])
v
=
1.0
sum
=
0.0
for
line
in
sys
.
stdin
:
if
line
.
startswith
(
"#"
):
continue
tok
=
line
.
split
()
if
len
(
tok
)
==
4
:
v
=
float
(
tok
[
3
])
sum
+=
math
.
log
(
float
(
tok
[
2
])
/
v
)
print
-
rt
*
sum
Event Timeline
Log In to Comment