eric capps wrote:
>On Jun 23, 2006, at 10:49 PM, Bob Hanson wrote:
>
>
>>simple things like this are possible; the bitset idea or atom
>>expression
>>idea provides flexibility. If null, then it could certainly default to
>>"replace all" but I thought we were interested in something that
>>didn't
>>necessarily replace all.
>>
>>
>>
>
>true, something more generally applicable would be better. still,
>what about the case where an atom may be added or deleted? i suppose
>that at the beginning of the method we could have something like this:
>
>
>
> void replaceCoords(BitSet atomList, Point3f[] coordList) {
> int newAtomCount = atomList.size();
> if (newAtomCount > atomCount) {
> for(int i = atomCount; i < newAtomCount; i++) {
> addAtom(); // the syntax for this method baffles me at the
>moment
> }
> atomCount = newAtomCount;
> }
> else if (newAtomCount < atomCount) {
> for(int i = atomCount - 1; i >= newAtomCount; i--)
> deleteAtom(i);
> atomCount = newAtomCount;
> }
> // rest of code
> }
>
>though clearly i don't understand all the fields of addAtom() yet.
>would this be the best way to go about this?
>
>
>
I'm apprehensive about addAtom(). We'd have to think carefully about the
effect of adding atoms. If at all possible, this should first be
implemented only as a strict atom-coordinate replacement scheme.
At first it may sound simple to add or remove atoms, but when you
consider that the atom set may involve multiple models from multiple
files, adding atoms may not be so simple. For example, there is nothing
to date that flags an atom as deleted, but surely we don't want to shift
the entire atom array because of a deletion. Adding and deleting atoms
would have a profound effect on all sorts of things -- rasmol
structures, bonds, polyhedra, anything that has an atom associated with it.
Think hard about what exactly you want to be able to do. If there is any
possibility that those added atoms might be already in place at the
beginning of the animation and only displayed when needed, that would be
far easier than trying to add them on the fly.
Bob
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