From: Akshay Bhatnagar (
Date: Tue Jul 28 2015 - 01:10:19 CDT

As suggested i have changed the script accordingly. But the errors are
same, i.e it is considering every residue as duplicate residue and giving
an error in psf generation.

The script is:

package require autopsf
topology top_all27_prot_lipid.inp
set filelist [glob *.PDB]
  foreach file $filelist {
set name [file rootname $file]
pdbalias residue HIS HSE
pdbalias atom ILE CD1 CDsource
segment A {pdb $file}
coordpdb $file A
writepdb $name.pdb
writepsf $name.psf

Please help. i am not able to find the defect in the script.

With Regards
Akshay Bhatnagar
PhD Student
BITS Pilani Hyderabad Campus

On Sat, Jul 25, 2015 at 4:30 AM, Tristan Croll <>

> You would be much better off using AutoPSF for a task like this. PSFgen
> alone will treat your protein like a single connected chain (so residues
> either side of a gap will become connected to each other) and, as you have
> already discovered, won't automatically handle ligands. AutoPSF is the
> front-end that handles all of that before feeding to PSFgen, and can be
> called from a non-interactive script.
> Cheers,
> Tristan
> Tristan Croll
> Lecturer
> Faculty of Health
> School of Biomedical Sciences
> Institute of Health and Biomedical Engineering
> Queensland University of Technology
> 60 Musk Ave
> Kelvin Grove QLD 4059 Australia
> +61 7 3138 6443
> This email and its attachments (if any) contain confidential information
> intended for use by the addressee and may be privileged. We do not waive
> any confidentiality, privilege or copyright associated with the email or
> the attachments. If you are not the intended addressee, you must not use,
> transmit, disclose or copy the email or any attachments. If you receive
> this email by mistake, please notify the sender immediately and delete the
> original email.
> On 24 Jul 2015, at 3:25 pm, Akshay Bhatnagar <
>> wrote:
> Thank you very much for your suggestions.
> As you said, i have started with the tcl script (shown below), i am able
> to upload all the molecules in one go, but for some reason the output psf
> and pdb do not show any atoms. can anyone please help me to correct the
> script.
> the script is:
> set filelist [glob *.PDB]
> foreach file $filelist {
> mol new $file
> package require psfgen
> topology top_all27_prot_lipid.inp
> pdbalias residue HIS HSE
> pdbalias atom ILE CD1 CD
> writepdb $file.pdb
> writepsf $file.psf
> }
> Your help is greatly appreciated.
> With Regards
> Akshay Bhatnagar
> PhD Student
> BITS Pilani Hyderabad Campus
> On Wed, Jul 22, 2015 at 12:14 AM, Josh Vermaas <>
> wrote:
>> Just an FYI, this usually won't work particularly well unless the
>> proteins are well behaved. Usually there are missing pieces in pdb files
>> that need manual intervention. That being said, autopsf has a tcl interface:
>> package require autopsf
>> autopsf -mol top -top topologyfilehere
>> Check the other autopsf options to see if they might be useful to you.
>> -Josh Vermaas
>> On 07/21/2015 02:33 AM, Ashar Malik wrote:
>> To start you off, make a list of all the pdb. Read them into a tcl
>> script. Run a for loop for the number of pdb files you have and in each
>> loop use the psfgen package.
>> Try it. If you are still stuck .. Drop another email.
>> On Jul 21, 2015 12:19 PM, "Akshay Bhatnagar" <
>>> wrote:
>>> Hello everyone
>>> I have around 5000 proteins and i want to generate 5000 psf and
>>> subsequently generated pdb files for all these 5000 proteins in one shot. I
>>> have always use automatic psf generate method to generate psf. Now please
>>> anyone help in generating a tcl script through which i can generate all the
>>> 5000 psf and pdb files in one go using the script.
>>> With Regards
>>> Akshay Bhatnagar
>>> PhD Student
>>> BITS Pilani Hyderabad Campus