Rajarshi wrote: >> Feel free to send me whatever code you have (offlist). I will take a >> look >> at it and check it into CVS. Even if it is not functional, it will give >> you a framework to work in. > > I got it working.
Good > As for connectivity information - after reading in the atom coordinates, > symbol and charge, I created bonds by calling addBond() in the Model > class. I only created bonds between unique atom pairs (so that if atoms > 1 & 2 are bonded I did not create a bond for 2 & 1). If this is not the > correct way to go about adding connectivity let me know. It is important to keep the file reader code simple. So it is usually easier to send along all the connectivity information as you see it. Jmol handles it correctly. It will not create the bond B<->A if A<->B already exists. > Also, it currently only reads in the first molecule in a HIN file , even > if the file contains multiple structures. The main reason being I'm not > sure how to return multiple structures. But for general purposes I think > it does the job - it displays my molecules fine :) That is the purpose of 'model' ... check out the XyzReader for a simple example. > I've attached the code to read in HIN files as well as a modified > version of ModelResolver.java. (I've also attached two HIN files in case > you want to check the display) I have checked everything into CVS. You can use cvs to check it out. However, in the course of my code review I did encounter a few *problem areas*. For the most part, I did not change the code. But I stuck in a lot of comments for things that you should change. Some of the items are things that you are not aware of ... like methods/classes that did not exist on the Java 1.1 platform. We cannot use them because it will not run on the MSFT JVM under IE. Other things are coding-style related. It is very difficult to conduct effective code reviews if you are not face-to-face. Please take my comments as constructive criticism to help you product higher-quality code ... where higher quality means 1) more bug-free, 2) readable, 3) maintainable, and 4) efficient, more-or-less in that order. Miguel ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
