Rene wrote:

> I had expected the implementation of a method in the Viewer that would
> allow one to get the array of atoms for a particular ModelIndex, as
> opposed to having to loop through all the atoms and determining whether
> they are in the desired model to see whether or not they need to be
> ignored.

I am thinking of making a change to the implementation.

Atom Indexes are currently sequential within a model.

Therefore, the set of atoms in a model could be defined by a starting
index and an atom count.

(One of the main problems with this is that it would preclude/complicate
things if we wanted to add atoms to a model after it was created)

> If one were to write a multi-step xyz file for a subset of
> models in the input, one would have to loop through all atoms for every
> model to be output in a step...

I agree that it is not pretty. But in reality the cost of this iteration
is insignificant.

> Then again, if one returns an array of references to the the low level
> atom class,

*please* do not do that.

I consolidated several packages into org.jmol.viewer so that the methods
would not be public. I did this to try to prevent people from looking
inside the data structures.

> one probably could modify them, which would cause problems
> since the viewer may not know about the modifications (i.e., one would
> really want a 'read-only' version of the AtomSet that is associated
> with a modelIndex...).

I know that the JmolViewer API needs more functionality in some areas. It
also needs to have many entry points removed.

Even the Jmol application should be accessing everything through the api.
That is how we will ensure that the API has adequate functionality.


Miguel



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to