User 870ab5b546
22-06-2006 13:17:45
We suspected that getHybridizationState() was not working properly, so I created the attached jsp page to check. When I run it on any molecule, even a simple one like formaldehyde, getHybridizationState() always returns zero. I should note that the element's symbol is returned just fine. Can you explain?
The crucial code:
The crucial code:
Code: |
<% String substrate = request.getParameter("substrate"); Molecule substrateMol = null; int numAtoms = 0; if (substrate != null) { substrateMol = MolImporter.importMol(substrate); numAtoms = substrateMol.getAtomCount(); } %> ... function getHybrids() { var str = document.mechapplet.getMol("mrv"); document.tester.substrate.value=str; document.tester.submit(); } ... <% for (int j=0; j<numAtoms; j++) { %> <tr> <td><%=j%></td> <td><%=substrateMol.getAtom(j).getSymbol()%></td> <td><%=substrateMol.getAtom(j).getHybridizationState()%></td> </tr> <% } %> |