From: Ioana Cozmuta (ioana_at_nas.nasa.gov)
Date: Tue Jul 22 2003 - 21:17:10 CDT

Hi Justin,

Thanks for the suggestion, it worked indeed if I use {}.
I have several K+ ions and I want to select them all at once, that;'s why
I use the * character (I want to fix all the K+ ions).

Thanks again,
Ioana

On Tue, 22 Jul 2003, Justin Gullingsrud wrote:

> Ioana,
>
> Try using curly braces instead of quotes around your atom selection:
>
> set fix1 [atomselect top {resname "K+.*"}]
>
> BTW, if the resname is just "K+", why do you need the ".*"? That should
> only be necessary if you are trying to match (in a regular expression sense)
> all resnames that start with K+.
>
> Cheers,
> Justin
>
> On Tue, Jul 22, 2003 at 07:03:56PM -0700, Ioana Cozmuta wrote:
> > Hi John,
> >
> > Sorry to get back to you, I've tried all the combinations I could imagine
> > and ...it seems that I skipped one -the good one :) because I can not get
> > to select the ions in my file separately.
> > The ions are named K+ and I want to select all of them at once so I use
> > K+.*
> > I want to use something like
> > set fix1 [atomselect top "resname SPM"]
> > which works fine, however when I try
> > set fix1 [atomselect top "resname "K+.*""]
> > I get
> > extra characters after close-quote
> > if I use
> > set fix1 [atomselect top 'resname "K+.*"']
> > I get the same error message
> > extra characters after close-quote
> > If I use only one set of ""
> > set fix1 [atomselect top "resname K+.*"]
> > ERROR) Selection terminated too early
> > syntax error
> > ERROR) Bad character:46:.
> > atomselect: cannot parse selection text: resname K+.*
> >
> > I've tried to put the "\" character before and after the *, the + etc but
> > it does not work.
> >
> > I would appreciate if you could help me understand what exactly does not
> > work.
> > Thank you,
> > Ioana
> >
> >
> >
> >
> > On Tue, 24 Jun 2003, John Stone wrote:
> >
> > >
> > > Ioana,
> > > You may need to use the '\' character to escape the '+' and '-'
> > > characters in your atom selections since they are meaningful to
> > > the regular expression parser. There are a few examples in the
> > > VMD manual here:
> > > http://www.ks.uiuc.edu/Research/vmd/current/ug/node81.html#4963
> > >
> > > Let us know if you still need help with this.
> > >
> > > Thanks,
> > > John Stone
> > > vmd_at_ks.uiuc.edu
> > >
> > > On Mon, Jun 23, 2003 at 02:16:02PM -0700, Ioana Cozmuta wrote:
> > > > Hi,
> > > >
> > > > I am trying to set the K+ and Cl- atoms fixed in my structure. When I
> > > > generate the representations I use
> > > > resname "K+.*" and resname "Cl-.*" respectively
> > > > However in the log file when I use
> > > >
> > > > mol new {23KClSpmBox.pdb} type {pdb} first 0 last -1 stride 1 waitfor 1
> > > > set all [atomselect top all]
> > > > set fix1 [atomselect top "resname "K+.*""]
> > > > set fix2 [atomselect top "resname "Cl-.*""]
> > > > $all set beta 0
> > > > $fix1 set beta 1
> > > > $fix2 set beta 1
> > > > $all writepdb fixKCl_spm.pdb
> > > > quit
> > > >
> > > > Could you help me figure out what is the correct way to define the residue
> > > > name for K+ and Cl-?
> > > >
> > > > Thank you,
> > > > Ioana
> > >
> > > --
> > > NIH Resource for Macromolecular Modeling and Bioinformatics
> > > Beckman Institute for Advanced Science and Technology
> > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> > >
>
> --
>
> Justin Gullingsrud 3111 Beckman Institute 217-244-8946
> I been dropping the new science, and I be kicking the new knowledge,
> and I'm seeing to a degree that you can't get in college. -- b.boys
>