RE: combine pdb files

From: JC Gumbart (
Date: Sun Jun 03 2007 - 10:33:02 CDT

Just to add to that, if you already have created separate psf files, you can
do it even more easily:

readpsf protein.psf
coordpdb protein.pdb
readpsf sugar.psf
coordpdb sugar.pdb

writepsf ___.psf
writepdb ___.pdb

-----Original Message-----
From: [] On Behalf
Of Jeffrey J. Potoff
Sent: Sunday, June 03, 2007 10:12 AM
To: Richard Casey
Subject: Re: namd-l: combine pdb files

On Sun, 3 Jun 2007, Richard Casey wrote:

> Hello,
> I have two separate PDB files, call them protein.pdb and sugar.pdb, that
> I need to combine into a single PDB file before running NAMD
> simulations. Does anyone know how to combine PDB files?

The easiest way is to write a tcl script to do this. Save the
following in a file (build.tcl, for example), make executable and do
./build.tcl at the command prompt

psfgen <<ENDMOL
topology top_all27_prot_lipid.inp

# build protein
segment PROT {
  pdb protein.pdb
  first none
  last none
# first none, last none req'd to prevent auto termination of residues.

#build sugar segment
segment SUG {
  auto none
  pdb sugar.pdb

#Read coordinates
coordpdb protein.pdb PROT
coordpdb sugar.pdb SUG

#write PSF and PDB files
writepsf protein_start.psf
writepdb protein_start.pdb

Jeffrey J. Potoff
Associate Professor Wayne State University
Department of Chemical Engineering and Materials Science
5050 Anthony Wayne Dr Phone:(313)577-9357
Detroit, MI 48202 Fax: (313)577-3810

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:44:47 CST