Message-ID: <4B474AAE.6080609@eml-r.villa-bosch.de> Date: Fri, 08 Jan 2010 16:09:34 +0100 From: Vlad Cojocaru User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6) Gecko/20091206 SeaMonkey/2.0.1 MIME-Version: 1.0 To: Axel Kohlmeyer Subject: Re: vmd-l: allowing negative 'resid' numbers in selection strings References: <4B473980.7060706@eml-r.villa-bosch.de> <1262962141.29092.53.camel@localhost> In-Reply-To: <1262962141.29092.53.camel@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thanks Axel for the answer, So the quotes around each negative number are required . This means if I have a list returned by a command. I cannot use it in a subsequent selection string unless I introduce quotes around the negative elements of the list. The 2 commands below is an trivialization of what I was trying to do in a script I am writing .. set resids [ [ atomselect $molid "$string" ] get resid ] set sel [ atomselect $molid "$resids" ] I managed to fix the script to get rid of the problem but maybe it would be nice to eliminate the requirement for quoting negative numbers in selection strings using the 'resid' keyword. I'll take a look to see if there is a way to fix this (unless its too complicated). Best wishes Vlad Axel Kohlmeyer wrote: > On Fri, 2010-01-08 at 14:56 +0100, Vlad Cojocaru wrote: > >> Dear VMD developers, >> > dear vlad, > > >> Is it possible to change the VMD code such as to allow negative numbers >> in selection strings using the keyword 'resid' ? >> In many PDB files, residues that were added at the N-terminus of a >> protein for the purification are labeled with negative resids. Currently >> VMD does not allow negative 'resids' in selection strings. However the >> > correction. VMD _does_ allow it. at least the version i have on > my desktop. try 'resid "-1"' or "resid< 0". > > >> command "[ atomselect $molid "$string" ] get resid" outputs a list which >> contains the negative 'resids'. This creates a bit of confusion in >> scripts that process pdb files with negative 'resids' >> > well, this is indeed a bit of a problem. the scripts will have to be > "fixed up" to be safe to use with negative resids. there are other > issues, many more severe than what you are reporting, with many > scripts that make assumptions about the kind of information they > get from a molecule. please see it as a motivation to produce > examples documenting the problems and upload them to the VMD biocore > biofs with a note to vmd@ks.uiuc.edu or even better consider fixing > the scripts by yourself and hand in the resulting changes. > > a _lot_ of the existing plugins are not perfect and barf on unusal > or unexpected input. no developer can take care of that, since for > the most part one cannot imagine what other people might want to do. > this is a task for the VMD user community to step up and contribute. > > cheers, > axel. > > > > cheers, > axel. > > > >> Best wishes >> Vlad >> >> > -- ---------------------------------------------------------------------------- Dr. Vlad Cojocaru EML Research gGmbH Schloss-Wolfsbrunnenweg 33 69118 Heidelberg Tel: ++49-6221-533202 Fax: ++49-6221-533298 e-mail:Vlad.Cojocaru[at]eml-r.villa-bosch.de http://projects.villa-bosch.de/mcm/people/cojocaru/ ---------------------------------------------------------------------------- EML Research gGmbH Amtgericht Mannheim / HRB 337446 Managing Partner: Dr. h.c. Klaus Tschira Scientific and Managing Director: Prof. Dr.-Ing. Andreas Reuter http://www.eml-r.org ----------------------------------------------------------------------------