Alan demonstrates here a powerful mechanism to assign values to properties
to atoms. In Jmol you can assign any value to any property you can name. The
syntax is very simple:
{some atom selection}.property_someName = someValue
The key to this is the prefix "property_". This tells Jmol that you are
creating a property name of your choosing. This information is saved in the
state as a DATA command:
show state
...
DATA "property_someName set"
9 ;
Jmol Property Data Format 1 -- Jmol 11.9.29_dev 2010-02-03 08:33;
1 H H1_#1 3.0 ;
2 15N 15N2_#2 3.0 ;
3 13C 13C3_#3 3.0 ;
4 N N4_#4 3.0 ;
5 C C5_#5 3.0 ;
6 C C6_#6 3.0 ;
7 C C7_#7 3.0 ;
8 N N8_#8 3.0 ;
9 O O9_#9 3.0 ;
end "property_someName set";
and can be checked using the standard syntax:
select property_someName < 5
select property_someName = 3.5
select *; label "%[property_someName]"
print {property_someName < 0.6}.label("%a %5.2[property_someName]")
color property_whatever
And you can even use these values to assign numbers to other properties.
Here we are using the property to change the spacefill radius:
{*}.radius = {*}.property_someName.all.mul(0.10)
[That ".all" is important there, because {*}.property_someName by itself
delivers the average value. Then .mul(0.10) takes the list of values
produced by .all and multiplies them each by 0.10, still preserving the list
so it can be mapped onto the radii.]
Bob
On Fri, Feb 12, 2010 at 3:57 AM, Alan Hewat <[email protected]> wrote:
> On 11 February 2010 20:40, Robert Hanson <[email protected]> wrote:
> >
> > {atomno < 10}.property_abc = 3
>
> OK, as before I select atoms I want to exclude but then instead of hiding
> them I assign them a property_abc=3 (not sure why the property value is
> limited to a number <10 but it doesn't matter)
>
> just an example is all. You can assign any number.
> {selected}.property_abc = 3
>
> Then I simply do:
> selectionHalos OFF;select all and visible;isosurface cavity resolution 2.0
> ignore(property_abc = 3) minset 5 cavity 0.4 sasurface 0.15;color
> isosurface blue;isosurface fullylit
>
> instead of:
> selectionHalos OFF;select all and visible;isosurface cavity resolution 2.0
> ignore(hidden) minset 5 cavity 0.4 sasurface 0.15;color isosurface
> blue;isosurface fullylit
>
> The latter ignores all the hidden atoms surrounding the cell, which causes
> the isosurface to blow out at the cell edges.
>
> BTW I think you added the isosurface qualifiers INTERIOR and POCKET to
> satisfy Christian, but finally I dropped the distinction; whether a
> surface is closed or open depends anyway on the probe parameters. And I
> use a small minset because it is quite interesting to check for cavities
> only big enough to accomodate a single ion/atom.
>
>
Interior and pocket are very interesting in certain protein situations.
> It took me a while, since I am less familiar with the syntax than you
> imagine :-) And I posted this to the list because it may be of general
> interest.
>
> Thanks again Bob, Alan.
>
>
my pleasure.
> > On Thu, Feb 11, 2010 at 1:35 PM, Alan Hewat <
> [email protected]>
> > wrote:
> >>
> >> > You could create your own property name and assign it to just the
> atoms
> >> > you want, then select those.
> >>
> >> Yes, I thought to assign them as "solvent" for example - when I work
> >> out how to do that...
> ______________________________________________
> Dr Alan Hewat, NeutronOptics, Grenoble, FRANCE
> <[email protected]> +33.476.98.41.68
> http://www.NeutronOptics.com/hewat
> ______________________________________________
>
>
--
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
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users