Running Schrödinger Applications from the Command Line
Schrödinger applications can be run from a graphical interface or from the command line. The software writes input and output files to a directory (folder) which is termed the working directory. Generally, these files are placed in a subdirectory of the working directory that is named after the job name. If you run applications from the command line, the directory from which you run the application is the working directory for the job.
Command-line applications are located in the main Schrödinger installation directory; command-line utilities are located in the utilities subdirectory. For usage summary information on any application or utility, use the -h (help) option:
command -h
utilityname -h
The help messages are also available in the documentation under Program, Utility, and Script Usage. For command-line use, note that the OPLS4 force field is called S-OPLS and the OPLS5 force field is called SPFF in command-line applications
- Linux
- Windows
- Mac
Linux:
To run any Schrödinger program on a Linux platform, or start a Schrödinger job on a remote host from a Linux platform, you must first set the SCHRODINGER environment variable to the installation directory for your Schrödinger software. To set this variable, enter the following command at a shell prompt:
|
csh/tcsh: |
|
|
bash/ksh: |
|
Once you have set the SCHRODINGER environment variable, you can run programs and utilities with the following commands:
$SCHRODINGER/program $SCHRODINGER/utilities/utility
Command-line scripts that are not in these locations but stored with the product can be run with the following command:
$SCHRODINGER/run -FROM product script
You can start the Maestro interface with the following command:
$SCHRODINGER/maestro &
and similarly for the Canvas interface. It is usually a good idea to change to the desired working directory beforehand. This directory then becomes the working directory.
Windows:
The primary way of running Schrödinger applications on a Windows platform is from a graphical interface. To start the Maestro interface, double-click on the icon for the Maestro profile you want to use, on a Maestro project, or on a structure file; or choose Start → All Programs → Schrodinger-2026-1 → Maestro. Similarly, to start Canvas, double-click on the Canvas icon or on a Canvas project. You do not need to make any settings before starting Maestro or running programs. The default working directory is the Schrodinger folder in your Documents folder.
If you want to run applications from the command line, you can do so in one of the shells that are provided with the installation and have the Schrödinger environment set up:
- Schrödinger Command Prompt—DOS shell.
- Schrödinger Power Shell—Windows Power Shell (if available).
You can open these shells from Start → All Programs → Schrodinger-2026-1. You do not need to include the path to a program or utility when you type the command to run it, as the path is already set up. If you want access to Unix-style utilities (such as awk, grep, and sed), preface the commands with sh, or type sh in either of these shells to start a Unix-style shell. Scripts stored with a particular product can be run with the following command:
run -FROM product script
Mac:
The primary way of running Schrödinger software on a Mac is from a graphical interface. To start the Maestro interface with a given profile, click the icon for the profile on the dock. If the icon isn’t on the dock, you can put one there by dragging it from the SchrodingerSuites2026-1 folder in your Applications folder. This folder contains icons for all the available profiles of Maestro and other applications as well, such as Canvas. The default working directory is the Schrodinger folder in your Documents folder ($HOME/Documents/Schrodinger).
Running software from the command line is similar to Linux—open a terminal window and run the program. See under Linux (above) for instructions. You do not need to set the SCHRODINGER environment variable when you run from the command line, as this is set in your default environment for the most recent installation. To set other environment variables, use the command
launchctl setenv variable "value"
You can also start Maestro from the command line in the same way as on Linux. The default Maestro working directory is the same as when you start it from the dock: it is not set to the directory you started Maestro from, as the command is running the Maestro app rather than running the program directly. You can change it from within Maestro—see Changing the Working Directory.
Canvas can also be started from the command line in the same way as Linux, and behaves the same as on Linux, except that you may need to explicitly put focus in the Canvas application to see the menu bar, because the command is not running the Canvas app, which performs the Mac-dependent setup.