コード例 #1
0
ファイル: MOCalculation.java プロジェクト: aniketisin/INCAR
 private void dumpInfo(int shell) {
   if (doShowShellType) {
     Logger.debug(
         "\n\t\t\tprocessShell: "
             + shell
             + " type="
             + QS.getQuantumShellTag(shell)
             + " nGaussians="
             + nGaussians
             + " atom="
             + atomIndex);
     doShowShellType = false;
   }
   if (Logger.isActiveLevel(Logger.LEVEL_DEBUGHIGH))
     for (int ig = 0; ig < nGaussians; ig++) {
       double alpha = gaussians[gaussianPtr + ig][0];
       double c1 = gaussians[gaussianPtr + ig][1];
       Logger.debug("\t\t\tGaussian " + (ig + 1) + " alpha=" + alpha + " c=" + c1);
     }
   String[] so = getShellOrder(shell);
   for (int i = 0; i < map.length; i++) {
     double c = coeffs[i];
     Logger.debug(
         "MO coeff "
             + (so == null ? "?" : so[i])
             + " "
             + (map[i] + moCoeff - map.length + i + 1)
             + "\t"
             + c
             + "\t"
             + thisAtom.atom);
   }
 }
コード例 #2
0
ファイル: MOCalculation.java プロジェクト: aniketisin/INCAR
 private double normalizeShell(int iShell) {
   double c = 0;
   int[] shell = shells.get(iShell);
   basisType = QS.getItem(shell[1]);
   gaussianPtr = shell[2];
   nGaussians = shell[3];
   doShowShellType = doDebug;
   if (!setCoeffs(false)) return 0;
   for (int i = map.length; --i >= 0; ) c += coeffs[i] * coeffs[i];
   return c;
 }
コード例 #3
0
 private String getMoState(int modelIndex) {
   strID = getId(modelIndex);
   if (!getSettings(strID)) return "";
   SB s = new SB();
   int modelCount = vwr.getModelCount();
   if (modelCount > 1) appendCmd(s, "frame " + vwr.getModelNumberDotted(modelIndex));
   if (moCutoff != null)
     appendCmd(s, "mo cutoff " + (sg.getIsPositiveOnly() ? "+" : "") + moCutoff);
   if (moScale != null) appendCmd(s, "mo scale " + moScale);
   if (moMonteCarloCount != null)
     appendCmd(s, "mo points " + moMonteCarloCount + " " + moRandomSeed);
   if (moResolution != null) appendCmd(s, "mo resolution " + moResolution);
   if (moPlane != null)
     appendCmd(
         s, "mo plane {" + moPlane.x + " " + moPlane.y + " " + moPlane.z + " " + moPlane.w + "}");
   if (moTitleFormat != null) appendCmd(s, "mo titleFormat " + PT.esc(moTitleFormat));
   // the following is a correct object==object test
   if (moColorNeg != null)
     appendCmd(
         s,
         "mo color "
             + Escape.escapeColor(moColorNeg.intValue())
             + (moColorNeg.equals(moColorPos)
                 ? ""
                 : " " + Escape.escapeColor(moColorPos.intValue())));
   if (moSlab != null) {
     if (thisMesh.slabOptions != null) appendCmd(s, thisMesh.slabOptions.toString());
     if (thisMesh.jvxlData.slabValue != Integer.MIN_VALUE)
       appendCmd(s, "mo slab " + thisMesh.jvxlData.slabValue);
   }
   if (moLinearCombination == null) {
     appendCmd(s, "mo " + (moSquareData == Boolean.TRUE ? "squared " : "") + moNumber);
   } else {
     appendCmd(
         s,
         "mo "
             + QS.getMOString(moLinearCombination)
             + (moSquareLinear == Boolean.TRUE ? " squared" : ""));
   }
   if (moTranslucency != null) appendCmd(s, "mo translucent " + moTranslucentLevel);
   appendCmd(s, ((IsosurfaceMesh) thisModel.get("mesh")).getState("mo"));
   return s.toString();
 }
コード例 #4
0
ファイル: MOCalculation.java プロジェクト: aniketisin/INCAR
 private void processShell(int iShell) {
   int lastAtom = atomIndex;
   int[] shell = shells.get(iShell);
   atomIndex = shell[0] + firstAtomOffset;
   basisType = QS.getItem(shell[1]);
   gaussianPtr = shell[2];
   nGaussians = shell[3];
   doShowShellType = doDebug;
   if (atomIndex != lastAtom && (thisAtom = qmAtoms[atomIndex]) != null)
     thisAtom.setXYZ(this, true);
   if (!setCoeffs(true)) return;
   if (havePoints) setMinMax(-1);
   switch (basisType) {
     case S:
       addDataS();
       break;
     case P:
       addDataP();
       break;
     case SP:
       addDataSP();
       break;
     case D_SPHERICAL:
       addData5D();
       break;
     case D_CARTESIAN:
       addData6D();
       break;
     case F_SPHERICAL:
       addData7F();
       break;
     case F_CARTESIAN:
       addData10F();
       break;
     default:
       Logger.warn(" Unsupported basis type for atomno=" + (atomIndex + 1) + ": " + basisType.tag);
       break;
   }
 }