RE: charmm to namd conversion

From: Matthew B. Roark (Roarkma_at_wabash.edu)
Date: Wed Jun 06 2012 - 15:40:23 CDT

I am still not able to make a system trying psfgen. Following instructions at: http://www.ks.uiuc.edu/Research/vmd/plugins/psfgen/ug.pdf, I am able to produce a psf and pdb but psfgen is clipping water molecules. I used:
grep 'TIP3' namd.pdb > water.pdb

to separate the water segment.

I used the command:
segment TIP3 {
auto none
pdb water.pdb
}
coordpdb water.pdb TIP3

and part of the output reads:
building segment TIP3
disabling angle autogeneration
disabling dihedral autogeneration
reading residues from pdb file water.pdb
duplicate residue key 100

This message continues for many keys. I am using 1495 water molecules (that is, 1495 residues in one segment). It seems that psfgen can only count to 999 and the next residue overflows to 100 (instead of 1000) which of course already exists. Is psfgen really not able to handle ~1500 waters? I know that there is a workaround to just
break up the water segment but I want to retain the naming scheme I started with. I will be writing dcd trajectories that I hope will be compatible with CHARMM dcd trajectories of the exact same simulation. I'd like to be able to read in both trajectories in the same CHARMM script. Using a different naming scheme for a NAMD and CHARMM simulation of the same system seems overly complicated. Is there a way to make psfgen work with the waters?
________________________________________
From: Felipe Merino [felmerino_at_uchile.cl]
Sent: Monday, June 04, 2012 2:37 PM
To: Matthew B. Roark; namd-l_at_ks.uiuc.edu
Subject: Re: namd-l: charmm to namd conversion

Hi,

What i do in those cases (just my personal opinion) is to create a pdb file with the coordinates and then create the psf from scratch in vmd. For me it is much cleaner. You just have to divide your pdb in several segments and to take care that none of those have more than the limit of residues per segment allowed by psfgen (i think it is 10k, but i am not sure) which is usually the case for the solvent. For the velocities (if you have them) you can just read then as coordinates and then ask vmd to write a binary file and the you can do you restart with fresh and appropriate files.

best

Felipe

----Mensaje original----
De: Roarkma_at_wabash.edu
Fecha: 04-jun-2012 13:29
Para: "namd-l_at_ks.uiuc.edu"<namd-l_at_ks.uiuc.edu>
Asunto: namd-l: charmm to namd conversion

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:05 CST