00001 00009 #if !defined(HARLEMAPP_H) 00010 #define HARLEMAPP_H 00011 00012 #include "hastring.h" 00013 #include "command.h" 00014 00015 class HaMolView; 00016 class HaMolSet; 00017 class HaAtom; 00018 00020 class ComputerAccount 00021 { 00022 public: 00023 HaString acc_id; 00024 HaString login_str; 00025 HaString interm_acc_ID; 00026 }; 00027 00028 00030 class HarlemApp 00031 { 00032 public: 00033 HarlemApp(); 00034 virtual ~HarlemApp(); 00035 00036 #if defined(PYTHON_COMMAND) 00037 int Python_AppInit(); 00038 #endif 00039 00040 int ProcessOptions(); 00041 int InitFirst(); 00042 void InitializeCommand(); 00043 int ExecuteCommand(); 00044 int RasMolCmd(const char* cmd); 00045 int ExecRasMolScript(const char* file_name); 00046 int ExecuteScriptFromFile(const char* script_fname); 00047 int ExecuteScriptInString(const char* script_str); 00048 00049 static long RunExternalProgram(RunMode rmode, HaString prog_name, StrVec& prog_args, 00050 StrVec& prog_output, int get_prog_output = 0); 00051 static int CheckProcIsActive(long proc_id); 00052 static int KillProc(long proc_id); 00053 static int SwitchThread(); 00054 static int SleepThread(int ms_delay); 00055 00056 vector<ComputerAccount> comp_accounts; 00057 00058 ComputerAccount* GetAccountByID(const char* acc_id); 00059 int ShowAccountsLoad(); 00060 int ExecuteRemoteCmd(ComputerAccount* pacc, const char* cmd, StrVec& prog_output, int get_prog_output); 00061 00062 virtual void Exit() {} 00063 00064 void LoadInitFile(); 00065 00066 void StartWait(); 00067 void EndWait(); 00068 00069 HaMolSet* GetMolSetByName(const char* name); 00070 void AddMolSet(HaMolSet* pmset); 00071 void DeleteMolSet(HaMolSet* pmset); 00072 HaAtom* GetAtomByRef(const char* at_ref); 00073 00074 void calc_polar_gcontr(); 00075 void save_grp_oper_mat(); 00076 void calc_polar_contr_f(); 00077 void read_polar_contr(); 00078 void calc_beta_contr_2idx(); 00079 void read_beta_contr_2idx(); 00080 void calc_polar_contr_2idx(); 00081 void read_polar_contr_2idx(); 00082 void test_oper_1(); 00083 void test_oper_2(); 00084 void test_qcmod_1(); 00085 void dump_mol_info(); 00086 void dump_gauss_bcommon(); 00087 void dump_overlap(); 00088 void dump_overlap2(); 00089 void test_min_1(); 00090 void test_graph_1(); 00091 00092 int Interactive; 00093 00094 int prog_argc; 00095 HaString prog_args[100]; 00096 00097 HaString finp_name; 00098 HaString script_name; 00099 HaString script_str; 00100 00101 CmdParser cmd_pr; 00102 int only_rasmol_command; 00103 00104 int FileFormat; 00105 00106 static char* harlem_home_dir; 00107 static char* script_dir; 00108 static char* basis_dir; 00109 static char* word_editor; 00110 static char* manual_main_page; 00111 static char* html_browser; 00112 00113 protected: 00114 00115 list<HaMolSet*> molset_list; 00116 00117 }; 00118 00119 00121 00122 //{{AFX_INSERT_LOCATION}} 00123 // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 00124 00125 00126 #if defined(HARLEMAPP_CPP) 00127 HarlemApp* pApp; 00128 int script_status; 00129 #else 00130 extern HarlemApp* pApp; 00131 extern int script_status; 00132 #endif 00133 00134 #endif // !defined(HARLEM_APP_MFC_H)
1.3.6