On 03/26/2010 06:30 AM, Otis Rothenberger wrote:
> Bob,
> 
> I'm making some progress on your suggestion to check and branch during the
> addition of atoms (below). One problem that I'm having is comparing points,
> so I thought that better check with you. If I have two points defined, a and
> b, shouldn't the following syntax produce a true or false based on xyz
> identity of the points?
> 
> If ({a} == {b}){do stuff;};continue on to other stuff;
> 
> I can send you the specific code, but I thought I'd ask about my basic
> understanding of point math and logic first. My problem is that the above
> seems to be true for points that are not the same.
> 
The scripting documentation on Jmol math says:

point == point
  true if the distance between the points is less than 1E-6.

So the coordinates must not be identical.
Maybe it helps if you compare the individual xyz values instead:

if ({a}.x == {b}.x AND {a}.y == {b}.y AND {a}.z == {b}.z)

Regards,
Rolf

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to