Unverified Commit 7030c229 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2596 from peastman/charmm

Accept more variants of labels in CHARMM files
parents 4442c095 32b0ed47
...@@ -9,10 +9,10 @@ Structures at Stanford, funded under the NIH Roadmap for Medical Research, ...@@ -9,10 +9,10 @@ Structures at Stanford, funded under the NIH Roadmap for Medical Research,
grant U54 GM072970. See https://simtk.org. This code was originally part of grant U54 GM072970. See https://simtk.org. This code was originally part of
the ParmEd program and was ported for use with OpenMM. the ParmEd program and was ported for use with OpenMM.
Copyright (c) 2014 the Authors Copyright (c) 2014-2020 the Authors
Author: Jason M. Swails Author: Jason M. Swails
Contributors: Jing Huang Contributors: Jing Huang, Peter Eastman
Date: Sep. 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
...@@ -247,25 +247,25 @@ class CharmmParameterSet(object): ...@@ -247,25 +247,25 @@ class CharmmParameterSet(object):
parameterset = line.strip()[1:78] parameterset = line.strip()[1:78]
continue continue
# Set section if this is a section header # Set section if this is a section header
if line.startswith('ATOMS'): if line.startswith('ATOM'):
section = 'ATOMS' section = 'ATOMS'
continue continue
if line.startswith('BONDS'): if line.startswith('BOND'):
section = 'BONDS' section = 'BONDS'
continue continue
if line.startswith('ANGLES'): if line.startswith('ANGL') or line.startswith('THET'):
section = 'ANGLES' section = 'ANGLES'
continue continue
if line.startswith('DIHEDRALS'): if line.startswith('DIHE') or line.startswith('PHI'):
section = 'DIHEDRALS' section = 'DIHEDRALS'
continue continue
if line.startswith('IMPROPER'): if line.startswith('IMPR') or line.startswith('IMPH'):
section = 'IMPROPER' section = 'IMPROPER'
continue continue
if line.startswith('CMAP'): if line.startswith('CMAP'):
section = 'CMAP' section = 'CMAP'
continue continue
if line.startswith('NONBONDED'): if line.startswith('NONB') or line.startswith('NBON'):
read_first_nonbonded = False read_first_nonbonded = False
section = 'NONBONDED' section = 'NONBONDED'
fields = line.upper().split() fields = line.upper().split()
......
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