Package ffx.ui
Class ModelingShell
java.lang.Object
ffx.utilities.Console
ffx.ui.ModelingShell
- All Implemented Interfaces:
 AlgorithmListener,groovy.lang.GroovyObject,ComponentListener,FocusListener,EventListener,CaretListener,HyperlinkListener
The ModelingShell is used to script Multiscale Modeling Routines via the Groovy scripting
 language. Functionality available through the modeling shell includes the Force Field X API, Java
 API and Groovy extensions.
- Author:
 - Michael J. Schnieders
 
- 
Field Summary
Fields inherited from class ffx.utilities.Console
ICON_PATH, NODE_ICON_PATH - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidafter()afterbooleanalgorithmUpdate(MolecularAssembly active) After a successful step or interval of an algorithm, this method of the listener will be called.If at exit time, a script is running, the user is given an option to interrupt it firstbooleanvoidbefore()beforevoidvoidclearContext(EventObject evt) voidvoidclearOutput(EventObject evt) energy()energyvoidvoidfileNewWindow(EventObject evt) voidmd(int nStep, double timeStep, double printInterval, double saveInterval, double temperature, boolean initVelocities, File dyn) mdvoidrun()Configure the Swing GUI for the shell.runFFXScript(File file, List<String> argList) runFFXScript - Execute a FFX script.runFFXScript(Class<? extends FFXCommand> className, List<String> argList) runFFXScript - Execute a compiled FFX command.voidrunNonGroovyScript(File file, List<String> argList) runPythonScript - Execute a Python script.voidselectvoidsetArgList(List<String> argList) setArgListvoidvoidshowAbout(EventObject evt) time()timetoString()voidMethods inherited from class ffx.utilities.Console
addClasspathDir, addClasspathDir, addClasspathJar, addClasspathJar, addToHistory, appendOutput, appendOutput, appendOutput, appendOutput, appendOutput, appendOutputLines, appendOutputNl, appendStacktrace, autoClearOutput, beep, bindResults, captureStdErr, captureStdOut, caretUpdate, closeOutputPrintWriter, comment, comment, compileAsJava, compileAsJava, compileFinishNormal, compileScript, compileScript, compileScript, componentHidden, componentMoved, componentResized, componentShown, copy, copy, createOutputPrintWriter, cut, cut, detachedOutput, doInterrupt, doInterrupt, doRun, dot, exit, exit, exitDesktop, exitDesktop, exitDesktop, fileNewFile, fileNewFile, fileOpen, fileOpen, fileSave, fileSave, fileSaveAs, fileSaveAs, find, find, findNext, findNext, findPrevious, findPrevious, finishException, finishNormal, finishNormal, focusGained, focusLost, fullStackTraces, getAfterExecution, getAutoClearOutput, getAutoClearOutputAction, getBaseConfig, getBeforeExecution, getBlank, getCaptureStdErr, getCaptureStdOut, getColNum, getCommandStyle, getConfig, getConsoleControllers, getConsoleId, getConsolePreferences, getCopyFromComponent, getCurrentClasspathDir, getCurrentClasspathJarDir, getCurrentFileChooserDir, getCursorPos, getDEFAULT_SCRIPT_NAME_START, getDetachedOutput, getDetachedOutputAction, getDirty, getFrame, getFrameConsoleDelegates, getFullStackTraces, getFullStackTracesAction, getGroovyFileFilter, getHideOutputWindowAction1, getHideOutputWindowAction2, getHideOutputWindowAction3, getHideOutputWindowAction4, getHistory, getHistoryIndex, getHyperlinkStyle, getInputArea, getInputAreaContentHash, getInputEditor, getInterruptAction, getLastResult, getLoopMode, getLoopModeAction, getMaxHistory, getMaxOutputChars, getMetaClass, getNextHistoryAction, getOrientationVertical, getOrientationVerticalAction, getOrigDividerSize, getOutputArea, getOutputPrintWriter, getOutputStyle, getOutputWindow, getPendingRecord, getPrevHistoryAction, getPromptStyle, getResultStyle, getRootElement, getRowNum, getRowNumAndColNum, getRunThread, getSaveAction, getSaveOnRun, getSaveOnRunAction, getScriptFile, getScriptNameCounter, getScriptRunning, getScrollArea, getSelectPreviousWordAction, getSelectWordAction, getShell, getShowOutputWindowAction, getShowScriptInOutput, getShowScriptInOutputAction, getShowToolbar, getShowToolbarAction, getSmartHighlighter, getSplitPane, getStackOverFlowError, getStacktraceStyle, getStatusLabel, getSwing, getSystemErrorInterceptor, getSystemOutInterceptor, getTextSelectionEnd, getTextSelectionStart, getThreadInterrupt, getThreadInterruptAction, getToolbar, getUseScriptClassLoaderForScriptExecution, getVisualizeScriptResults, getVisualizeScriptResultsAction, hideAndClearOutputWindow, hideAndClearOutputWindow, hideOutputWindow, hideOutputWindow, historyNext, historyNext, historyPrev, historyPrev, hyperlinkUpdate, insertString, insertString, inspectAst, inspectAst, inspectCst, inspectCst, inspectLast, inspectLast, inspectTokens, inspectTokens, inspectVariables, inspectVariables, installInterceptor, invokeTextAction, invokeTextAction, isAutoClearOutput, isCaptureStdErr, isCaptureStdOut, isDetachedOutput, isDirty, isFullStackTraces, isLoopMode, isOrientationVertical, isSaveOnRun, isScriptRunning, isShowScriptInOutput, isShowToolbar, isSmartHighlighter, isStackOverFlowError, isThreadInterrupt, isUseScriptClassLoaderForScriptExecution, isVisualizeScriptResults, largerFont, largerFont, listClasspath, listClasspath, loadMaxOutputChars, loadScriptFile, loopMode, loopMode, main, mark, newScript, notifySystemErr, notifySystemOut, orientationVertical, paste, paste, preferences, preferences, print, print, redo, redo, replace, replace, run, runJava, runJava, runScript, runScript, runScript, runSelectedJava, runSelectedJava, runSelectedScript, runSelectedScript, runSelectedScript, saveOnRun, saveOnRun, selectAll, selectAll, selectBlock, selectBlock, selectFilename, selectFilename, setAfterExecution, setAutoClearOutput, setAutoClearOutputAction, setBaseConfig, setBeforeExecution, setBlank, setCaptureStdErr, setCaptureStdOut, setColNum, setCommandStyle, setConfig, setConsoleControllers, setConsolePreferences, setCopyFromComponent, setCurrentClasspathDir, setCurrentClasspathJarDir, setCurrentFileChooserDir, setCursorPos, setDetachedOutput, setDetachedOutputAction, setDirty, setFrame, setFrameConsoleDelegates, setFullStackTraces, setFullStackTracesAction, setGroovyFileFilter, setHideOutputWindowAction1, setHideOutputWindowAction2, setHideOutputWindowAction3, setHideOutputWindowAction4, setHistory, setHistoryIndex, setHyperlinkStyle, setInputArea, setInputAreaContentHash, setInputEditor, setInterruptAction, setLoopMode, setLoopModeAction, setMaxHistory, setMaxOutputChars, setMetaClass, setNextHistoryAction, setOrientationVertical, setOrientationVerticalAction, setOrigDividerSize, setOutputArea, setOutputPreferences, setOutputPrintWriter, setOutputStyle, setOutputWindow, setPendingRecord, setPrevHistoryAction, setPromptStyle, setResultStyle, setRootElement, setRowNum, setRowNumAndColNum, setRowNumAndColNum, setRunThread, setSaveAction, setSaveOnRun, setSaveOnRunAction, setScriptFile, setScriptNameCounter, setScriptRunning, setScrollArea, setSelectPreviousWordAction, setSelectWordAction, setShell, setShowOutputWindowAction, setShowScriptInOutput, setShowScriptInOutputAction, setShowToolbar, setShowToolbarAction, setSmartHighlighter, setSplitPane, setStackOverFlowError, setStacktraceStyle, setStatusLabel, setSwing, setSystemErrorInterceptor, setSystemOutInterceptor, setTextSelectionEnd, setTextSelectionStart, setThreadInterrupt, setThreadInterruptAction, setToolbar, setUseScriptClassLoaderForScriptExecution, setVariable, setVisualizeScriptResults, setVisualizeScriptResultsAction, showCompilingMessage, showExecutingMessage, showMessage, showOutputWindow, showOutputWindow, showScriptInOutput, showToolbar, smallerFont, smallerFont, smartHighlighter, smartHighlighter, threadInterruption, undo, undo, visualizeScriptResultsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObject
getProperty, invokeMethod, setProperty 
- 
Constructor Details
- 
ModelingShell
Constructor for ModelingShell.- Parameters:
 mainPanel- a reference to the MainPanel.
 
 - 
 - 
