"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "c4dbd03e3fcbfda3abb417db603d391079425696"
Commit 7a8c03dd authored by Jing Huang's avatar Jing Huang
Browse files

Extend CHARMM psf parser to Drude systems.

parent bc008d45
...@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment