From: Rolf H. <rh...@fl...> - 2015-01-08 12:37:09
|
On 01/08/2015 01:23 PM, Nelson Liu wrote: > Hi Rolf, > I was wondering how one would utilize a variable in a FOR loop in Jmol. > This is my current code, but it doesn't select any atoms. > for (var i = 5; i< 92; i++){ > select @i and chain = A; > } > Nelson, please ask on the jmol-users list so that other people can also profit from the conversation. You need to specify which property should be '@i': select atomno=@i and chain = A; Regards, Rolf -- Rolf Huehne Postdoc Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) Beutenbergstrasse 11 07745 Jena, Germany Phone: +49 3641 65 6205 Fax: +49 3641 65 6210 E-Mail: rh...@fl... Website: http://www.fli-leibniz.de Scientific Director: Prof. Dr. K. Lenhard Rudolph Head of Administration: Dr. Daniele Barthel Chairman of Board of Trustees: Dennys Klein VAT No: DE 153 925 464 Register of Associations: No. 230296, Amtsgericht Jena Tax Number: 162/141/08228 |
From: Nelson L. <nel...@gm...> - 2015-01-08 12:39:19
|
Ah, I thought this was a continuation of the previous email, but i guess I just hit reply. Can I use @i to select residue numbers? I looked in the documentation of the select statement, and it seemed like there was no explicit property for residue numbers. Thanks! On Thu Jan 08 2015 at 4:37:02 AM Rolf Huehne <rh...@fl...> wrote: > On 01/08/2015 01:23 PM, Nelson Liu wrote: > > Hi Rolf, > > I was wondering how one would utilize a variable in a FOR loop in Jmol. > > This is my current code, but it doesn't select any atoms. > > for (var i = 5; i< 92; i++){ > > select @i and chain = A; > > } > > > Nelson, please ask on the jmol-users list so that other people can also > profit from the conversation. > > You need to specify which property should be '@i': > > select atomno=@i and chain = A; > > Regards, > Rolf > > -- > > Rolf Huehne > Postdoc > > Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) > Beutenbergstrasse 11 > 07745 Jena, Germany > > Phone: +49 3641 65 6205 > Fax: +49 3641 65 6210 > E-Mail: rh...@fl... > Website: http://www.fli-leibniz.de > > Scientific Director: Prof. Dr. K. Lenhard Rudolph > Head of Administration: Dr. Daniele Barthel > Chairman of Board of Trustees: Dennys Klein > > VAT No: DE 153 925 464 > Register of Associations: No. 230296, Amtsgericht Jena > Tax Number: 162/141/08228 > > |
From: Rolf H. <rh...@fl...> - 2015-01-08 12:48:32
|
On 01/08/2015 01:39 PM, Nelson Liu wrote: > Ah, I thought this was a continuation of the previous email, but i guess I > just hit reply. Can I use @i to select residue numbers? I looked in the > documentation of the select statement, and it seemed like there was no > explicit property for residue numbers. > If you provide directly a number it works. But apparently it doesn't work with variables. The property for the residue number is the same as used for the '.label()' function in the other thread: select resno=@i and chain=A Regards, Rolf -- Rolf Huehne Postdoc Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) Beutenbergstrasse 11 07745 Jena, Germany Phone: +49 3641 65 6205 Fax: +49 3641 65 6210 E-Mail: rh...@fl... Website: http://www.fli-leibniz.de Scientific Director: Prof. Dr. K. Lenhard Rudolph Head of Administration: Dr. Daniele Barthel Chairman of Board of Trustees: Dennys Klein VAT No: DE 153 925 464 Register of Associations: No. 230296, Amtsgericht Jena Tax Number: 162/141/08228 |
From: Nelson L. <nel...@gm...> - 2015-01-08 12:53:20
|
Hi Rolf, Interesting that direct variable substitution doesn't work, thanks again! On Thu Jan 08 2015 at 4:48:26 AM Rolf Huehne <rh...@fl...> wrote: > On 01/08/2015 01:39 PM, Nelson Liu wrote: > > Ah, I thought this was a continuation of the previous email, but i guess > I > > just hit reply. Can I use @i to select residue numbers? I looked in the > > documentation of the select statement, and it seemed like there was no > > explicit property for residue numbers. > > > If you provide directly a number it works. But apparently it doesn't > work with variables. The property for the residue number is the same as > used for the '.label()' function in the other thread: > > select resno=@i and chain=A > > Regards, > Rolf > > -- > > Rolf Huehne > Postdoc > > Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) > Beutenbergstrasse 11 > 07745 Jena, Germany > > Phone: +49 3641 65 6205 > Fax: +49 3641 65 6210 > E-Mail: rh...@fl... > Website: http://www.fli-leibniz.de > > Scientific Director: Prof. Dr. K. Lenhard Rudolph > Head of Administration: Dr. Daniele Barthel > Chairman of Board of Trustees: Dennys Klein > > VAT No: DE 153 925 464 > Register of Associations: No. 230296, Amtsgericht Jena > Tax Number: 162/141/08228 > > |
From: Robert H. <ha...@st...> - 2015-01-10 00:29:24
|
the number itself is really part of a complex syntax involving numbers, number ranges, and such. So the parser doesn't catch that when you put a variable in. (That's not evaluated until later.) You don't need the "@" when referring to variables with the "=" sign: select resno=i On Thu, Jan 8, 2015 at 6:53 AM, Nelson Liu <nel...@gm...> wrote: > Hi Rolf, > Interesting that direct variable substitution doesn't work, thanks again! > > > On Thu Jan 08 2015 at 4:48:26 AM Rolf Huehne <rh...@fl...> > wrote: > >> On 01/08/2015 01:39 PM, Nelson Liu wrote: >> > Ah, I thought this was a continuation of the previous email, but i >> guess I >> > just hit reply. Can I use @i to select residue numbers? I looked in the >> > documentation of the select statement, and it seemed like there was no >> > explicit property for residue numbers. >> > >> If you provide directly a number it works. But apparently it doesn't >> work with variables. The property for the residue number is the same as >> used for the '.label()' function in the other thread: >> >> select resno=@i and chain=A >> >> Regards, >> Rolf >> >> -- >> >> Rolf Huehne >> Postdoc >> >> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) >> Beutenbergstrasse 11 >> 07745 Jena, Germany >> >> Phone: +49 3641 65 6205 >> Fax: +49 3641 65 6210 >> E-Mail: rh...@fl... >> Website: http://www.fli-leibniz.de >> >> Scientific Director: Prof. Dr. K. Lenhard Rudolph >> Head of Administration: Dr. Daniele Barthel >> Chairman of Board of Trustees: Dennys Klein >> >> VAT No: DE 153 925 464 >> Register of Associations: No. 230296, Amtsgericht Jena >> Tax Number: 162/141/08228 >> >> > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Department of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Otis R. <osr...@ch...> - 2015-01-08 15:21:59
|
I'm not sure if this is relevant because I don't fully understand the context of this email chain. I'll offer this thought anyway. A while back (years) there was a discussion of global vs local Jmol variables. I also did not fully understand this discussion! Nevertheless, this made all my global variable issues go away: In the load script, I define a number of variables as empty containers in waiting. These empty containers appear to be fully global. When used after loading, they can be filled in one script and used in another script much later. Maybe not relevant because I'm not sure of the complete scrip context of this discussion, but there it's is... Best, Otis -- Otis Rothenberger CheMagic.com > On Jan 8, 2015, at 7:53 AM, Nelson Liu <nel...@gm...> wrote: > > Hi Rolf, > Interesting that direct variable substitution doesn't work, thanks again! > > >> On Thu Jan 08 2015 at 4:48:26 AM Rolf Huehne <rh...@fl...> wrote: >> On 01/08/2015 01:39 PM, Nelson Liu wrote: >> > Ah, I thought this was a continuation of the previous email, but i guess I >> > just hit reply. Can I use @i to select residue numbers? I looked in the >> > documentation of the select statement, and it seemed like there was no >> > explicit property for residue numbers. >> > >> If you provide directly a number it works. But apparently it doesn't >> work with variables. The property for the residue number is the same as >> used for the '.label()' function in the other thread: >> >> select resno=@i and chain=A >> >> Regards, >> Rolf >> >> -- >> >> Rolf Huehne >> Postdoc >> >> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) >> Beutenbergstrasse 11 >> 07745 Jena, Germany >> >> Phone: +49 3641 65 6205 >> Fax: +49 3641 65 6210 >> E-Mail: rh...@fl... >> Website: http://www.fli-leibniz.de >> >> Scientific Director: Prof. Dr. K. Lenhard Rudolph >> Head of Administration: Dr. Daniele Barthel >> Chairman of Board of Trustees: Dennys Klein >> >> VAT No: DE 153 925 464 >> Register of Associations: No. 230296, Amtsgericht Jena >> Tax Number: 162/141/08228 > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Robert H. <ha...@st...> - 2015-01-10 00:33:15
|
ps this works if you use i as a string: i = "3-5" select @i On Thu, Jan 8, 2015 at 9:21 AM, Otis Rothenberger <osr...@ch...> wrote: > I'm not sure if this is relevant because I don't fully understand the > context of this email chain. I'll offer this thought anyway. > > A while back (years) there was a discussion of global vs local Jmol > variables. I also did not fully understand this discussion! Nevertheless, > this made all my global variable issues go away: > > In the load script, I define a number of variables as empty containers in > waiting. These empty containers appear to be fully global. When used after > loading, they can be filled in one script and used in another script much > later. > > Maybe not relevant because I'm not sure of the complete scrip context of > this discussion, but there it's is... > > Best, Otis > -- > Otis Rothenberger > CheMagic.com > > On Jan 8, 2015, at 7:53 AM, Nelson Liu <nel...@gm...> wrote: > > Hi Rolf, > Interesting that direct variable substitution doesn't work, thanks again! > > > On Thu Jan 08 2015 at 4:48:26 AM Rolf Huehne <rh...@fl...> > wrote: > >> On 01/08/2015 01:39 PM, Nelson Liu wrote: >> > Ah, I thought this was a continuation of the previous email, but i >> guess I >> > just hit reply. Can I use @i to select residue numbers? I looked in the >> > documentation of the select statement, and it seemed like there was no >> > explicit property for residue numbers. >> > >> If you provide directly a number it works. But apparently it doesn't >> work with variables. The property for the residue number is the same as >> used for the '.label()' function in the other thread: >> >> select resno=@i and chain=A >> >> Regards, >> Rolf >> >> -- >> >> Rolf Huehne >> Postdoc >> >> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI) >> Beutenbergstrasse 11 >> 07745 Jena, Germany >> >> Phone: +49 3641 65 6205 >> Fax: +49 3641 65 6210 >> E-Mail: rh...@fl... >> Website: http://www.fli-leibniz.de >> >> Scientific Director: Prof. Dr. K. Lenhard Rudolph >> Head of Administration: Dr. Daniele Barthel >> Chairman of Board of Trustees: Dennys Klein >> >> VAT No: DE 153 925 464 >> Register of Associations: No. 230296, Amtsgericht Jena >> Tax Number: 162/141/08228 >> >> > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Department of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |