Re: [AMBER] Running tleap for topology generation of a list of pdb files.

From: Alechania Misturini <>
Date: Fri, 23 Nov 2018 09:33:56 -0200

Hi Leena,
If you are used to the linux terminal, you can do it this with a bash
script like this (file named **):


*ff="leaprc.gaff" #change your ff source line*
*resname="mol" #change your unit name line*

*#loop to generate <> and execute*
*for pdbname in a*.pdb ; do*
*prefix=${pdbname%".pdb"} # pdb prefix, to generate respective prmtop and

*#add/remove options of your <> if you need*
*cat > <> << EOF*
*source ${ff}*
*${resname} = loadpdb ${pdbname}*
*loadamberparams ${prefix}.frcmod*
*saveamberparm ${resname} ${pdbname}.prmtop ${pdbname}.crd*

*cat <> #you can coment this line if dont wanna see
the inputs before they are runned*

*tleap -f <>*

Save this file, give execution permissions (type: chmod +x,
and, in the same directory of your pdb files, run it (./
I put some comments (text before #), sou you can manipulate it as you wish.
If you experience some trouble, contact me...


Em sex, 23 de nov de 2018 às 08:55, Leena Aggarwal <>

> Dear Amber Users
> I have a list of pdb files whose name differs just by number like a1.pdb,
> a2.pdb, a3.pdb and so on. I have to generate topology files for each of
> them using same force field. Is there a way to generate these topology
> files by running a single script in tleap in one go??
> From
> Leena Aggarwal
> University of Delhi
> _______________________________________________
> AMBER mailing list

Alechania Misturini
Mestranda em Físico-Química
Bacharel e Licenciada em Química
Grupo de Estrutura Eletrônica Molecular –〈
*Departamento de Química – CFM*
*Universidade Federal de Santa Catarina – Brasil*
AMBER mailing list
Received on Fri Nov 23 2018 - 04:00:02 PST
Custom Search