private void getStateAtoms(SB sb) { BS bsDone = new BS(); Map<String, BS> temp = new Hashtable<String, BS>(); Map<String, BS> temp2 = new Hashtable<String, BS>(); for (Ellipsoid e : atomEllipsoids.values()) { int iType = e.tensor.iType; if (bsDone.get(iType + 1)) continue; bsDone.set(iType + 1); boolean isADP = (e.tensor.iType == Tensor.TYPE_ADP); String cmd = (isADP ? null : "Ellipsoids set " + PT.esc(e.tensor.type)); for (Ellipsoid e2 : atomEllipsoids.values()) { if (e2.tensor.iType != iType || isADP && !e2.isOn) continue; int i = e2.tensor.atomIndex1; // BSUtil.setMapBitSet( temp, i, i, (isADP ? "Ellipsoids " + e2.percent : cmd + " scale " + e2.scale + (e2.options == null ? "" : " options " + PT.esc(e2.options)) + (e2.isOn ? " ON" : " OFF"))); if (e2.colix != C.INHERIT_ALL) BSUtil.setMapBitSet( temp2, i, i, getColorCommand(cmd, e2.pid, e2.colix, translucentAllowed)); } } sb.append(vwr.getCommands(temp, temp2, "select")); }
public void saveSelection(String saveName, BS bsSelected) { if (saveName.equalsIgnoreCase("DELETE")) { deleteSavedType("Selected_"); return; } saveName = lastSelected = "Selected_" + saveName; saved.put(saveName, BSUtil.copy(bsSelected)); }