Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

nuclacidmod.h

Go to the documentation of this file.
00001 
00009 #if !defined(NUCLACIDMOD_H) 
00010 #define NUCLACIDMOD_H
00011 
00012 #include "hastl.h"
00013 #include "haconst.h"
00014 #include "halinalg.h"
00015 #include "hastring.h"
00016 #include "hacompmod.h"
00017 #include "vec3d.h"
00018 
00019 const int FLEX_FF    = 0;
00020 const int AMBER91_FF = 1;
00021 const int AMBER94_FF = 2;
00022 
00023 
00024 class HaMolecule;
00025 
00027 class NuclAcidMod : public HaCompMod
00028 {
00029 public:
00030          NuclAcidMod(HaMolSet* new_pmset=NULL);
00031         ~NuclAcidMod();
00032 
00033         int SetStdParams();     
00034 
00035         int BuildNuclAcid();       
00036         int UpdateXYZ();           
00037         int MinEne();              
00038         int CalcEne();             
00039         int CreateMolFromJumna();  
00040 
00041         HaMolecule* FindDNAMol();  
00042 
00043         int SaveAXEfile(const char* axe_file); 
00044         int ReadAXEfile(const char* axe_file); 
00045 
00046         HaString out_prefix; 
00047     HaString pdb_prefix; 
00048 
00049         HaVec_int nsym_unit; 
00050 
00051         int nbreak_1;  
00052         int nbreak_2;  
00053 
00054     HaVec_int homon_symm_flags; 
00055         HaVec_int homon_symm_offs;  
00056         int ene_per_unit_flag;      
00057 
00058         HaVec_int dir_strand;       
00059 
00060         HaString seq[4];                 
00061         int SetSeq(const char* seq_str); 
00062     int GenComplStrand();            
00063 
00064     int max_iter;                    
00065 
00066         int init_flag;      
00067 
00068         double sup_helix_rad;        
00069         double sup_helix_pit;        
00070         double fst_twist;            
00071 
00072         int SetFFtype(const char* new_ff_type); 
00073         int SetFFtypeIdx(const int i_ff_type);  
00074     int force_field;             
00075 
00076         int SetDielSlope( double slope_new);    
00077         double diel_slope;                      
00078         int SetPhosChrg( double phos_chrg_new); 
00079         double phos_chrg;                       
00080 
00081         HaVec_double hel_crd;       
00082         HaVec_int    lock_hel;      
00083 
00084         HaVec_double bb_crd;        
00085     HaVec_int    lock_bb;       
00086     HaVec_int    bb_sidx;       
00087 
00088         Vec3D_arr     u,h,o;        
00089         Vec3D_arr     uho,hho,ul;   
00090     HaVec_double  dif;          
00091         
00092         HaMat_double hel;
00093         HaMat_double hold;
00094         HaMat_double vold;
00095         HaMat_double bend;
00096         HaMat_double vkin;
00097 
00098         HaMat_double tor;
00099         HaMat_double sug;
00100         HaMat_double bs_bs_pars;
00101 
00102         HaVec_int  ncrd_res;        
00103         HaVec_int  ncrd_ind_res;    
00104         
00105         int SetHelCoord(int i_strand, int i_res, int i_crd, double crd_val); 
00106         int LockHelCoord(int i_strand, int i_res, int i_crd, int do_lock);   
00107     int IsHelCoordLocked(int ir, int i_crd);   
00108 
00109         int SetBBCoord(int i_strand, int i_res, int i_crd, double crd_val);  
00110         int LockBBCoord(int i_strand, int i_res, int i_crd, int do_lock);    
00111 
00112         int update_var_flag;        
00113 
00114     int UpdateVarCoord();            
00115         int SetCoordsFromJumna();  
00116         int SetIntCoordsToJumna(); 
00117         int SaveConfig();          
00118         int RestoreConfig();       
00119 
00120         int BBOffset(int ir);        
00121         int IsRibRes(int ir);        
00122     int IsThymineRes(int ir);    
00123         int NumIndBBVarRes(int ir);  
00124     int NumAllBBVarRes(int ir);  
00125     int Is3endRes(int ir);       
00126     int IsFstResInChain(int ir); 
00127         int IdxResInChain(int ir);   
00128         int ChainIdxOfRes(int ir);   
00129         int IsSupHlxConstr();        
00130         int NumBBCoord();            
00131         int NumFreeBBCoord();        
00132         int IdxLastHelCoord();       
00133         int IdxLastFreeHelCoord();   
00134         int SetShlxTwist(double shlx_tw);             
00135         double GetAtomCrd(int at_num, int coord_num); 
00136         double GetVarNum(int crd_num);                
00137 
00138 // Analysis function:
00139 
00140         int CalcPdistToShlxCnt();              
00141         int CalcLocCrdSys();                   
00142         int CalcLocHlxCrd(int for_bp = TRUE);  
00143     int CalcAxis();                        
00144         int CalcBend();                        
00145         int CalcGlobHlxCrd();                  
00146         int CalcBBCrd();                       
00147 
00148 
00149         int CalcAxisPar1(HaMat_double& ax_hlxc, double& sum, HaVec_double& gra, HaVec_double& scp); 
00150         
00151         int GetNRes() const;     
00152         
00153         double cur_energy;       
00154 
00155         HaMolecule* p_dna_mol;   
00156 
00157 };
00158 
00159 #if defined(INT_JUMNA)
00160 
00161 extern "C"{
00162     extern void jumcall_(); 
00163     extern void closejm_(int_4* ipl,int_4* iabas);
00164     extern void ecomp_(); 
00165     extern void ecomp91_();
00166         extern void ecomp94_();
00167     extern void minim_();
00168         extern void disth_();
00169     extern void microb_();  
00170 
00171     extern void penalty_(); 
00172         extern void helix_();   
00173         extern void backbo_();  
00174     extern void setvar_();  
00175     extern void equim_(int_4* newq,int_4* nspc,int_4* nhlc,int_4* nbcc,
00176                                    int_4* nklc,int_4* nlgc,int_4* istop); 
00177     extern void equivjm_(int_4* nspc,int_4* nbcc,int_4* nhlc,int_4* nklc, int_4* nlgc); 
00178     extern void putbac_(int_4* key); 
00179         extern void reset_(char* axe_file, int len); 
00180         extern void axeout_(char* axe_file, int len); 
00181     extern void setbac_();                       
00182 
00183      const int N0_J = 5;     
00184      const int N1_J = 2000;  
00185      const int N2_J = 74;    
00186      const int N3_J = 300;   
00187      const int N4_J = 230;   
00188      const int N5_J = 20;    
00189          const int N6_J = 12000;  
00190          const int N6A_J = 12000; 
00191          const int N7_J = 1100;  
00192          const int N8_J = 200;   
00193      const int N9_J = 20;    
00194            
00195 //      typedef struct{
00196 //         char finp[80];
00197 //        } jfinp_type;
00198 
00199 //        extern jfinp_type jfinp_;
00200  
00201          typedef struct{
00202                   int iret; 
00203          } hacon_type;
00204 
00205          extern hacon_type hacon_;
00206 
00207           typedef struct{
00208                  char libn[80];
00209           } jmdirs_type;
00210 
00211       extern jmdirs_type jmdirs_;
00212 
00213 
00214           typedef struct{
00215                  char mac[32],lmo[32],lib[32],libm[32],out[32];
00216                  char axe[32],axl[32],noe[32],nol[32], test[32];
00217                  char pdb[32],ins[32],bar[32],parm[32];
00218 //         char vc[32*N_CHA];
00219           } cha_type;
00220  
00221           extern cha_type cha_;
00222  
00223           typedef struct{
00224                 double acc,phos,epsi,epsr,plat,slope,rhbl,vfac,tfac,rfac,xfac,
00225                scale,rpiv,tpiv,fad,fan,damp,fnoew,fnoes,fnoea,df1,scnb,scee,
00226                catd,catr,catc,rad,pit,enit;
00227             int_4  nshel,maxn,opt,mhomo,mhomo2,mhomo3,
00228                nick,limit,
00229                            nop,  
00230                            nrib, 
00231                            ncat, 
00232                            lig,
00233                            naxo;
00234             int_2  sup,rcom,homo,homo2,homo3,diep,sum,link,ecen,
00235                        cyl,lcat,cent,autos,amber;
00236 //              int_2  amber;
00237           } datjm_type;
00238 
00239           extern datjm_type datjm_;
00240       
00241           typedef struct{
00242                   double xsum,ysum;
00243                   int_4  itwl[N2_J],
00244                              nvs[N7_J],
00245                                  ihm[N2_J],
00246                                  ksym[3],
00247                                  nbrk[2],
00248                              isym;
00249                   int_4 isur; 
00250                   int_4 isup; 
00251                   int_2 ihl[N2_J];  
00252           } symjm_type;
00253 
00254           extern symjm_type symjm_;
00255 
00256       typedef struct{
00257           double corm[N1_J*3]; 
00258                   double dmon[N1_J];   
00259                   char mnam[N1_J*4];   
00260                   char munit[N1_J*4];  
00261           int_4 imch[N1_J];    
00262                   int_4 imty[N1_J];    
00263                   int_4 icm[N1_J];
00264                   int_4 matm[3*N1_J];  
00265                   int_4 matd[N1_J*7];  
00266                   int_4 nunit[N1_J];   
00267           int_4 nuc[N2_J+1];   
00268                   int_4 ncen[N0_J*N2_J+1];
00269                   int_4 kam;           
00270                   int_4 khm,lkm,kcen;  
00271           } mrc_type; 
00272 
00273           extern mrc_type mrc_;
00274 
00275       typedef struct{
00276           char seq[120]; 
00277                   double hel[N2_J*6]; 
00278                   double vkink[N2_J*4];  
00279                   double set[N2_J*N8_J]; 
00280 
00281 
00282 
00283 
00284 
00285               char code[N2_J*8]; 
00286                   char kode[N2_J*8];
00287               int_4 irec[N2_J];  
00288                   int_4 itr[N2_J];   
00289                   int_4 ito[N2_J];   
00290                   int_4 nst;         
00291                   int_4 nto;         
00292                   int_4 kseq;        
00293                   int_4 ieq[50*4];   
00294                   int_4 ilq[N2_J*2]; 
00295                   int_4 idr[4];      
00296           int_2 kink[N2_J];  
00297                   int_2 lthy[N2_J];  
00298           } strjm_type;
00299 
00300           extern strjm_type strjm_;
00301 
00302 //        typedef struct{
00303 //        common/strjm/seq,hel(n2,6),vkink(n2,4),set(n2,n8),code(n2),kode(n2),
00304 //   1 irec(n2),itr(n2),ito(n2),nst,nto,kseq,ieq(50,4),ilq(n2,2),idr(4),
00305 //     1 kink(n2),lthy(n2)
00306 //        } strjm_type;
00307 //        extern strjm_type strjm_;
00308 
00309           typedef struct{
00310                 double thy[N2_J];
00311                 double rsr[N0_J*N2_J]; 
00312                 int_4 iofs[N2_J];  
00313                 int_4 iofe[N2_J];  
00314                 int_4 ithy[6];
00315                 int_4 nith;
00316         int_4 neq[N7_J];   
00317 
00318 
00319 
00320                 int_4 isr[N0_J*2*N2_J]; 
00321                 int_4 nsr[N2_J];        
00322                 int_2 ribose[N2_J];     
00323                 int_2 cation[N2_J];     
00324           } extjm_type;             
00325 
00326           extern extjm_type extjm_;
00327 
00328           typedef struct{
00329                    double rlig[N9_J*6]; 
00330                    double slig[N9_J*2];
00331                    int_4 ilig[N9_J*6],lopt[N9_J],lpiv[N9_J];
00332            int_4 ntlg; 
00333                    int_4 nlgi; 
00334                    int_4 nlig; 
00335                    int_4 ntl;  
00336                    char  lnam[N9_J*4];
00337                    int_2 locr[N2_J*N0_J];  
00338          } lgd_type; 
00339 
00340          extern lgd_type lgd_;
00341 
00342      typedef struct{
00343                 int_2 hst[N2_J*6];    
00344                 int_2 bst[N2_J*N8_J]; 
00345                 int_2 vst[N2_J*4],
00346                 lgi[N1_J],            
00347                 lgj[N1_J],            
00348                 lgu[N2_J];
00349          } slg_type;
00350 
00351          extern slg_type slg_;
00352 
00353      typedef struct{
00354              int_4 iend[5]; 
00355                  int_4 ise[N2_J]; 
00356                  int_4 ienb[N2_J*2];
00357                  int_4 kapt[N2_J+1]; 
00358                  int_4 nsph; 
00359                  } ind_type;
00360 
00361          extern ind_type ind_;
00362 
00363          typedef struct{
00364             double sor[N4_J*N5_J*3]; 
00365 
00366                 double smon[N4_J*N5_J];  
00367             char snam[N4_J*N5_J*4];  
00368             char suni[N4_J*N5_J*4];  
00369             int_4 nuni[N4_J*N5_J];   
00370             char sub[N5_J*4];        
00371             int_4 isch[N4_J*N5_J];   
00372                 int_4 isty[N4_J*N5_J];   
00373                 int_4 ics[N4_J*N5_J];    
00374         int_4 mats[3*N4_J*N5_J]; 
00375 
00376 
00377 
00378 
00379                                          
00380                 int_4 kas[N5_J]; 
00381                 int_4 khs[N5_J]; 
00382                 int_4 ksub;      
00383          } moljm_type;
00384 
00385          extern moljm_type moljm_;
00386 
00387          typedef struct{
00388             double sap[N6_J]; 
00389 
00390                 double refg,refb,refh,refv;
00391                 int_4 iap[N8_J*N4_J*N5_J];  
00392 
00393                 int_4 nap[N8_J*7   *N5_J];  
00394 
00395 
00396 
00397 
00398 
00399                 int_4 kap[3*N5_J]; 
00400 
00401 
00402 
00403          } flx_type;
00404 
00405          extern flx_type flx_;
00406 
00407          typedef struct{
00408             double force[N1_J*3]; 
00409                 double tor[N1_J*3];   
00410                 double fot[N6_J];
00411                 double ener; 
00412                 double elec; 
00413         double repl; 
00414                 double disp; 
00415                 double eang; 
00416                 double etog; 
00417                 double epen; 
00418             int_2  i23[8*N1_J]; 
00419                 int_2  i34[8*N1_J];
00420                 int_2  elim[N1_J];  
00421          } enf_type;
00422 
00423          extern enf_type enf_;
00424 
00425          typedef struct{ 
00426             double var[N7_J]; 
00427 
00428 
00429 
00430 
00431 
00432                 double gra[N7_J];  
00433                 double con[N0_J*N2_J + N3_J];
00434                 double scl[N7_J];   
00435                 int_4 ncon;
00436                 int_4 nvrc;
00437                 int_4 ntba; 
00438                 int_4 nbac; 
00439                 int_4 nthe; 
00440                 int_4 nhel; 
00441                 int_4 ntki; 
00442                 int_4 nkin; 
00443                 int_4 ntri;
00444                 int_4 ntot;
00445                 int_4 nvar; 
00446                 int_4 nrin;
00447             int_2 lar[N7_J];  
00448             int_2 lock[N6A_J]; 
00449          } mnn_type;
00450 
00451          extern mnn_type mnn_;
00452 };
00453 
00454          typedef struct{ 
00455         double rnoe[N3_J]; 
00456                 double bnoe[N3_J]; 
00457                 double fnoe[N3_J];
00458                 double snoe;
00459                 char   knam[200*4*2];
00460                 int_4 ktyp[200];
00461                 int_4 icon[N2_J*2];
00462         int_4 inoe[N3_J*9]; 
00463 
00464 
00465 
00466                 int_4 ih68[N2_J];   
00467                 int_4 jnoe[N3_J];   
00468 
00469 
00470 
00471 
00472 
00473                 int_4 nnoe;         
00474                 int_4 ndcs;
00475                 int_4 ndiv[100];
00476                 int_4 nlin;
00477          }nmrjm_type;
00478 
00479          extern nmrjm_type nmrjm_;
00480 
00481 //     Amber force field parameters:
00482 //     common/para/
00483 //     ro(57) - VdW radii for computing vdw foreced
00484 //     reps(57) - energy minimum for identical atom VdW interactions
00485 //     angc(191),fangc(191),btor(88),
00486 //     $ gtor(88),ftor(88),bdtor(30),gdtor(30),fdtor(30),
00487 //     amb(57,57), - A and B coef in (A/r12 + B/r6) : amb(i,j) = sqrt(reps(i)*reps(j))*(ro(i)+(ro(j))**12
00488 //     bmb(57,57)                                     bmb(i,j) = 2*sqrt(reps(i)*reps(j))*(ro(i)+(ro(j))**6
00489 //     amh(9,11),bmh(9,11),mtor(88),itor(88,4),iadt(30,4),
00490 //     $ iangc(191,3),mof,nof,nang,ntor,ntors,nad,
00491 //     atclas(57) - character*2 - of atom class
00492 //
00493 
00494 
00495 #endif
00496 
00497 #endif // end !defined(NUCLACIDMOD_H) 

Generated on Tue Feb 17 02:03:07 2004 for harlem by doxygen 1.3.6