From: Peter Freddolino (petefred_at_umich.edu)
Date: Mon Apr 04 2016 - 13:19:38 CDT

Dear Akshay,
You could also use autopsf for this, as it was pretty much designed for that purpose. There is a command line version that you could wrap in a for loop to work through your cases. See the namd tutorial and http://www.ks.uiuc.edu/Research/vmd/plugins/autopsf/ for details.
Best,
Peter

> On Apr 3, 2016, at 12:19 PM, Akshay Bhatnagar <akshaybhatnagar2790_at_gmail.com> wrote:
>
> With the given script i can have the -psf.pdb file for only 1 protein during a run and i have 1125 PDB's.
>
> With Regards
> Akshay Bhatnagar
> PhD Student
> BITS Pilani Hyderabad Campus
>
>
> On Sun, Apr 3, 2016 at 9:47 PM, Akshay Bhatnagar <akshaybhatnagar2790_at_gmail.com> wrote:
> Hello everyone
>
> I have created a small script to create psf files for multi-chain proteins. the script is:
>
> package require psfgen
> psfcontext reset
> topology top_all27_prot_na.inp
> set filelist [glob *.PDB]
> foreach file $filelist {
> mol new $file
> set name [file rootname $file]
> set selp [atomselect top "not hetero"]
> set chains [lsort -unique [$selp get pfrag]]
> foreach chain $chains {
> echo $chain
> for {set i 0} {$i <= $chain} {incr i} {
> set sel [atomselect top "pfrag $chain"]
> $sel writepdb $name-$chain.pdb
> pdbalias residue HIS HSP
> pdbalias atom ILE CD1 CD
> pdbalias atom LYS 1HZ HZ1
> pdbalias atom LYS 2HZ HZ2
> pdbalias atom LYS 3HZ HZ3
> pdbalias atom ARG 1HH1 HH11
> pdbalias atom ARG 2HH1 HH12
> pdbalias atom ARG 1HH2 HH21
> pdbalias atom ARG 2HH2 HH22
> pdbalias atom ASN 1HD2 HD21
> pdbalias atom ASN 2HD2 HD22
> pdbalias atom SER HG HG1
> segment MAIN {pdb $name-$chain.pdb}
> coordpdb $name-$chain.pdb MAIN
> guesscoord
> writepdb $file-$chain-psf.pdb
> resetpsf
> }
> }
> }
> while {$chain >= 0} {
> exec cat $file-$chain-psf.pdb >> $name-final.pdb &
> incr chain -1
> echo $chain
> }
>
> But, the psfgen package creates the psf linked pdb files for chains in the reverse order. for example, if a protein has 2 chains A and B, then it creates the psf for B before chain A (chain ID 0 to last chain). Due to this during concatenation of the -psf.pdb files the B chain psf.psd is coming before the A chan psf.pdb files.
>
> Can anyone please help to create psf.pdb for chain A before chain B.
>
> With Regards
> Akshay Bhatnagar
> PhD Student
> BITS Pilani Hyderabad Campus
>
>