Commit b1625264 authored by peastman's avatar peastman
Browse files

Merge pull request #621 from swails/charmmparameter_fix

Fix issue where the last CMAP defined in a parameter file is not added to the parameter set.
parents 2a06c7be 94ac0e3c
...@@ -13,7 +13,7 @@ Copyright (c) 2014 the Authors ...@@ -13,7 +13,7 @@ Copyright (c) 2014 the Authors
Author: Jason M. Swails Author: Jason M. Swails
Contributors: Contributors:
Date: July 17, 2014 Date: Sep. 17, 2014
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"),
...@@ -471,6 +471,11 @@ class CharmmParameterSet(object): ...@@ -471,6 +471,11 @@ class CharmmParameterSet(object):
except IndexError: except IndexError:
raise CharmmFileError('Could not parse NBFIX terms.') raise CharmmFileError('Could not parse NBFIX terms.')
self.nbfix_types[(min(at1, at2), max(at1, at2))] = (emin, rmin) self.nbfix_types[(min(at1, at2), max(at1, at2))] = (emin, rmin)
# If there were any CMAP terms stored in the parameter set, the last one
# defined will not have been added to the set. Add it now.
if current_cmap is not None:
ty = CmapType(current_cmap_res, current_cmap_data)
self.cmap_types[current_cmap] = ty
# Now we're done. Load the nonbonded types into the relevant AtomType # Now we're done. Load the nonbonded types into the relevant AtomType
# instances. In order for this to work, all keys in nonbonded_types # instances. In order for this to work, all keys in nonbonded_types
# must be in the self.atom_types_str dict. Raise a RuntimeError if this # must be in the self.atom_types_str dict. Raise a RuntimeError if this
......
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