public void updateViewerCoord() {
   for (Atom atm : modelList.get(viewer.getDisplayModelIndex()).getAtomHash().values()) {
     viewer.ms.setAtomCoord(
         (atm.getAtomSeqNum() - 1),
         atm.getCoordinates()[0],
         atm.getCoordinates()[1],
         atm.getCoordinates()[2]);
   }
   jmolPanel.getViewer().refresh(3, "minimization step ");
 }
 public void atomMoved() {
   for (Atom atm : modelList.get(viewer.getDisplayModelIndex()).getAtomHash().values()) {
     for (int i = 0; i < viewer.ms.at.length; i++) {
       if (atm.getAtomSeqNum() == (i + 1)) {
         double[] coords = {viewer.ms.at[i].x, viewer.ms.at[i].y, viewer.ms.at[i].z};
         atm.setCoordinates(coords);
       }
     }
   }
 }