Miguel wrote:
Yes, 'bondcount' supplies the same functionality as 'connected()'
[snip]
Oh, did you look carefully at my last Compiler class code?
The compiler changes gave me the 'willies'
nah, piece of cake. Be brave. Compilers are our friends.
MUCH more
than simply counting bonds. Please -- that is important.
clauseConnected ::= CONNECTED ( integer , integer , expression ) |
CONNECTED ( integer , expression ) |
CONNECTED ( integer , integer ) |
CONNECTED ( expression ) |
CONNECTED ( integer ) |
CONNECTED
thus:
connected(minbonds, maxbonds, atomExpression)
connected(nbonds, atomExpression)
connected(minbonds, maxbonds)
connected(atomExpression)
connected(nbonds)
Far as I can tell, you are only implementing the last of those, right?
One can use bondcount with comparison operators. So this gives
connected(minbonds, maxbonds) -->
bondcount >= minbonds && bondcount <= maxbonds
Here's the thing: with more flexible polyhedra we will have need to be
very specific in selecting out what centers we are turning into
polyhedra. The issue, I found, is that when you generate a few unit
cells worth of atoms, some are always on the edge and not really
desired. What connected(....) does is allow a very fine-grained
selection of these otherwise difficult to select atoms so that they
cna be included or excluded.
OK
Trust me on this... we need the full clauseConnected()
My impression was that the combination of bondcount and within() was
sufficient.
Please try to give me a simple explanation of how the atomExpression
behaves within the context of evalution of
connected(atomExpression)
connected(nbonds, atomExpression)
connected(minBonds, maxBonds, atomExpression)
The first point I would make is that the compiler connected() method
is simple and straightforward and works just fine. Don't fear it.
Second, it's possible that you are right there, that within and
blanket connected somehow does everything that connected does. Let's
see.... No, I don't think so:
connected(2, carbon)
This selects all atoms connected to exactly two carbons. It doesn't
specify that there be only two bonds, only two to carbon. How could
you do that with bondcount and within()?
select carbon and connected(3, hydrogen)
#this selects all methyl carbons.
select hydrogen and connected(carbon and connected(3, hydrogen))
#this selects all hydrogens of methyl groups
select carbon and connected(1, 1, hydrogen)
#this selects all methine carbons
Note that with this simple syntax we could, for example, quickly COUNT
the number of these groups, because selections return how many atoms
were selected.
select carbon and connected(1, oxygen and connected(1))
#this selects all carbonyl carbons, provided H atoms are present on OH
measure 1.0 2.0 ALL (oxygen)
(carbon and connected(1, oxygen and connected(1))
#this displays measures for all C=O bonds
Enough examples? You can play with these at
http://www.stolaf.edu/people/hansonr/jmol/test/measure.htm
Trust me.... It's good.
Bob
OK, I've implemented
measure ALL (oxygen) (carbon)
that's no good -- all the measures show up for all oxygen cargon,
regardless of distance. What I really want is all the oxygen-carbon
double bonds:
measure ALL (oxygen and connected(1,carbon))
Then I'll take another look.
Miguel
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers