[Jmol-users] tip of the day -- how to tell if cartoons are on or not

 [Jmol-users] tip of the day -- how to tell if cartoons are on or not From: Robert Hanson - 2012-05-30 19:56:26 Attachments: Message as HTML ```Problem: I want a button that toggles cartoons on / off, switching with "ball and stick" Solution: select *; if ({*}.cartoons) { wireframe -0.1;spacefill 23% } else { cartoons only } Explanation: {...}.cartoons gives the average cartoon "size" for a set of atoms -- from 0 to some magnitude like 1.0, so if any cartoons are "on" then that number will be nonzero, and if({*}.cartoons) will evaluate TRUE. -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 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 ```

 [Jmol-users] tip of the day -- how to tell if cartoons are on or not From: Robert Hanson - 2012-05-30 19:56:26 Attachments: Message as HTML ```Problem: I want a button that toggles cartoons on / off, switching with "ball and stick" Solution: select *; if ({*}.cartoons) { wireframe -0.1;spacefill 23% } else { cartoons only } Explanation: {...}.cartoons gives the average cartoon "size" for a set of atoms -- from 0 to some magnitude like 1.0, so if any cartoons are "on" then that number will be nonzero, and if({*}.cartoons) will evaluate TRUE. -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 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 ```
 Re: [Jmol-users] tip of the day -- how to tell if cartoons are on or not From: Rolf Huehne - 2012-05-31 09:52:06 ```On 05/30/2012 09:56 PM, Robert Hanson wrote: > Problem: I want a button that toggles cartoons on / off, switching with > "ball and stick" > > Solution: > > select *; if ({*}.cartoons) { wireframe -0.1;spacefill 23% } else { > cartoons only } > > Explanation: > > {...}.cartoons gives the average cartoon "size" for a set of atoms -- from > 0 to some magnitude like 1.0, > so if any cartoons are "on" then that number will be nonzero, and > if({*}.cartoons) will evaluate TRUE. > So a partial cartoon setting is sufficient here. Q: Is it also possible to distinguish partial settings from complete settings (other than looping through all residues and test individually)? Regards, Rolf ```
 Re: [Jmol-users] tip of the day -- how to tell if cartoons are on or not From: Alexander Rose - 2012-05-31 10:34:59 ```Hi, Try testing for {cartoon=0}.length. => select *; if ({cartoon>0}.length) { wireframe -0.1;spacefill 23% } else { cartoons only } The .cartoon atom property is the size of the cartoon which in turn is a mixture of sizes for the different parts - ribbons and traces - the cartoon is made off. Best Alex Am 31.05.2012 um 11:51 schrieb Rolf Huehne: > On 05/30/2012 09:56 PM, Robert Hanson wrote: >> Problem: I want a button that toggles cartoons on / off, switching with >> "ball and stick" >> >> Solution: >> >> select *; if ({*}.cartoons) { wireframe -0.1;spacefill 23% } else { >> cartoons only } >> >> Explanation: >> >> {...}.cartoons gives the average cartoon "size" for a set of atoms -- from >> 0 to some magnitude like 1.0, >> so if any cartoons are "on" then that number will be nonzero, and >> if({*}.cartoons) will evaluate TRUE. >> > So a partial cartoon setting is sufficient here. > > Q: Is it also possible to distinguish partial settings from complete > settings (other than looping through all residues and test individually)? > > Regards, > Rolf > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-users mailing list > Jmol-users@... > https://lists.sourceforge.net/lists/listinfo/jmol-users ```
 Re: [Jmol-users] tip of the day -- how to tell if cartoons are on or not From: Robert Hanson - 2012-05-31 19:09:38 Attachments: Message as HTML ```On Thu, May 31, 2012 at 4:51 AM, Rolf Huehne wrote: > > Q: Is it also possible to distinguish partial settings from complete > settings (other than looping through all residues and test individually)? > > Probably the best way to do that is select cartoon = 0 and see if you get anything. Or: if ({cartoon=0}) { print "some residues do not have cartoons" } -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 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 ```