Hi all,
I hacked together this little python script, which converts from all27ff to all36ff without invoking CHARMM.
Another task it can do for you is to adjust the MASS IDs in the PSF to the topology (rtf) file you provide. This comes in handy if you merged some topology files and the MASS IDs have changed and you need to adjust them.
All the script needs is a RTF and your PSF and optionally the according CRD file.
It reads the RTF file and replaces current values in your PSF/CRD with those read from the RTF. So it also takes care of changes in the RTF additionally to renaming PC residues to the new naming scheme. The renaming can be omitted with the "-s" switch if you only want to adept your PSF to a modified RTF.
Well, so much in theory. It works for my test files.
Please use it careful and report back if it breaks something.
Furthermore I didn't test the "Extended" PSF format and since I had to reassemble the column layout from the Fortran source, there might be glitches.
As said, it worked for my files.
So please give it a shot and report back so I can fix the remaining glitches.The file can be downloaded from here:
http://olausson.de/scriptarchive/16-modeling/75-psfftpy(Scroll to the bottom of the page to download the src file)
Usage: psfft.py [options]
Options:
-h, --help show this help message and exit
-p FILE Old PSF file. [REQUIRED]
-c FILE CRD (human readable) file. [OPTIONAL]
-r FILE Path to RTF file. [REQUIRED]
-a FILE Supplementary rtf or toppar stream file. Can be used more then once. [OPTIONAL]
-o FILE Name of the new PSF and/or CRD file [REQUIRED]
-s Skip conversion from c27ff to c36ff. Usefull for merged FFs
where the MASS ID changed. [OPTIONAL]
Cheers
Bjoern