From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Apr 08 2014 - 13:23:22 CDT

On Tue, Apr 8, 2014 at 7:23 PM, Ashish .Chauniyal
<ashishchauniyal_at_gmail.com> wrote:
> Dear all,
> I have to read a Lammps data file and make it into a .pdb format. It
> contains only two types of atoms. File given below.

[...]

> # set atom types
> set selc [atomselect top "all"]
> $selc set type Cu
> $selc set resname PPP
> # set residue ID to residue index+1
> set resid {}
> foreach r [$selc get residue] {
> incr r
> lappend resid $r
> }
> $selc set resid $resid
> $selc delete
>
> When i generate a .pdb file from this , it does not have the desired
> boundaries.
> I wanted to use the same to read both kinds of atoms. How exactly do I use
> atomselect to store
> Cu atoms in $selc
> and Zr atoms in $selz

most certainly not by creating a selection that contains *all* atoms.
this just doesn't make any sense at all.

as i already told you on the lammps-users mailing list, this can be
easily rectified through having a closer look at the VMD users's guide
and practicing with the VMD related tutorials. this way you will not
only get your immediate issue solved, but as a bonus gain some
understanding that will help you to solve similar and more complex
problems in the future.

axel.

> regards,
> Ashish

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.