"platforms/vscode:/vscode.git/clone" did not exist on "859bfd6ca18f5b2e64616e2fa656d5f3897e4226"
Commit 77e2ddf4 authored by Peter Eastman's avatar Peter Eastman
Browse files

Allow GBSA definitions to be split between multiple files

parent 52c7a1fc
...@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of ...@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org. Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012 Stanford University and the Authors. Portions copyright (c) 2012-2013 Stanford University and the Authors.
Authors: Peter Eastman, Mark Friedrichs Authors: Peter Eastman, Mark Friedrichs
Contributors: Contributors:
...@@ -1005,8 +1005,13 @@ class GBSAOBCGenerator: ...@@ -1005,8 +1005,13 @@ class GBSAOBCGenerator:
@staticmethod @staticmethod
def parseElement(element, ff): def parseElement(element, ff):
existing = [f for f in ff._forces if isinstance(f, GBSAOBCGenerator)]
if len(existing) == 0:
generator = GBSAOBCGenerator() generator = GBSAOBCGenerator()
ff._forces.append(generator) ff._forces.append(generator)
else:
# Multiple <GBSAOBCForce> tags were found, probably in different files. Simply add more types to the existing one.
generator = existing[0]
for atom in element.findall('Atom'): for atom in element.findall('Atom'):
types = ff._findAtomTypes(atom, 1) types = ff._findAtomTypes(atom, 1)
if types is not None: if types is not None:
......
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