From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Thu Mar 06 2014 - 08:15:10 CST

Hi Pavan,

Your selection can be: set sel [atomselect top "index: 57”]

Simply, copy/paste the code I sent you (use the atom selection above) and it should work.
I’m not sure why you got that error. Perhaps, you are tried to load new pdb file along with old psf?

Maxim

On Mar 6, 2014, at 3:27 AM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:

> And also, when I used the second method to delete the atom. It's deleting atoms and in the output file generated using writepdb <filename.pdb> there are no atoms which I have deleted but, when i tried to visualize it through file-> new molecule->browse-> output.pdb ( unable to load molecule ) is the error coming to me.
>
> Thanks & Regards,
> Venkata Pavan Kumar. Miriyala
> pavan.kumar9111_at_gmail.com,
> contact number: +91-9032307746
>
>
>
> On Thu, Mar 6, 2014 at 2:46 PM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:
> Hello sir, I loaded pdb.file into vmd and continued to follow this commands
> set sel [atomselect top "resid 58"]
> atomselect1
> how to use this because I'm working graphene sheet single layer and I don't have segments here
> when I select an atom to be deleted, I have this data regarding it
> Info) molecule id: 1
> Info) trajectory frame: 0
> Info) name: C
> Info) type: C
> Info) index: 57
> Info) residue: 57
> Info) resname: GRA
> Info) resid: 58
> Info) chain: X
> Info) segname:
> Info) x: 11.052000
> Info) y: 4.963000
> Info) z: 0.000000
> Info) Added new Atoms label GRA58:C
> Now how to use this command ?
>
> set atomList [lsort -unique [$sel get {segname resid}]]
>
>
> Thanks & Regards,
> Venkata Pavan Kumar. Miriyala
> pavan.kumar9111_at_gmail.com,
> contact number: +91-9032307746
>
>
>
> On Wed, Mar 5, 2014 at 11:04 PM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:
> Sir what is that selection_to_delete ? In my case, i have to delete a atom.
>
>
> Thanks & Regards,
> Venkata Pavan Kumar. Miriyala
> pavan.kumar9111_at_gmail.com,
> contact number: +91-9032307746
>
>
>
> On Wed, Mar 5, 2014 at 11:00 PM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
> Right after you load your molecule into VMD, do the following:
>
> set sel [atomselect top "selection_to_delete"]
> set atomList [lsort -unique [$sel get {segname resid}]]
> $sel delete
>
> package require psfgen
> resetpsf
>
> readpsf original_psf_file.psf
> coordpdb original_pdb_file.pdb
>
> foreach atom $atomList {
> delatom [lindex $atom 0] [lindex $atom 1]
> }
>
> writepsf output.psf
> writepdb output.pdb
>
> --------------
>
> You can also try the following:
>
> set sel [atomselect top "not (selection_to_delete)"]
> $sel writepsf output2.psf
> $sel writepdb output2.pdb
> $sel delete
>
> But check if the second approach gives you the same result as the first one.
>
>
> -Maxim
>
>
> On Mar 5, 2014, at 11:09 AM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:
>
> > My atom name is like this GRA 198:C, it's molecular i.d is 2, name C, residue 0, resname GRA, resid 113
> > Now I have to select the atom and delete it using atomselect please help me.
> >
> > Thanks & Regards,
> > Venkata Pavan Kumar. Miriyala
> > pavan.kumar9111_at_gmail.com,
> > contact number: +91-9032307746
> >
> >
> >
> > On Wed, Mar 5, 2014 at 10:31 PM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:
> > I'm very new to vmd. Could you please tell me how to delete atoms through vmd tcl console atom select command?
> >
> > Thanks & Regards,
> > Venkata Pavan Kumar. Miriyala
> > pavan.kumar9111_at_gmail.com,
> > contact number: +91-9032307746
> >
> >
> >
> > On Wed, Mar 5, 2014 at 10:23 PM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
> > Hi there,
> >
> > Take a look at psfgen and its “delatom” command.
> >
> > psfgen user's guide is here:
> > https://www-s.ks.uiuc.edu/Research/vmd/plugins/psfgen/ug.pdf
> >
> > Maxim
> >
> >
> > On Mar 5, 2014, at 10:21 AM, Pavan Miriyala <pavan.kumar9111_at_gmail.com> wrote:
> >
> > > Hello sir,
> > > I made a single layer graphene sheet using nano-builder plug-in. Now I wanted to form a crack in that sheet, for that I'm thinking to delete atoms and bonds in that particular sheet. Please help to do that
> > >
> > > Thanks & Regards,
> > > Venkata Pavan Kumar. Miriyala
> > > pavan.kumar9111_at_gmail.com,
> > > contact number: +91-9032307746
> > >
> >
> >
> >
>
>
>
>