Unverified Commit 833817ca authored by charmm-gui's avatar charmm-gui Committed by GitHub
Browse files

Atom types in CHARMM FF are non-case-sensitive (#3273)

* Atom types in CHARMM FF are non-case-sensitive

* Atom type name in CHARMM RTF

* Make atom section in CHARMM PSF file to be uppercase
parent 54c9ceb9
......@@ -232,6 +232,7 @@ class CharmmParameterSet(object):
previous = ''
for line in f:
line = previous+line.strip()
line = line.upper()
previous = ''
if line.endswith('-'):
# This will be continued on the next line.
......@@ -598,7 +599,7 @@ class CharmmParameterSet(object):
own_handle = False
f = tfile
for line in f:
line = line.strip()
line = line.strip().upper()
if line[:4] != 'MASS': continue
words = line.split()
try:
......
......@@ -569,6 +569,7 @@ class CharmmPsfFile(object):
else:
pointers = tuple([conv(w, int, 'pointer') for w in words])
line = psf.readline().strip()
if title == 'NATOM': line = line.upper()
if not line and title.startswith('NNB'):
# This will correctly handle the NNB section (which has a spurious
# blank line) as well as any sections that have 0 members.
......@@ -580,6 +581,7 @@ class CharmmPsfFile(object):
while line:
data.append(line)
line = psf.readline().strip()
if title == 'NATOM': line = line.upper()
else:
while line:
words = line.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