pyflare

Runs a Python script using pyflare. The scripts have access to Flare™ Python API.

The input ligands and proteins can be accessed in the script under the names project.ligands and project.proteins, where project is a cresset.flare.Project object. The script may add/edit/delete ligands and proteins. When the script completes the contents of project.ligands and project.proteins are sent to the output.

The flow variables for this node can be accessed in the script under the name settings as a Python dict object. These can be used to pass parameters to your Python script.

The documentation for the Flare Python API can be found in the Flare installation directory.

Examples:

Add column to ligands and proteins table:

				
for ligand in project.ligands:
    ligand.properties['New Column'].value = 1

for protein in project.proteins:
    protein.user_data['New Column'] = 2

Run Protein Prep on proteins:

				
from cresset import flare

prep = flare.ProteinPrep()
prep.proteins = project.proteins
prep.start()
prep.wait()
	        

Dock ligands to a protein at the location of the first ligand:

				
from cresset import flare

dock = flare.Docking()
dock.system.grid = project.ligands[0]
dock.ligands = project.ligands[1:]
dock.protein = project.protein[0]
dock.start()
dock.wait()
	        

This node wraps the Flare executable 'pyflare', which must be installed with a valid license for this node to work. If this is installed in the default location on Windows, then it should be found automatically. Otherwise, you must either set the 'Cresset Home' preference setting or the CRESSET_HOME environment variable to the base Cresset software install directory. You may also set the 'pyflare Path' preference setting or the CRESSET_PYFLARE_EXE environment variable to point directly at the executable itself.

Some of the scripts that the 'pyflare' node can run can be configured to use additional resources to perform calculations. The time taken for the node to run will be drastically reduced using the Cresset Engine Broker™. To use this facility either set the 'Cresset Engine Broker' preference setting or set the CRESSET_BROKER environment variable to point to the location of your local Engine Broker. If you do not currently have the Cresset Engine Broker then contact Cresset (enquiries@cresset-group.com) for pricing on local and cloud based brokers.

For more information visit www.cresset-group.com or contact us at support@cresset-group.com.

Options

Basic

Column containing (optional) ligands structures
The column in the first optional input datatable containing the ligands to import into the Flare project. The ligands can be accessed in the script via 'project.ligands'.
Column containing (optional) proteins structure
The column in the second optional input datatable containing the proteins to import into the Flare project. The proteins can be accessed in the script via 'project.proteins'.
Script
The Python script to run.

Input Ports

Icon
In the Python script the ligands are available under the name project.ligands.
Icon
In the Python script the proteins are available under the name project.proteins.

Output Ports

Icon
The ligands in the project.ligands list after the script has completed.
Icon
The proteins in the project.proteins list after the script has completed.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.