From: Myunggi Yi (myunggi_at_gmail.com)
Date: Fri May 22 2009 - 09:19:36 CDT

This is very useful. Thanks.

BTW, if you have a correct .top file, then amber (tleap and ptraj)
recognizes segments correctly without TER card.

On Wed, May 20, 2009 at 5:28 PM, Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu
> wrote:

> On Wed, 2009-05-20 at 15:49 -0400, Yi Shang wrote:
> > Dear there,
>
> dear miranda,
>
> > I wanted to load pdb files generated by VMD into tleap (in AMBER
> > package).
> > But I notice that Hydrogen naming in pdb files generated by VMD, is
> > different from those naming of pdb files generated by tleap.
> > for VMD pdbs: 2HD, 3HD, 2HG, HD21, HD32.....
> > for tleap pdbs: HD2, HD3, HG2, 1HD2, 2HD3......
> > It's giving my a hard time when I use ptraj (another program in AMBER
> > package)
> > and now tleap.
> >
> > I wonder how these naming inconsistency happened. And hope I can get
> > some suggestions here to get away with it.
>
> as far as i know, this has nothing to do with VMD itself, but rather
> the difference in naming conventions between charmm and amber. you can
> easily write a small script that converts between one and the other.
> it may be most convenient to put it into your .vmdrc
>
> say you create a list of mappings:
>
> set chm2ambmap = { {2HD HD2} {3HD HD3} {2HG HG2} {HD21 1HD2} {HD32
> 2HD3} ... }
>
> global chm2ambmap
>
> then you can do for the forward conversion:
>
> proc chm2amb {molid} {
> global chm2ambmap
>
> set cnt 0
> foreach p $amb2chm {
> set sel($cnt) [atomselect $molid "name [lindex $p 0]"]
> incr cnt
> }
>
> set cnt 0
> foreach p $amb2chm {
> $sel($cnt) set name [lindex $p 1]
> $sel($cnt) delete
> incr cnt
> }
> }
>
> and for the reverse process
>
> proc amb2chm {molid} {
> global chm2ambmap
>
> set cnt 0
> foreach p $amb2chm {
> set sel($cnt) [atomselect $molid "name [lindex $p 1]"]
> incr cnt
> }
>
> set cnt 0
> foreach p $amb2chm {
> $sel($cnt) set name [lindex $p 0]
> $sel($cnt) delete
> incr cnt
> }
> }
>
> and then just call the command
>
> chm2amb top
> or
> chm2amb 1
>
> whenever you want to convert a specific molecule's
> naming conventions. there are similar ones for the
> residue names, so you want to include this as well.
>
> > Another question: the VMD pdbs are single chain molecule by default,
> > how could I specify it to add 'TER' in between protein, ligand, or
> > water, water?
>
> right now you would have to write a small script that post
> processes your .pdb file with, e.g., awk, perl, or python,
> and split it apart based on some other information, e.g.
> segment name or chain id.
>
> making VMD insert these automatically would be conceivable
> if there was a consensus as to what indicator would be
> the correct one. there is, however, always the concern that
> any choice would break other programs that have different
> conventions.
> i would not want to have TER records between individual waters,
> though, as that would blow files up significantly.
>
> cheers,
> axel.
>
> >
> > Thank you all!
> >
> >
> >
> > --
> > Miranda
>
> --
> =======================================================================
> Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.
>
>

-- 
Best wishes,
Myunggi Yi
==================================
KLB 419
Institute of Molecular Biophysics
Florida State University
Tallahassee, FL 32306
Office: (850) 645-1334
http://sites.google.com/site/myunggi/