I just wanted to say that I have spent the last couple of days putting 
10.9.99 through the paces. In association with this work I went through 
all the shape code and did a lot of consolidation. The result is a much 
leaner code with essentially no duplication of effort anywhere. And the 
Jar file dropped in size by 60K.

I must say that without Miguel's strong preference for "self-explanatory 
code" -- that is, code that looks like this:

  int setShapeByNameParameter(int index) throws ScriptException {
    String objectName = objectNameParameter(index);
    int shapeType = viewer.getShapeIdFromObjectName(objectName);
    if (shapeType < 0)
      objectNameExpected();
    viewer.setShapeProperty(shapeType, "thisID", objectName);
    return shapeType;
  }

and not this:

         DO 50 I=1,NVIBS
            WI=VIBS(I)
            EWJ=EXP(-WI*C1)
            QV=QV/(1-EWJ)
            HV=HV+WI*EWJ/(1-EWJ)
            E0=E0+WI
            CPV=CPV+WI*WI*EWJ/(1-EWJ)/(1-EWJ)
            SV1=SV1+LOG(1.0D0-EWJ)
   50    SV2=SV2+WI*EWJ/(1-EWJ)

I could never have attempted this were it not for how well this was 
written in the first place. I know there isn't a lot of commenting or 
documentation in a formal sense in this code, but it just amazes me how 
easy it is to navigate, especially with Eclipse. You'll be happy to know 
that I've pretty much run out of places to look for tightening up the 
code. So that was that.  It's nice now to see things like this:

class Stars extends AtomShape {

}

[that's all -- think about it]

or


class Hsticks extends Sticks {

  void initShape() {
    myMask = JmolConstants.BOND_HYDROGEN_MASK; 
  } 

  String getShapeState() {
    return "";
  }
}

Here is the status of the classes that extend Shape:


 * AtomShape
 *   Balls, Dots, Halos, Labels, Polyhedra, Stars, Vectors
 *
 * Dipoles
 *
 * FontLineShape
 *   Axes, Bbcage, Frank, Uccage
 *
 * Measures
 *
 * MeshCollection
 *    Draw, Isosurface, Pmesh
 *               |______________ LcaoCartoon, MolecularOrbital
 *
 * Mps
 *   Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace
 *
 * Sticks
 *    Hsticks, Sssticks
 *
 * TextShape
 *    Echo, Hover


Nico, let's get this prerelease out.

Bob







-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to