Method Details
- 
after
public void after()after - 
algorithmUpdate
After a successful step or interval of an algorithm, this method of the listener will be called.- Specified by:
 algorithmUpdatein interfaceAlgorithmListener- Parameters:
 active- The system the algorithm is operating on.- Returns:
 - A return of 
trueindicates the algorithm continues. 
 - 
askToInterruptScript
If at exit time, a script is running, the user is given an option to interrupt it first- Overrides:
 askToInterruptScriptin classffx.utilities.Console
 - 
askToSaveFile
public boolean askToSaveFile()Return false if user elects to cancel.
- Overrides:
 askToSaveFilein classffx.utilities.Console
 - 
before
public void before()before - 
clearContext
public void clearContext()- Overrides:
 clearContextin classffx.utilities.Console
 - 
clearContext
- Overrides:
 clearContextin classffx.utilities.Console
 - 
clearOutput
public void clearOutput()Print out the Force Field X promo.
- Overrides:
 clearOutputin classffx.utilities.Console
 - 
clearOutput
- Overrides:
 clearOutputin classffx.utilities.Console
 - 
energy
energy- Returns:
 - a 
ForceFieldEnergyobject. 
 - 
fileNewWindow
public void fileNewWindow()- Overrides:
 fileNewWindowin classffx.utilities.Console
 - 
