Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
7a8c03dd
"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "c4dbd03e3fcbfda3abb417db603d391079425696"
Commit
7a8c03dd
authored
Jul 09, 2018
by
Jing Huang
Browse files
Extend CHARMM psf parser to Drude systems.
parent
bc008d45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+11
-1
No files found.
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
7a8c03dd
...
@@ -11,7 +11,7 @@ the ParmEd program and was ported for use with OpenMM.
...
@@ -11,7 +11,7 @@ the ParmEd program and was ported for use with OpenMM.
Copyright (c) 2014-2016 the Authors
Copyright (c) 2014-2016 the Authors
Author: Jason M. Swails
Author: Jason M. Swails
Contributors:
Contributors:
Jing Huang
Permission is hereby granted, free of charge, to any person obtaining a
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
copy of this software and associated documentation files (the "Software"),
...
@@ -130,6 +130,12 @@ class CharmmPsfFile(object):
...
@@ -130,6 +130,12 @@ class CharmmPsfFile(object):
- acceptor_list # hbond acceptors?
- acceptor_list # hbond acceptors?
- group_list # list of nonbonded interaction groups
- group_list # list of nonbonded interaction groups
Four additional lists for Drude psf:
- drudeconsts_list
- drudepair_list
- lonepair_list
- aniso_list
Additional attribute is available if a CharmmParameterSet is loaded into
Additional attribute is available if a CharmmParameterSet is loaded into
this structure.
this structure.
...
@@ -186,6 +192,8 @@ class CharmmPsfFile(object):
...
@@ -186,6 +192,8 @@ class CharmmPsfFile(object):
line
.
strip
())
line
.
strip
())
# Store the flags
# Store the flags
psf_flags
=
line
.
split
()[
1
:]
psf_flags
=
line
.
split
()[
1
:]
# Determine whether it's a Drude polarizable system
IsDrudePSF
=
'DRUDE'
in
psf_flags
# Now get all of the sections and store them in a dict
# Now get all of the sections and store them in a dict
psf
.
readline
()
psf
.
readline
()
# Now get all of the sections
# Now get all of the sections
...
@@ -203,6 +211,8 @@ class CharmmPsfFile(object):
...
@@ -203,6 +211,8 @@ class CharmmPsfFile(object):
# Parse all of the atoms
# Parse all of the atoms
residue_list
=
ResidueList
()
residue_list
=
ResidueList
()
atom_list
=
AtomList
()
atom_list
=
AtomList
()
if
IsDrudePSF
:
drudeconsts_list
=
TrackedList
()
for
i
in
xrange
(
natom
):
for
i
in
xrange
(
natom
):
words
=
psfsections
[
'NATOM'
][
1
][
i
].
split
()
words
=
psfsections
[
'NATOM'
][
1
][
i
].
split
()
system
=
words
[
1
]
system
=
words
[
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment