From: Tristan Croll (tristan.croll_at_qut.edu.au)
Date: Sat Aug 08 2015 - 04:55:19 CDT

A few comments:

- "package require psfgen" only needs to run once. Put it out the front of the loop.

- "resetpsf" doesn't do what I suspect you think it does. It causes psfgen to forget the details of the protein you just processed, but keeps the topology in memory. This is a problem in your case, because the VMD standard topology (top_all27_prot_lipid_na.inp) should already be loaded. I'm not sure what loading a topology that duplicates most of the residues will do, but it probably won't be good. At best it will be superfluous. If you do want to use your own topology, what you want is "psfcontext reset". Put this out in front of your loop as well, followed by "topology top_all27_prot_lipid.inp". Then leave the resetpsf command in the loop as is.

- the HSE residues of course are not in the original PDB files - they're HIS. That's what the line "pdbalias HIS HSE" does: renames all HIS residues to HSE (histidine singly protonated on the epsilon nitrogen). Not sure why the error - perhaps psfgen is becoming confused because you have two essentially duplicate topology files loaded.

To summarise, your script should look like:

package require psfgen

psfcontext reset

topology top_all27_prot_lipid.inp

foreach file [glob *.pdb] {

..

resetpsf

}

Hope this helps,

Tristan

________________________________
From: Akshay Bhatnagar <akshaybhatnagar2790_at_gmail.com>
Sent: Saturday, 8 August 2015 6:35 PM
To: Tristan Croll
Cc: Josh Vermaas; Ashar Malik; vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: Generating PSF for several proteins in one shot

Hello

I have got the script working. It is like this:

set filelist [glob *.PDB]
  foreach file $filelist {
    mol new $file
    set name [file rootname $file]
    set selp [atomselect top protein]
    echo $selp
    $selp writepdb $file-1.pdb
package require psfgen
topology top_all27_prot_lipid.inp
pdbalias residue HIS HSE
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 U {pdb $file-1.pdb}
coordpdb $file-1.pdb U
guesscoord
writepdb $name-psf.pdb
writepsf $name-psf.psf
resetpsf
}

The only problem is i am getting an error :

psfgen) Info: generating structure...psfgen) unknown residue type HSE
failed!
ERROR: failed on end of segment
MOLECULE DESTROYED BY FATAL ERROR! Use resetpsf to start over.

But i have thoroughly checked the pdb file, but there is no residue by the name 'HSE'. therefore i am unable to identify the actual problem. can any help please!!!

With Regards
Akshay Bhatnagar
PhD Student
BITS Pilani Hyderabad Campus

On Tue, Jul 28, 2015 at 11:46 AM, Tristan Croll <tristan.croll_at_qut.edu.au<mailto:tristan.croll_at_qut.edu.au>> wrote:
Hi Akshay,

While you have "package require autopsf" in your script, you're not actually using AutoPSF. All the commands in your script are still psfgen ones. I'd suggest having a good read of the manual page for AutoPSF.

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 28 Jul 2015, at 4:10 pm, Akshay Bhatnagar <akshaybhatnagar2790_at_gmail.com<mailto:akshaybhatnagar2790_at_gmail.com>> wrote:

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
resetpsf
}

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 <tristan.croll_at_qut.edu.au<mailto:tristan.croll_at_qut.edu.au>> wrote:
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 <akshaybhatnagar2790_at_gmail.com<mailto:akshaybhatnagar2790_at_gmail.com>> 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--_000_BY1PR0101MB1174A0BAC714A3E3B8C141A6DD720BY1PR0101MB1174_--