• Jason Swails's avatar
    Improve CHARMM parsing when resnums have inscodes · 7b30da6e
    Jason Swails authored
    Apparently CHARMM PSF files (particularly those printed by VMD's psfgen) can
    have an insertion code tacked on to the end of the residue number, meaning that
    casting to an integer will invariably fail.  We can't just ignore the insertion
    code, though, since it will differentiate from the residues that came before and
    after (which will likely have the same number -- same general idea as insertion
    codes from PDB files). So instead we pull the insertion code off of the residue
    number and extend the Residue object to accommodate that.
    
    This is the port of the fix from ParmEd: ParmEd/ParmEd#98
    
    I added a test for this case.
    7b30da6e
TestCharmmFiles.py 7.15 KB