On Jun 23, 2006, at 2:12 PM, Bob Hanson wrote:
> OK, if it's applet, then the bitset idea is not so good. The best way
> would be to use something like I've already set up, where you change a
> specific atom's coordinate. But what is very slow is passing variables
> back and forth from JavaScript to the applet. So we have to come up
> with
> a mechanism of passing an array ONCE to do the job. JavaScript doesn't
> have bitsets, but Jmol does have the capability of turning any atom
> expression into a BitSet. Thus, we have in Viewer:
>
> BitSet getAtomBitSet(String atomExpression) {
> return selectionManager.getAtomBitSet(atomExpression);
> }
>
> My idea would be then, for the applet, something like:
>
> jmolSetAtomCoordinates("atomno<10",Coordinates)
>
> where "Coordinates" is an array of double[3] values, I think, defining
> the new coordinate. Maybe....
how powerful are atom expressions? i take it getAtomBitSet
("atomno<10") would return 1111111110...0 (in BitSet parameters of
course); would an expression like atomno>5 && atomno<30 work? what
about a wildcard?
for that matter, it occurs to me that it may not even be necessary to
use a BitSet, particularly if the majority of the atoms are changing
coordinates. rather, we could have a method like:
jmolSetAtomCoords(Double[] coords)
and simply reallocate the atoms[] array to coordinates.length, then
copy them in. would this not be quicker? this may also be helpful in
the event that an atom is added or disappears.
also, is there a reason to use doubles rather than floats?
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers