CCL Home Page
Up Directory CCL stercomm.h
/**************************************************************************/
/**************************************************************************/
/**************************   "steric"   **********************************/
/**************************************************************************/
/*************     Program to calculate ligand cone    ********************/
/*************     angles as a measure of steric size  ********************/
/**************************************************************************/
/**************************************************************************/

/**************************************************************************/
/******************    Menu command functions    **************************/
/**************************************************************************/
/******************        This module is        **************************/
/******************      system independant      **************************/
/**************************************************************************/

#define MAXARG   25     /* maximum number of arguments in command line    */
#define  C_LEN  250     /* maximum line length for commands               */

/**************************************************************************/
/**************************************************************************/
/**************************************************************************/

#define BLANK   1

/**************************************************************************/
/* definitions for first level of commands                                */
/**************************************************************************/

#define FILS    'f'
#define FILS_S  "file"
#define FILS_L  "data file input and output"

/**************************************************************************/

#define MOLE    'm'
#define MOLE_S  "molecule"
#define MOLE_L  "current molecule data"

/**************************************************************************/

#define SYMM    's'
#define SYMM_S  "symmetry"
#define SYMM_L  "crystal symmetry calculations"

/**************************************************************************/

#define CALC    'c'
#define CALC_S  "calculate"
#define CALC_L  "calculate steric parameters"

/**************************************************************************/

#define PLOT    'p'
#define PLOT_S  "plot"
#define PLOT_L  "graph steric profiles"

/**************************************************************************/

#define CHAN    'a'
#define CHAN_S  "change"
#define CHAN_L  "change data and parameters"

/**************************************************************************/

#define VIEW    'v'
#define VIEW_S  "view"
#define VIEW_L  "view molecule data and parameters tables"

/**************************************************************************/

#define HELP    'h'
#define HELP_S  "help"
#define HELP_L  "help on all commands"

/**************************************************************************/

#define EXIT    'x'
#define EXIT_S  "exit"
#define EXIT_L  "exit steric program"

/**************************************************************************/
/**************************************************************************/
/**************************************************************************/

/**************************************************************************/
/* definition for second level of commands under FILE                     */
/**************************************************************************/

#define LOAD    'l'
#define LOAD_S  "load"
#define LOAD_L  "load molecule data file"

/**************************************************************************/

#define SAVE    's'
#define SAVE_S  "save"
#define SAVE_L  "save molecule data file"

/**************************************************************************/

#define SVAS    'a'
#define SVAS_S  "svas"
#define SVAS_L  "save molecule under different filename"

/**************************************************************************/

#define SHEL    'e'
#define SHEL_S  "shell"
#define SHEL_L  "open operating system command shell"

/**************************************************************************/
/* definition for second level of commands under SYMM                     */
/**************************************************************************/

#define TRAN    't'
#define TRAN_S  "transform"
#define TRAN_L  "perform symmetry transform"

/**************************************************************************/

#define XPND    'x'
#define XPND_S  "expand"
#define XPND_L  "expand into unit cell"

/**************************************************************************/

#define BOXU    'b'
#define BOXU_S  "box"
#define BOXU_L  "box atomic data"

/**************************************************************************/

#define BOND    'd'
#define BOND_S  "bond"
#define BOND_L  "find bonds in atomic data"

/**************************************************************************/

#define GRUP    'g'
#define GRUP_S  "group"
#define GRUP_L  "find bonded molecular groups"

/**************************************************************************/

#define REDU    'r'
#define REDU_S  "redundant"
#define REDU_L  "exclude redundant atoms"

/**************************************************************************/

#define XGRR    'e'
#define XGRR_S  "exclude"
#define XGRR_L  "exclude atoms outside group radius"

/**************************************************************************/

#define SHLV    's'
#define SHLV_S  "shell"
#define SHLV_L  "calculate group shell group shell"

/**************************************************************************/

#define SVOL    'v'
#define SVOL_S  "volume"
#define SVOL_L  "calculate crystal volumes"

/**************************************************************************/

#define SPRO    'a'
#define SPRO_S  "area"
#define SPRO_L  "calculate projected areas"

/**************************************************************************/
/* definition for second level of commands under MOLE                     */
/**************************************************************************/

#define NEXT    'n'
#define NEXT_S  "next"
#define NEXT_L  "go to next molecule in memory"

/**************************************************************************/

#define PREV    'p'
#define PREV_S  "previous"
#define PREV_L  "go to previous molecule in memory"

/**************************************************************************/

#define GOTO    'g'
#define GOTO_S  "goto"
#define GOTO_L  "go to particular molecule"

/**************************************************************************/

#define KILL    'k'
#define KILL_S  "kill"
#define KILL_L  "kill molecule atoms"

/**************************************************************************/

