charmm to namd conversion

From: Matthew B. Roark (Roarkma_at_wabash.edu)
Date: Mon Jun 04 2012 - 12:29:55 CDT

I am having many problems getting a CHARMM simulation converted to NAMD-readable formats on a Rocks 5.1 cluster. My first method was to use CHARMM to write a psf in xplor format
and coordiantes in pdb format. NAMD complains:
Fatal error on PE 0> FATAL ERROR: ABNORMAL EOF FOUND - buffer=*end*

>From what I could tell this is a formatting error in either the psf or pdb. Is it possible to distinguish which one is causing the problem?

My next approach was to use scripts provided on the NAMD website (http://www.ks.uiuc.edu/Research/namd/wiki/index.cgi?NamdAndCHARMM), charmm2namd and crd2pdb. Neither of these scripts work.
Running charmm2namd results in:

PSF EXT CMAP CHEQ

       3 !NTITLE
* RESIDUES WITHOUT PATCHING
* DATE: 6/ 1/11 14: 0:58 CREATED BY USER: roarkma
* Converted to NAMD format using ../toppar/toppar_all.str on Mon Jun 4 13:21:28 2012

     79901 !NATOM
Traceback (most recent call last):
  File "./charmm2namd", line 81, in ?
    linetuple=(int(line[0]),line[1],line[2],line[3],line[4],line[5],float(line[6]),float(line[7]),int(line[8]))
ValueError: invalid literal for int(): 0 0.00000 -0.301140E-02

I see that my psf has 11 columns and the script is reading the first 9, but somehow the script is using the last 3 columns combined. I'm not familiar with python so I am unsure how to fix this.

Running crd2pdb results in:

Traceback (most recent call last):
  File "./crd2pdb", line 27, in ?
    numofatoms = float(buffer)
ValueError: invalid literal for float(): 79901 EXT

This is very frustrating. How much have these scripts been tested? I have tried 2 methods to use "compatible" formats and yet I have gotten zero progress. Can anyone shed some light on
(1) doing the conversion within CHARMM or (2) troubleshooting the NAMD scripts?

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:22:03 CST