In ICM, a pipe (|) is a way to efficiently send the output of one command or program directly as input to another command or program without creating an intermediate file. All the available scripts for piping tables are in the $ICMHOME/molpipe directory.
Setting up your ICM Environment
In ICM scripting, setshell is a command used to execute shell commands within an ICM session. It allows you to interact with the operating system’s command-line environment (e.g., Bash on Linux/macOS) from within an ICM script.Use 'setshell' to set the path to your version of ICM:
./setshell /usr/local/icm/icm64
or set a PATH to $ICMHOME/molpipe
Available Scripts
Read (from SDF,SMILES,MOLT,MOLCART)
- molrdsdf.icm
- molrdsmi.icm
- molrdmolt.icm
- molrdmolcart.icm
Write/Convert (SDF,SMILES,MOLT,ICB)
- mol2sdf.icm
- mol2smi.icm
- mol2molt.icm
- mol2icb.icm
Misc
- molcount.icm : counts number of molecules in the input
- molhead.icm : show first top number of molecules
- molgrep.icm : grep by substructure
- molmkindex.icm : generate ICM index file from the pipe
Filter/Properties
- molcharge.icm : set formal charges
- molfilter.icm : filter by properties
- molcalcprop.icm : calculate properties
- molenantiomers.icm : generate enantiomers
- molstandard.icm : removes salt/applies 2D depiction/removed explicit hydrogen/normalize chemical group drawing
Unique/Centers
- moluniq.icm : generates non-redundant subset from the input file
- molcluster.icm : selects centers from the input pipe
Compare
- molcompare.icm : compare two SD files
View the result in GUI
- molview.icm
Examples
molcount.icm myfile.sdf # counts the number of chemical
cat myfile.sdf | molcount.icm # the same but reads the input from file
molgrep.icm c1cccnc1 t.sdf | molhead.icm # view first hits
molgrep.icm c1cccnc1 t.sdf | molcount.icm # count matches
molgrep.icm c1cccnc1 t.sdf | molcharge.icm -proc=3 | molto3d.icm -proc=3 | mol2sdf.icm > t_hits_3d.sdf
# calculate number of racemic centers and enumerate enantiomers
molrdsdf.icm input.sdf | molcalcprop.icm "Icm::Nof(mol,chiral,3)[1]" nof_rac | molenantiomers.icm | molview.icm
# create 3D conformers and create index from the result (confgen.sh is just a wrapper around _confGen script )
confgen.sh out.sdf - | molmkindex.icm confout # will create confout.sdf and confout.inx
# Lipinksi filter
# read SDF, apply Lipinski filter and convert output to smiles
molrsdf.icm file.sdf | molfilter.icm "MolWeight(mol)<=500 & MolLogP(mol)<=5 & Nof_HBD(mol) <= 5 & Nof_HBA(mol)<=10" | mol2smi.icm