Q. How can I embed ICM within a Python script?
A: You can use the os.system command in Python to call ICM from within your script. Below is an example:
#python script
import os
os.system("$ICMHOME/icm64 <your_icm_command>")
Replace <your_icm_command> with the specific ICM command you want to execute.
For example below we automatically setup a docking project using _dockBatch and run the screening using _dockScan inside a python script
#python script
import os
pocket_residues = "377,385,399,400,402,420,448,455,501"
myDockProj = "D_1xbb_nolig"
os.system("$ICMHOME/icm64 $ICMHOME/_dockBatch 1xbb_nolig.pdb pocket=a_a/" + pocket_residues + " proj=D_1xbb_nolig")
os.system("$ICMHOME/icm64 $ICMHOME/_dockScan " + myDockProj + " input=myDB_8.sdf output=myDB_8_results.sdf")