fileNewWindow
- Overrides:
 fileNewWindowin classffx.utilities.Console
 - 
getUIAlgorithmUtils
 - 
getUIPotentialsUtils
 - 
md
public void md(int nStep, double timeStep, double printInterval, double saveInterval, double temperature, boolean initVelocities, File dyn) md- Parameters:
 nStep- The number of MD steps.timeStep- a double.printInterval- a double.saveInterval- a double.temperature- a double.initVelocities- a boolean.dyn- aFileobject.
 - 
run
public void run()Configure the Swing GUI for the shell.- Overrides:
 runin classffx.utilities.Console
 - 
select
select- Parameters:
 node- aMSNodeobject.
 - 
setArgList
setArgList- Parameters:
 argList- aListobject.
 - 
showAbout
public void showAbout()- Overrides:
 showAboutin classffx.utilities.Console
 - 
showAbout
- Overrides:
 showAboutin classffx.utilities.Console
 - 
time
time- Returns:
 - a 
Doubleobject. 
 - 
toString
 - 
updateTitle
public void updateTitle()- Overrides:
 updateTitlein classffx.utilities.Console
 - 
runFFXScript
runFFXScript - Execute a FFX script.- Parameters:
 file- aFileobject.argList- List of String inputs to the script.- Returns:
 - Returns a reference to the executed script.
 
 - 
runNonGroovyScript
runPythonScript - Execute a Python script.- Parameters:
 file- aFileobject.argList- List of String inputs to the script.
 - 
runFFXScript
runFFXScript - Execute a compiled FFX command.- Parameters:
 className- a compiled FFX command.argList- List of String inputs to the command.- Returns:
 - Returns a reference to the executed command.
 
 
 -