Commit ec12f1df authored by Jason Swails's avatar Jason Swails
Browse files

When looking at the file names of CHARMM parameter/topology files, only look at

the file name (not the path) for "top" and "par" to determine file type.  Often
enough, these files are stored in a "toppar" directory, so all of them will be
interpreted as RTF files.
parent 1dbc9a65
......@@ -33,6 +33,7 @@ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import os
from simtk.openmm.app.internal.charmm._charmmfile import (
CharmmFile, CharmmStreamFile)
from simtk.openmm.app.internal.charmm.topologyobjects import (
......@@ -122,9 +123,10 @@ class CharmmParameterSet(object):
elif arg.endswith('.str'):
strs.append(arg)
elif arg.endswith('.inp'):
if 'par' in arg:
fname = os.path.split(arg)[1]
if 'par' in fname:
pars.append(arg)
elif 'top' in arg:
elif 'top' in fname:
tops.append(arg)
else:
raise TypeError('Unrecognized file type: %s' % arg)
......
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