ICM Manual v.3.9
by Ruben Abagyan,Eugene Raush and Max Totrov
Copyright © 2020, Molsoft LLC
Jun 5 2024

Contents
 
Introduction
Reference Guide
 ICM options
 Editing
 Graph.Controls
 Alignment Editor
 Constants
 Subsets
 Molecules
 Selections
 Fingerprints
 Regexp
 Cgi programming with icm
 Xml drugbank example
 Tree cluster
 Arithmetics
 Flow control
 MolObjects
 Energy Terms
 Integers
 Reals
 Logicals
 Strings
 Preferences
 Tables
 Other
 Chemical
 Smiles
 Chemical Functions
 MolLogP
 MolLogS
 MolSynth
 Soap
 Gui programming
 Commands
 Functions
 Icm shell functions
 Macros
 Files
Command Line User's Guide
References
Glossary
 
Index
PrevICM Language Reference
Constants
Next

[ int-constant | real-constant | logical-constant | string-constant | iarray-constant | rarray-constant | sarray-constant ]

The values of most of the ICM-shell objects may also be represented explicitly in the ICM-shell as so called "constants" (i.e. in the myFactors={1.2, -4., 5.88} line, myFactors is an ICM-shell variable of the rarray type, while {1.2, -4., 5.88} is an "rarray" constant. The following constants are defined in the ICM-shell:
  • integers: -9999 12
  • reals: 12.0 -0.00003 2.
  • logicals: yes no
  • strings: "I see M", "Backslash (\\) and quote (\")" "line1\nline2" or
    
    ## newlines are allowed between triple quotes, e.g.
    a = """
     A text with lines
    is also a string
    """
    
    Escape sequences which can be used inside strings:
     
    \a - bell 
    \b - backspace 
    \f - formfeed 
    \n - newline 
    \r - carriage return 
    \t - horizontal tab 
    \v - vertical tab 
    \\ - backslash 
    \" - double quote 
    
  • integer arrays: {2, -1, 6, 0} {-8, -1, 2} The comma is compulsory before a negative number, it can be skipped otherwise.
  • real array: { -1.6 , 2.150 3., -160.} Real arrays can also contain "ND" (Not Defined) and other special values. The following special values:
    • ND (not defined)
    • >r_value
    • <r_value
    • INF : infinity
    • -INF : infinity
    To compare an array with special value use the Toreal function:
    
    read table csv "x_with_spec_values.csv" name="t"
    t.A == Toreal({"ND"})
    
    Option number in read table csv will convert empty fields into NDHowever not all functions support them, be careful. Example:
    
     show Toreal({"ND"}
    #
    # here we are changing 0. values to NDs
     group table t {1. 0. 2. 0.}
     idx = Index( t.A == 0.0 )
     t.A[ idx ] = Toreal( Sarray( Nof(idx), "ND" ) ) 
    
  • string arrays: {"do","re","mi","fa","sol"} {"\n(newline), \t (tab)","\a (bell)"}
  • selections (find a detailed description below):
 
 a_hiv?.  a_1,2.  a_*.           # objects 
 a_h*.a   a_m1    a_*.!w2,w15,z* # molecules 
 a_1.*/2:15,18:26 a_/18,his*     # residues 
 a_//ca,c,n a_1.c a_/2:4/!h*     # atoms 
 v_//phi,psi      V_2//?vt*      # variables 


Prev
Alignment Editor
Home
Up
Next
Subsets

Copyright© 1989-2024, Molsoft,LLC - All Rights Reserved. Copyright© 1989-2024, Molsoft,LLC - All Rights Reserved. This document contains proprietary and confidential information of Molsoft, LLC. The content of this document may not be disclosed to third parties, copied or duplicated in any form, in whole or in part, without the prior written permission from Molsoft, LLC.