Commit d59f19e4 authored by Andreas Krämer's avatar Andreas Krämer
Browse files

Throw PSF warning only in serious cases

when the number of molecules does not agree
with the number of holders.
parent f38da875
...@@ -335,9 +335,12 @@ class CharmmPsfFile(object): ...@@ -335,9 +335,12 @@ class CharmmPsfFile(object):
set_molecules(atom_list) set_molecules(atom_list)
molecule_list = [atom.marked for atom in atom_list] molecule_list = [atom.marked for atom in atom_list]
if len(holder) == len(atom_list): if len(holder) == len(atom_list):
#if molecule_list != holder: if len(molecule_list) != len(holder):
# warnings.warn('Detected PSF molecule section that is WRONG. ' # The MOLNT section is only used for fluctuating charge models,
# 'Resetting molecularity.', CharmmPSFWarning) # which are currently not supported anyway.
# Therefore, we only check the lengths of the lists now rather than their contents.
warnings.warn('Detected PSF molecule section that is WRONG. '
'Resetting molecularity.', CharmmPSFWarning)
# We have a CHARMM PSF file; now do NUMLP/NUMLPH sections # We have a CHARMM PSF file; now do NUMLP/NUMLPH sections
numlp, numlph = psfsections['NUMLP NUMLPH'][0] numlp, numlph = psfsections['NUMLP NUMLPH'][0]
if numlp != 0 or numlph != 0: if numlp != 0 or numlph != 0:
......
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