本文整理汇总了Java中org.jmol.util.Logger.debugging方法的典型用法代码示例。如果您正苦于以下问题:Java Logger.debugging方法的具体用法?Java Logger.debugging怎么用?Java Logger.debugging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jmol.util.Logger
的用法示例。
在下文中一共展示了Logger.debugging方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSlaters
import org.jmol.util.Logger; //导入方法依赖的package包/类
/**
* after the vectors intinfo and floatinfo are completed, we
*
* @param doScale
* @param doSort TODO
*/
protected final void setSlaters(boolean doScale, boolean doSort) {
if (slaterArray == null) {
int nSlaters = slaters.size();
slaterArray = new SlaterData[nSlaters];
for (int i = 0; i < slaterArray.length; i++)
slaterArray[i] = slaters.get(i);
}
if (doScale)
for (int i = 0; i < slaterArray.length; i++) {
SlaterData sd = slaterArray[i];
sd.coef *= scaleSlater(sd.x, sd.y, sd.z, sd.r, sd.zeta);
if (Logger.debugging) {
Logger.debug("SlaterReader " + i + ": " + sd.iAtom + " " + sd.x + " " + sd.y + " " + sd.z + " " + sd.r + " " + sd.zeta + " " + sd.coef);
}
}
if (doSort) {
Arrays.sort(slaterArray, new SlaterSorter());
int[] pointers = new int[slaterArray.length];
for (int i = 0; i < slaterArray.length; i++)
pointers[i] = slaterArray[i].index;
sortOrbitalCoefficients(pointers);
}
moData.put("slaters", slaterArray);
atomSetCollection.setAtomSetAuxiliaryInfo("moData", moData);
}
示例2: popContext
import org.jmol.util.Logger; //导入方法依赖的package包/类
void popContext(boolean isFlowCommand, boolean statementOnly) {
if (thisContext == null)
return;
if (thisContext.scriptLevel > 0)
scriptLevel = thisContext.scriptLevel - 1;
// we must save (and thus NOT restore) the current statement
// business when doing push/pop for commands like FOR and WHILE
ScriptContext scTemp = (isFlowCommand ? getScriptContext() : null);
restoreScriptContext(thisContext, true, isFlowCommand, statementOnly);
restoreScriptContext(scTemp, true, false, true);
if (Logger.debugging || isCmdLine_c_or_C_Option)
Logger.info("--<<-------------".substring(0, Math.max(17, scriptLevel + 5))
+ scriptLevel + " " + filename + " "
+ (thisContext == null ? "" : "" + thisContext.token) + " "
+ thisContext);
}
示例3: getString
import org.jmol.util.Logger; //导入方法依赖的package包/类
private String getString(String string) {
if (!doTranslate || translationResourcesCount == 0)
return string;
for (int bundle = 0; bundle < translationResourcesCount; bundle++) {
try {
String trans = translationResources[bundle].getString(string);
return trans;
} catch (MissingResourceException e) {
// Normal
}
}
if (Logger.debugging) {
Logger.info("No trans, using default: " + string);
}
return string;
}
示例4: getCachedLine
import org.jmol.util.Logger; //导入方法依赖的package包/类
private boolean getCachedLine() {
slopeKey = new Float(slope);
if (!lineCache.containsKey(slopeKey))
return false;
lineBits = lineCache.get(slopeKey);
nFound++;
if (nFound == 1000000)
if (Logger.debugging) {
Logger.debug("nCached/nFound lines: " + nCached + " " + nFound);
}
return true;
}
示例5: createSpaceGroup
import org.jmol.util.Logger; //导入方法依赖的package包/类
public boolean createSpaceGroup(int desiredSpaceGroupIndex, String name,
float[] notionalUnitCell) {
spaceGroup = SpaceGroup.createSpaceGroup(desiredSpaceGroupIndex, name,
notionalUnitCell);
if (spaceGroup != null && Logger.debugging)
Logger.debug("using generated space group " + spaceGroup.dumpInfo(null));
return spaceGroup != null;
}
示例6: hklParameter
import org.jmol.util.Logger; //导入方法依赖的package包/类
private Point4f hklParameter(int i) throws ScriptException {
if (!isSyntaxCheck && viewer.getCurrentUnitCell() == null)
error(ERROR_noUnitCell);
Point3f pt = (Point3f) getPointOrPlane(i, false, true, false, true, 3, 3);
Point4f p = getHklPlane(pt);
if (p == null)
error(ERROR_badMillerIndices);
if (!isSyntaxCheck && Logger.debugging)
Logger.info("defined plane: " + p);
return p;
}
示例7: getData
import org.jmol.util.Logger; //导入方法依赖的package包/类
/**
*
* @return TRUE if data, even if ''; FALSE if '.' or '?' or eof.
*
* @throws Exception
*/
private boolean getData() throws Exception {
key = tokenizer.getTokenPeeked();
data = tokenizer.getNextToken();
if (Logger.debugging)
Logger.debug(key + " " + data);
if (data == null) {
Logger.warn("CIF ERROR ? end of file; data missing: " + key);
return false;
}
return (data.length() == 0 || data.charAt(0) != '\0');
}
示例8: initializeBspf
import org.jmol.util.Logger; //导入方法依赖的package包/类
protected void initializeBspf() {
if (bspf == null) {
if (showRebondTimes && Logger.debugging)
Logger.startTimer();
bspf = new Bspf(3);
/* if (MIX_BSPT_ORDER) {
Logger.debug("mixing bspt order");
int stride = 3;
int step = (atomCount + stride - 1) / stride;
for (int i = 0; i < step; ++i)
for (int j = 0; j < stride; ++j) {
int k = i * stride + j;
if (k >= atomCount)
continue;
Atom atom = atoms[k];
bspf.addTuple(atom.modelIndex, atom);
}
} else {
*/
Logger.debug("sequential bspt order");
for (int i = atomCount; --i >= 0;) {
// important that we go backward here, because we are going to
// use System.arrayCopy to expand the array ONCE only
Atom atom = atoms[i];
bspf.addTuple(models[atom.modelIndex].trajectoryBaseIndex, atom);
}
// }
if (showRebondTimes && Logger.debugging) {
Logger.checkTimer("Time to build bspf");
bspf.stats();
// bspf.dump();
}
}
}
示例9: removeBinding
import org.jmol.util.Logger; //导入方法依赖的package包/类
private void removeBinding(Iterator<String> e, String key) {
if (Logger.debugging)
Logger.debug("removing binding " + key);
if (e == null)
bindings.remove(key);
else
e.remove();
}
示例10: cleanRegistry
import org.jmol.util.Logger; //导入方法依赖的package包/类
synchronized private static void cleanRegistry() {
AppletWrapper app = null;
boolean closed = true;
for (Map.Entry<String, Applet> entry : htRegistry.entrySet()) {
String theApplet = entry.getKey();
try {
app = (AppletWrapper) (entry.getValue());
JSObject theWindow = JSObject.getWindow(app);
//System.out.print("checking " + app + " window : ");
closed = ((Boolean) theWindow.getMember("closed")).booleanValue();
//System.out.println(closed);
if (closed || theWindow.hashCode() == 0) {
//error trap
}
if (Logger.debugging)
Logger.debug("Preserving registered applet " + theApplet
+ " window: " + theWindow.hashCode());
} catch (Exception e) {
closed = true;
}
if (closed) {
if (Logger.debugging)
Logger.debug("Dereferencing closed window applet " + theApplet);
htRegistry.remove(theApplet);
app.destroy();
}
}
}
示例11: readAtoms
import org.jmol.util.Logger; //导入方法依赖的package包/类
private void readAtoms(int atomCount0, boolean doAddAtoms) throws Exception {
for (int i = 0; i < modelAtomCount; i++) {
String tokens[] = getTokens(readLine());
Atom atom = (doAddAtoms ? r.atomSetCollection.addNewAtom()
: r.atomSetCollection.getAtom(atomCount0 - modelAtomCount + i));
atom.elementSymbol = AtomSetCollectionReader
.getElementSymbol(parseInt(tokens[0]));
r.setAtomCoord(atom, parseFloat(tokens[1]) * AtomSetCollectionReader.ANGSTROMS_PER_BOHR,
parseFloat(tokens[2]) * AtomSetCollectionReader.ANGSTROMS_PER_BOHR,
parseFloat(tokens[3]) * AtomSetCollectionReader.ANGSTROMS_PER_BOHR);
}
if (doAddAtoms && Logger.debugging) {
Logger.debug(atomCount + " atoms read");
}
}
示例12: assignPotentials
import org.jmol.util.Logger; //导入方法依赖的package包/类
@Override
public void assignPotentials(Atom[] atoms, float[] potentials,
BitSet bsAromatic, BitSet bsCarbonyl,
BitSet bsIgnore, String data) {
getAtomicPotentials(data, "atomicLipophilicity.txt");
for (int i = 0; i < atoms.length; i++) {
float f = Math.abs(atoms[i].getFormalCharge());
if (f == 0) {
if (bsIgnore != null && bsIgnore.get(i)) {
f = Float.NaN;
} else {
f = getTabulatedPotential(atoms[i]);
if (Float.isNaN(f))
switch (atoms[i].getElementNumber()) {
case 6:
f = (bsAromatic.get(i) ? 0.31f : bsCarbonyl.get(i) ? -0.54f
: 0.45f);
break;
case 7:
f = (bsAromatic.get(i) ? -0.6f : bsCarbonyl.get(i) ? -0.44f
: -1.0f);
break;
case 8:
f = (bsCarbonyl.get(i) ? -0.9f : -0.17f);
break;
default:
f = Float.NaN;
}
}
}
if (Logger.debugging)
Logger.info(atoms[i].getInfo() + " " + f);
potentials[i] = f;
}
}
示例13: finalizeReader
import org.jmol.util.Logger; //导入方法依赖的package包/类
@Override
protected void finalizeReader() throws Exception {
super.finalizeReader();
if (nOrbitals > 0)
setMOs("eV");
if (Logger.debugging)
Logger.debug(orbitals.size() + " molecular orbitals read");
}
示例14: readMolecularOrbitalVectors
import org.jmol.util.Logger; //导入方法依赖的package包/类
private boolean readMolecularOrbitalVectors() throws Exception {
if (shells == null)
return true;
Map<String, Object>[] mos = null;
List<String>[] data = null;
int moCount = 0;
int iListed = 0;
int ptOffset = -1;
int fieldSize = 0;
int nThisLine = 0;
discardLines(5);
boolean isBeta = false;
boolean betaOnly = !filterMO();
while (readLine() != null) {
if (parseInt(line) != iListed + 1) {
if (line.indexOf("beta") < 0)
break;
alphaBeta = "beta ";
if (!filterMO())
break;
isBeta = true;
iListed = 0;
readLine();
continue;
}
readLine();
String[] tokens = getTokens();
if (Logger.debugging) {
Logger.debug(tokens.length + " --- " + line);
}
nThisLine = tokens.length;
ptOffset = 6;
fieldSize = 12;
mos = ArrayUtil.createArrayOfHashtable(nThisLine);
data = ArrayUtil.createArrayOfArrayList(nThisLine);
for (int i = 0; i < nThisLine; i++) {
mos[i] = new Hashtable<String, Object>();
data[i] = new ArrayList<String>();
}
while (readLine() != null && line.length() > 0)
for (int i = 0, pt = ptOffset; i < nThisLine; i++, pt += fieldSize)
data[i].add(line.substring(pt, pt + fieldSize).trim());
for (int iMo = 0; iMo < nThisLine; iMo++) {
float[] coefs = new float[data[iMo].size()];
int iCoeff = 0;
while (iCoeff < coefs.length) {
coefs[iCoeff] = parseFloat(data[iMo].get(iCoeff));
iCoeff++;
}
mos[iMo].put("coefficients", coefs);
mos[iMo].put("type", alphaBeta + " " + (++iListed));
++moCount;
Map<String, Object> mo = (moInfo == null ? null : moInfo.get(Integer
.valueOf(isBeta ? -iListed : iListed)));
if (mo != null)
mos[iMo].putAll(mo);
if (!betaOnly || isBeta)
setMO(mos[iMo]);
}
line = "";
}
energyUnits = "a.u.";
setMOData(false);
return true;
}
示例15: setDebugging
import org.jmol.util.Logger; //导入方法依赖的package包/类
public void setDebugging() {
debugScript = viewer.getDebugScript();
logMessages = (debugScript && Logger.debugging);
}