#define CLOS    'c'
#define CLOS_S  "close"
#define CLOS_L  "close current molecule"

/**************************************************************************/
/* definitions for second level of commands under CALC                    */
/**************************************************************************/

#define TOTA    't'
#define TOTA_S  "total"
#define TOTA_L  "calculate steric parameter value"

/**************************************************************************/

#define CONF    'c'
#define CONF_S  "conformer"
#define CONF_L  "calculate steric parameter conformer average"

/**************************************************************************/

#define PROF    'p'
#define PROF_S  "profile"
#define PROF_L  "calculate steric parameter profile"

/**************************************************************************/

#define AREA    'a'
#define AREA_S  "area"
#define AREA_L  "projected area"

/**************************************************************************/
/* definitions for second level of commands under PLOT                    */
/**************************************************************************/

#define ORTH    'o'
#define ORTH_S  "orthogonal"
#define ORTH_L  "plot molecule orthogonal view"

/**************************************************************************/

#define MOLP    'm'
#define MOLP_S  "molecule"
#define MOLP_L  "plot molecule perspective view"

/**************************************************************************/

#define CART    'c'
#define CART_S  "cartesian"
#define CART_L  "plot cartesian steric parameter profile"

/**************************************************************************/

#define POLA    'p'
#define POLA_S  "polar"
#define POLA_L  "plot polar steric parameter profile"

/**************************************************************************/

#define STER    's'
#define STER_S  "steric"
#define STER_L  "plot steric parameter values"

/**************************************************************************/

#define CONT    'n'
#define CONT_S  "contour"
#define CONT_L  "plot steric cone angle contour"

/**************************************************************************/

#define PRFC    'r'
#define PRFC_S  "profile"
#define PRFC_L  "plot steric 3D radial profile contour"

/**************************************************************************/
/* definition for second level of commands under CHAN & VIEW              */
/**************************************************************************/

#define SETT    's'
#define SETT_S  "settings"
#define SETT_L  "general calculation settings"

/**************************************************************************/

#define ORIG    'o'
#define ORIG_S  "origin"
#define ORIG_L  "current molecule origin"

/**************************************************************************/

#define PARA    'p'
#define PARA_S  "parameters"
#define PARA_L  "contents of parameter table"

/**************************************************************************/
/**************************************************************************/
/**************************************************************************/

/**************************************************************************/
/* definitions for third level of commands under SYMM/SVOL                */
/**************************************************************************/

#define FREV    'f'
#define FREV_S  "free"
#define FREV_L  "free unit cell volume"

/**************************************************************************/

#define GRPV    'g'
#define GRPV_S  "group"
#define GRPV_L  "group volume"

/**************************************************************************/

#define CAVV    'c'
#define CAVV_S  "cavity"
#define CAVV_L  "cavity volume"

/**************************************************************************/
/* definitions for third level of commands under MOLE/KILL(CLOS)          */
/**************************************************************************/

#define ATMS    'a'
#define ATMS_S  "atoms"
#define ATMS_L  "particular atoms"

/**************************************************************************/

#define TYPS    't'
#define TYPS_S  "types"
#define TYPS_L  "particular atom types"

/**************************************************************************/

#define GRPS    'g'
#define GRPS_S  "groups"
#define GRPS_L  "particular groups by type"

/**************************************************************************/

#define GRPN    'n'
#define GRPN_S  "number"
#define GRPN_L  "particular groups by name/number"

/**************************************************************************/

#define REST    'r'
#define REST_S  "retore"
#define REST_L  "restore killed atoms"

/**************************************************************************/

#define MOLC    'm'
#define MOLC_S  "molecule"
#define MOLC_L  "close entire molecule"

/**************************************************************************/
/* definitions for third level of commands under CALC/PLOT                */
/**************************************************************************/

#define ANGU    'a'
#define ANGU_S  "angular"
#define ANGU_L  "angular cone angle profile"

/**************************************************************************/

#define CONE    'c'
#define CONE_S  "cone"
#define CONE_L  "cone angle"

/**************************************************************************/

#define TOLM    't'
#define TOLM_S  "tolman"
#define TOLM_L  "tolman cone angle"

/**************************************************************************/

#define OLDL    'o'
#define OLDL_S  "old"
#define OLDL_L  "old leach analytical solid angle"

/**************************************************************************/

#define RYAN    'r'
#define RYAN_S  "ryan"
#define RYAN_L  "ryan/peter multiple overlap solid angle"

/**************************************************************************/

#define CRAI    'g'
#define CRAI_S  "craig"
#define CRAI_L  "craig multiple overlap solid angle"

/**************************************************************************/

#define NUME    'n'
#define NUME_S  "numerical"
#define NUME_L  "craig numerical solid angle"

/**************************************************************************/

#define VAOV    'v'
#define VAOV_S  "vertexO"
#define VAOV_L  "vertex angle of overlap"

