Clone wiki

CyToStruct / PATH

The purpose of CyToStruct is to execute external programs and feed them with the data from the network.

This means that our plug-in needs to be introduced to the binary file (or command). We use appBinary field in the configuration YAML to make it so. Two approaches are possible:

Full path

Providing the full (absolute) path to the binary file on user's machine.


  • c:\Program Files\pymol\pymolwin.exe - absolute path to the executable.

  • java -jar "C:\Program Files (x86)\Jmol\Jmol.jar" -s - execute Jmol.jar using system's java runtime and use -s to run a script.

  • c:\vmd\vmd -e - execute VMD and use -e flag to run a script.

Although it is the simpler approach we discourage the users from using it. Hard-coded absolute paths will inevitably require your peers to edit the configuration when the session is shared with them, simply because they have the applications installed in different locations.

Generic name (proxies)

Using the name of the program or the main executable. Examples:

  • pymolwin - the name of PyMol binary on Windows

  • jmol -s - execute jmol through batch file and use -s to run a script.

In order to use pymolwin instead of c:\Program Files\pymol\pymolwin.exe we need to add the directory c:\Program Files\pymol to our PATH.

Help page by Microsoft that explains how to add directories to path: here

It is also possible to create a .bat file in a directory already included in path and use it for redirection. Example:

Let us assume the directory C:\tools is part of the user PATH environment variable.

We can create a pymolwin.bat file in that directory which will look like this:


@echo off
set PYMOL_PATH=c:\Program Files\pymol\
%PYMOL_PATH%\PyMolWin.exe %*

Similarly, we can create a proxy for JMol:


@echo off
set JMOL_HOME=C:\Jmol\
java -Xmx512m -jar "%JMOL_HOME%\Jmol.jar"  %*

%* denotes forwarding all arguments