On Oct 20, 2004, at 2:16 PM, Miguel wrote:
Rene wrote:But I still think we should change the term Model as well.
Q: What do you think of AtomSetCollection ?
That is fine with me, but now I understand what is meant with Model, I don't really mind the name.
So the Model class will be renamed to AtomSetCollection?
I don't like the term Model in this context ...
The only problem I have with 'Collection' is that this has other connotations with Java.
Can you think of another term ... like AtomSetGroup?
If not, we will stick with AtomSetCollection ... and change the name of the org.jmol.adapter.smarter.Model class.
I am pretty open about the name, but I think that the term Collection does indeed capture what we have: (from the Java 2 API documention): "A collection represents a group of objects, known as its elements." Which is where we may end up down the line anyway.
If you worry about connotations in Java, then almost all names are out since 'Set', 'Collection', 'List' are all taken :-).
We are not going to make any changes that we cannot do within a few hours.
A few hours? I think you probably can get a whole lot more done in a
few hours than I can (and keep things in working order), so if we go by
a few of my hours we do indeed end up with teeny-tiny baby steps :-).
But that is fine with me.
teeny baby steps is correct.
And yes, you are going to check in at least
You should not be afraid to check in frequently.
Q: Please confirm that you want to switch to the term AtomSet ...
Uhmm, now I am a bit confused. I proposed the creation of a new class
called AtomSet only as a necessity for option 1), not option 3). With
option 3, I would really only need to add a String atomSetName[] to the
(Model/AtomSetCollection) class and nothing else.
We are not going to create an AtomSet class.
But we are going to use the term 'AtomSet' to refer a set of atoms within
an AtomSetCollection that is referred
I think that in the ModelAdapter I'd need to add a String getAtomSetName(int modelNumber) method. But wait, are you thinking about the need for an AtomSetIterator in stead?
No. I think what you are saying is correct. No reason for an iterator.
Note that this wants to be
getAtomSetName(int atomSetIndex)
1. it is no longer a 'Model' ... it is now an 'AtomSet'
2. The term 'index' has a special meaning. It means that it is *always* zero-based and always runs through (atomSetCount - 1)
In the code you will see references to 'atomNumber' and references to
'atomIndex'. atomNumber is assigned by the underlying file type (like .pdb
files). atomIndex is always zero based and always what we use.
I get it, a fine point but important. Thanks for pointing that out.
Since I am not too familiar with the pdb files, I am not sure what I would have to do with the Structure[] and Bond[] and all that since I assume that all these really only make sense/refer to a particular AtomSet instance.
Don't have to do anything.
Finally, should any changes in the ModelAdapter be made in the base class, or should I add it only (initially) to the SmarterModelAdapter.java. Or maybe even better still, should I (temporarily) create a completely new class that extends the ModelAdapter (or SmarterModelAdapter, if I am lazy)?
You are going to initially make the change to the SmarterModelAdapter code
... while continuing to implement the ModelAdapter interface.
I will make the change to the ModelAdapter interface.
Uhmm, the SmarterModelAdapter does not *implement* the ModelAdapter *interface*, which brings up the question that I wondered about: Why is ModelAdapter a class as opposed to an interface. Does it have anything do you have the Atom/Structure/Bond-Iterators as classes within the ModelAdapter? (If so why are they in the ModelAdapter.java file to begin with?).
You are basically adding the method
public String getAtomSetName(int atomSetIndex) {
return "AtomSet "+atomSetIndex;
}
which I will override in the SmarterModelAdapter.
At this point it wouldn't require anything besides that, and would not even enforce me to override it by not making it an abstract method.
Right?
Q: What name do you want to use for the current Model?
The current model could be AtomSet (so you do want me to create that one?).
Sorry, I asked a confusing question.
org/jmol/adapter/smarter/Model.java -> org/jmol/adapter/smarter/AtomSetCollection.java
Q: Do you know how to use fancy features of BBEdit to make this change in
all the files in org/jmol/adapter/smarter ?
We seem to only be changing the Model.java to AtomSetCollection.java, and want to leave the ModelReader alone, right (even though this would really be an AtomSetCollectionReader, and most other things that refer to Model as a file...).
A Multi-file Search and replace in the smarter directory for ' Model(' to ' AtomSetCollection' would do it, besides the manual changes in the Model.java itself.
I think that the SmarterModelAdapter would need some manual changes too.
Is that what you were asking?
René
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers