From: Salvatore Mario Cosseddu (S.M.Cosseddu_at_warwick.ac.uk)
Date: Fri May 27 2011 - 04:20:55 CDT

Sorry I get confused with bash shell... retry with

proc changename {args} {

foreach {property oldvalue newvalue} $args {

set changing [atomselect top "all and $property $oldvalue"]
puts "changing [$changing num] of $property $oldvalue"
$changing set $property $newvalue
$changing delete

}

set all [atomselect top all]
$all writepdp renamed.pdb
$all delete

}

On 26/05/11 21:51, Cosseddu, Salvatore wrote:
>
> Try something like this:
>
> proc changename {args} {
>
> for {property oldvalue newvalue} in $args {
>
> set changing [atomselect top "all and $property $oldvalue"]
> puts "changing [$changing num] of $property $oldvalue"
> $changing set $property $newvalue
> $changing delete
>
> }
>
> set all [atomselect top all]
> $all writepdp renamed.pdb
> $all delete
>
> }
>
> Source this when you load your pdb file as top molecule.
>
> then call
>
> changeneme resname HOH TIP3 <2nd_property> <2nd_oldvalue>
> <2rd_oldvalue> <3nd_property> <3nd_oldvalue> <3rd_oldvalue>
>
> I haven't tested it
>
> Regards
> --
> Salvatore Cosseddu
> PhD student
>
> Centre for Scientific Computing and School of Engineering
> University of Warwick
> Coventry CV4 7AL
> United Kingdom
>
> email: S.M.Cosseddu_at_warwick.ac.uk
>
>
>
>
> -----Original Message-----
> From: owner-vmd-l_at_ks.uiuc.edu on behalf of Edward Lyman
> Sent: Thu 26/05/2011 16:33
> To: vmd-l_at_ks.uiuc.edu
> Subject: vmd-l: tips for an annoying aliasing task?
>
> Hi all,
>
> I have a membrane protein system built with Maestro, which I can read
> into vmd and write out pdb's for the water, membrane, protein etc. The
> naming convention doesn't match charmm though, so I need to alias a
> whole lot of atoms. Can anyone offer some effort saving tips for such
> a job? (Apart from rebuilding the systme within vmd)
>
> Thx,
> Ed
>

-- 
Salvatore Cosseddu
PhD student
Centre for Scientific Computing and School of Engineering
University of Warwick
Coventry CV4 7AL
United Kingdom
email: S.M.Cosseddu_at_warwick.ac.uk