The MDStudio SMARTCyp service combines SMARTCyp reactivity-based Cytochrome P450 site-of-metabolism prediction and PLANTS structure-based ligand interaction prediction into one service.
MDStudio SMARTCyp can be used in three different ways: in the MDStudio environment, as REST service or as local installation.
Can't wait to try it out? Click the launch binder
button, this will start a fully operational
Binder service in your browser for you to play with.
Run MDStudio SMARTCyp as docker container by:
docker pull mdstudio/mdstudio_smartcyp
docker run --name mdstudio_smartcyp -p 8081:8081 <container ID>
or custom build the MDStudio SMARTCyp Docker container by cloning the MDStudio_SMARTCyp GitHub repository and run:
docker build MDStudio_SMARTCyp/ -t mdstudio/mdstudio_smartcyp
docker run -p 8081:8081 mdstudio/mdstudio_smartcyp
or download/clone the MDStudio_SMARTCyp repository and install locally using pip. The repository comes equipped with the SMARTCyp software but for using PLANTS docking and SPORES structure preparation functionality you will need to obtain and copy the executables to the mdstudio_smartcyp/bin/ directory yourself. Use the following naming scheme for the executables: <plants or spores>_<platform> where platform is either linux or darwin for OSX. Then install using pip as:
pip install MDStudio_SMARTCyp/
MDStudio SMARTCyp can be used as a fully compliant microservice within a MDStudio environment. After installation you can launch the package as standalone MDStudio microservice:
python -u -m mdstudio_smartcyp
or as part of an MDStudio environment orchestrator either in standalone mode or as docker container. In both of the latter two cases you will need to edit the entry_point_mdstudio_smartcyp.sh script and set the -a/--api_mode to wamp to activate the MDStudio WAMP interface (Web Application Messaging Protocol).
MDStudio SMARTCyp exposes an OpenAPI (swagger) compliant REST API using a production grade Flask web server (using gevent coroutines). The MDStudio SMARTCyp docker image (step 1) is by default configured to start as REST service instead of the WAMP service. In standalone mode the REST service is started as:
python -u -m mdstudio_smartcyp -a rest
MDStudio SMARTCyp uses a OpenRiskNet (ORN) compliant API to ensure that each service is accessible to the ORN interoperability layer. This includes service level annotation according to the ORN semantic interoperability layer concept. Consult the mdstudio_smartcyp/rest/smartcyp_openapi for details.
The MDStudio environment allows you to interact with the endpoints of a microservice in many different ways from a high level workflow manager, use in different programming languages to command line access. Please consult the MDStudio documentation for more information on usage.
The functional REST service endpoints are defined using the OpenAPI/Swagger definitions. The service exposes a Swagger UI web page that lists the endpoints the service exposes, provides an overview of the configuration parameters and allow you to use the endpoints directly from the ui. Access the ui as:
http(s)://<base URL, localhost by default>:<service port, 8081 by default>/ui/
A few examples using curl to interact with the endpoints:
- Run SMARTCyp using a SMILES string: curl -F smiles='C1=CC=C(C(=C1)CC(=O)O)NC2=C(C=CC=C2Cl)Cl' 'http://localhost:8081/smartcyp'
- Run PLANTS: curl -F ligand_file='@/path/to/ligand.mol2' -F protein_file='@/path/to/protein.mol2' -F bindingsite_center=-0.989 -F bindingsite_center=3.261 -F bindingsite_center=0.826 'http://localhost:8081/plants_docking'
- Get two of the PLANTS docking poses from the previous calculation as multi MOL2 file: curl -F paths=docking-9y4f3anb/diclofenac_entry_00001_conf_50.mol2 -F paths=docking-9y4f3anb/diclofenac_entry_00001_conf_49.mol2 'http://localhost:8081/plants_docking_structures'
- Reprotonate a structure using SPORES: curl -F mol='@/path/to/ligand.mol2' -F input_format=mol2 -F spores_mode=reprot 'http://localhost:8081/spores'
The mdstudio_smartcyp python process accepts the following command line configuration options:
- -a/--api_mode: rest or wamp to start the service in the REST or WAMP mode respectively.
- -w/--base_work_dir: the base directory where SMARTCyp, PLANTS or SPORES work directories will be stored. The systems temporary (/tmp) directory will be used by default.
- -r/--result_storage_time: how many hours the calculated results will remain available before cleanup. 0 by default which means no cleanup.
- -p/--http_port: the network port the REST or WAMP service will be started on. 8081 by default.