/**************************************************************************/

#define SAOV    's'
#define SAOV_S  "solidO"
#define SAOV_L  "solid angle of overlap"

/**************************************************************************/

#define VOLM    'l'
#define VOLM_S  "volume"
#define VOLM_L  "molecular volume"

/**************************************************************************/

#define PROJ    'p'
#define PROJ_S  "project"
#define PROJ_L  "projected area"

/**************************************************************************/
/* definitions for third level of commands under CALC/AREA                */
/**************************************************************************/

#define THET    't'
#define THET_S  "theta"
#define THET_L  "area versus theta"

/**************************************************************************/

#define PHIP    'p'
#define PHIP_S  "phi"
#define PHIP_L  "area versus phi"

/**************************************************************************/

#define MAPP    'm'
#define MAPP_S  "map"
#define MAPP_L  "area versus theta and phi"

/**************************************************************************/
/* definitions for third level of commands under CHAN/MOLE                */
/**************************************************************************/

#define CMGP    'g'
#define CMGP_S  "group"
#define CMGP_L  "change molecule group"

/**************************************************************************/

#define PLAN    'p'
#define PLAN_S  "plane"
#define PLAN_L  "change molecule projection plane"

/**************************************************************************/
/* definitions for third level of commands under CHAN/ORIG                */
/**************************************************************************/

#define ATOM    'a'
#define ATOM_S  "atom"
#define ATOM_L  "change origin defining atom"

/**************************************************************************/

#define DIST    'd'
#define DIST_S  "distance"
#define DIST_L  "change origin distance from main atom"

/**************************************************************************/

#define GRPO    'g'
#define GRPO_S  "group"
#define GRPO_L  "change origin defining atom to group main atom"

/**************************************************************************/
/* definitions for third level of commands under VIEW/MOLE                */
/**************************************************************************/

#define ATMV    'a'
#define ATMV_S  "atoms"
#define ATMV_L  "view molecule atoms"

/**************************************************************************/

#define VGRP    'g'
#define VGRP_S  "groups"
#define VGRP_L  "view molecule groups"

/**************************************************************************/

#define SYMV    's'
#define SYMV_S  "symmetry"
#define SYMV_L  "view molecule symmetry"

/**************************************************************************/
/* definitions for third level of commands under CHAN/SETT                */
/**************************************************************************/

#define ORDM    'o'
#define ORDM_S  "order"
#define ORDM_L  "change multiple overlap order"

/**************************************************************************/

#define RANG    'r'
#define RANG_S  "range"
#define RANG_L  "change profile ranges"

/**************************************************************************/

#define PLTP    'l'
#define PLTP_S  "plot"
#define PLTP_L  "perpective plot ranges"

/**************************************************************************/

#define ROTA    't'
#define ROTA_S  "rotation"
#define ROTA_L  "contour plot rotation"

/**************************************************************************/

#define SIZE    's'
#define SIZE_S  "size"
#define SIZE_L  "change profile array sizes"

/**************************************************************************/

#define MODE    'm'
#define MODE_S  "mode"
#define MODE_L  "change profile ranging mode"

/**************************************************************************/

#define ACCU    'a'
#define ACCU_S  "accuracy"
#define ACCU_L  "change integration accuracy"

/**************************************************************************/

#define VOLG    'v'
#define VOLG_S  "volume"
#define VOLG_L  "numerical volume grid"

/**************************************************************************/

#define BNDD    'b'
#define BNDD_S  "bonding"
#define BNDD_L  "bond find settings"

/**************************************************************************/
/**************************************************************************/
/**************************************************************************/

struct commandstruct       /* structure for generalised commands          */
{
  unsigned short lev;      /* level (eg. menu level)                      */
  char a;                  /* single character command                    */
  char s[50];              /* short version of command, one word          */
  char l[C_LEN];           /* long version of command for help purposes   */
  int num;                 /* number of subsidiary commands               */
  struct commandstruct *sub;  /* first subsidiary command                 */
  struct commandstruct *next; /* next command in same level               */
  struct commandstruct *prev; /* previous command in same level           */
};
typedef struct commandstruct Comm;

/**************************************************************************/
/**************************************************************************/
/**************************************************************************/

int Merge_Arguements(char *line, char **args);
int Get_Arguements(char *line, char **args);
Comm *Test_Command(char *args, char *command, Comm *super);
int Find_Commands(char *args, char *line, char *command_line, Comm *comm);
Comm *Initialize_Commands(void);
void Close_All_Commands(Comm *comm);

/**************************************************************************/
/******************  The End ... ******************************************/
/**************************************************************************/
Modified: Fri Dec 8 17:00:00 1995 GMT
Page accessed 6017 times since Sat Apr 17 21:59:51 1999 GMT