本文整理汇总了Java中org.jmol.util.Logger.startTimer方法的典型用法代码示例。如果您正苦于以下问题:Java Logger.startTimer方法的具体用法?Java Logger.startTimer怎么用?Java Logger.startTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jmol.util.Logger
的用法示例。
在下文中一共展示了Logger.startTimer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateCube
import org.jmol.util.Logger; //导入方法依赖的package包/类
@Override
protected void generateCube() {
// This is the starting point for the calculation.
volumeData.getYzCount();
if (isCavity && params.theProperty != null)
return;
Logger.startTimer();
getMaxRadius();
if (isCavity && dataType != Parameters.SURFACE_NOMAP
&& dataType != Parameters.SURFACE_PROPERTY) {
volumeData.voxelData = voxelData = new float[nPointsX][nPointsY][nPointsZ];
resetVoxelData(Float.MAX_VALUE);
markSphereVoxels(cavityRadius, params.distance);
generateSolventCavity();
resetVoxelData(Float.MAX_VALUE);
markSphereVoxels(0, Float.NaN);
} else {
generateSolventCube();
}
unsetVoxelData();
if (params.cappingObject instanceof Point4f) {
volumeData.capData((Point4f) params.cappingObject, params.cutoff);
params.cappingObject = null;
}
Logger.checkTimer("solvent surface time");
}
示例2: undoSave
import org.jmol.util.Logger; //导入方法依赖的package包/类
private void undoSave(boolean incrementPtr) {
if (undoButton == null)
return;
if (!viewer.getBooleanProperty("undo")
|| !viewer.getBooleanProperty("preserveState"))
return;
//delete redo items, since they will no longer be valid
for (int i = undoPointer + 1; i <= MAXUNDO; i++)
undoStack[i] = null;
Logger.startTimer();
try {
undoStack[undoPointer] = (String) viewer.getProperty("readable",
"stateInfo", null);
//shift stack if full
if (incrementPtr && undoPointer == MAXUNDO) {
for (int i = 1; i <= MAXUNDO; i++)
undoStack[i - 1] = undoStack[i];
undoStack[MAXUNDO] = null;
} else if (incrementPtr)
undoPointer++;
} catch (Error e) {
dontsave = true;
}
if (dontsave || Logger.checkTimer(null) > 1000) {
//viewer.setBooleanProperty("undo", false);
//undoClear();
Logger.info("command processing slow; undo disabled");
} else {
undoSetEnabled();
}
undoSaved = true;
//dumpUndo("undoSave DONE");
}
示例3: initializeMapping
import org.jmol.util.Logger; //导入方法依赖的package包/类
@Override
protected void initializeMapping() {
if (Logger.debugging)
Logger.startTimer();
if (bsNearby != null)
bsMySelected.or(bsNearby);
iter = atomDataServer.getSelectedAtomIterator(bsMySelected, false, false);
}
示例4: 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();
}
}
}
示例5: render1
import org.jmol.util.Logger; //导入方法依赖的package包/类
private void render1(Graphics3D g3d, ModelSet modelSet) { // , Rectangle
// rectClip
if (modelSet == null || !viewer.mustRenderFlag())
return;
if (logTime)
Logger.startTimer();
logTime = viewer.getTestFlag1();
viewer.finalizeTransformParameters();
try {
if (bsAtoms != null)
translateSelected();
g3d.renderBackground();
if (renderers == null)
renderers = new ShapeRenderer[JmolConstants.SHAPE_MAX];
for (int i = 0; i < JmolConstants.SHAPE_MAX && g3d.currentlyRendering(); ++i) {
Shape shape = shapeManager.getShape(i);
if (shape == null)
continue;
getRenderer(i, g3d).render(g3d, modelSet, shape);
if (logTime)
Logger.checkTimer("render time " + JmolConstants.getShapeClassName(i));
}
} catch (Exception e) {
e.printStackTrace();
Logger.error("rendering error? ");
}
if (logTime)
Logger.checkTimer("render time");
}
示例6: getAtomSetCollection
import org.jmol.util.Logger; //导入方法依赖的package包/类
/**
*
* @param fileName
* @param isAppend
* @param htParams
* @param loadScript
* only necessary for string reading
* @return
* an AtomSetCollection or a String (error)
*/
private Object getAtomSetCollection(String fileName, boolean isAppend,
Map<String, Object> htParams,
StringBuffer loadScript) {
if (fileName == null)
return null;
if (fileName.indexOf("[]") >= 0) {
// no reloading of string[] or file[] data -- just too complicated
return null;
}
Object atomSetCollection;
Logger.startTimer();
htParams = setLoadParameters(htParams, isAppend);
boolean isLoadVariable = fileName.startsWith("@");
boolean haveFileData = (htParams.containsKey("fileData"));
if (fileName.indexOf('$') == 0)
htParams.put("smilesString", fileName.substring(1));
boolean isString = (fileName.equalsIgnoreCase("string") || fileName
.equals(JmolConstants.MODELKIT_ZAP_TITLE));
String strModel = null;
if (haveFileData) {
strModel = (String) htParams.get("fileData");
if (htParams.containsKey("isData")) {
return loadInline(strModel, '\0', isAppend, htParams);
}
} else if (isString) {
strModel = modelSet.getInlineData(-1);
if (strModel == null)
if (isModelKitMode())
strModel = JmolConstants.MODELKIT_ZAP_STRING;
else
return "cannot find string data";
if (loadScript != null)
htParams.put("loadScript", loadScript = new StringBuffer(TextFormat.simpleReplace(
loadScript.toString(), "$FILENAME$",
"data \"model inline\"\n" + strModel + "end \"model inline\"")));
}
if (strModel != null) {
if (!isAppend)
zap(true, false/*true*/, false);
atomSetCollection = fileManager.createAtomSetCollectionFromString(
strModel, loadScript, htParams, isAppend, isLoadVariable
|| haveFileData && !isString);
} else {
// if the filename has a "?" at the beginning, we don't zap,
// because the user might cancel the operation.
atomSetCollection = fileManager.createAtomSetCollectionFromFile(fileName,
htParams, isAppend);
}
Logger.checkTimer("openFile(" + fileName + ")");
return atomSetCollection;
}