Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97465500
amberparm_mass_to_lt.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
Sat, Jan 4, 12:01
Size
483 B
Mime Type
text/x-python
Expires
Mon, Jan 6, 12:01 (2 d)
Engine
blob
Format
Raw Data
Handle
23413560
Attached To
rLAMMPS lammps
amberparm_mass_to_lt.py
View Options
#!/usr/bin/env python
import
sys
lines_gaff
=
sys
.
stdin
.
readlines
()
sys
.
stdout
.
write
(
' write_once(
\"
Data Masses
\"
) {
\n
'
)
for
i
in
range
(
0
,
len
(
lines_gaff
)):
line
=
lines_gaff
[
i
]
tokens
=
line
.
split
()
atype
=
tokens
[
0
]
mass
=
tokens
[
1
]
# what is the next number? (the one in tokens[2]?)
comments
=
' '
.
join
(
tokens
[
3
:])
sys
.
stdout
.
write
(
' @atom:'
+
atype
+
' '
+
mass
+
' # '
+
comments
+
'
\n
'
)
sys
.
stdout
.
write
(
' } # (end of masses)
\n
'
)
sys
.
stdout
.
write
(
'
\n
'
)
Event Timeline
Log In to Comment