ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/branches/sync4pymol12/src/mengine/src/kcharge.c
(Generate patch)
# Line 6 | Line 6
6   #include "field.h"
7   #include "atom_k.h"
8   #include "utility.h"
9 #include "pdb.h"
9  
10   #define MAXOPLS  600
11  
# Line 15 | Line 14
14   int find_rsize(int,int);
15   void search_rings(int);
16   void message_alert(char *,char *);
18 void bbchk(void);
19 void pireset(void);
17   void get_rsize(int,int,int, int *);
18  
19   EXTERN struct ElementType {
# Line 26 | Line 23
23                          int s,p,d,f, type;
24                     } Elements[] ;
25  
29
30 EXTERN struct t_bondpk {
31        int     npibond,npibond44i,npibond45i,npibond46i,npibond55i,npibond56i,npibond66i;
32        int     npibond44o,npibond45o,npibond46o,npibond55o,npibond56o,npibond66o;
33        int     npibond40,npibond50,npibond60;
34        int     use_pibond,use_pibond44i,use_pibond45i,use_pibond46i,use_pibond55i,use_pibond56i,use_pibond66i;
35        int     use_pibond44o,use_pibond45o,use_pibond46o,use_pibond55o,use_pibond56o,use_pibond66o;
36        int     use_pibond40,use_pibond50,use_pibond60;
37        char    kb[MAXPIBONDCONST][7],kb44i[20][7],kb45i[20][7],kb46i[20][7],kb55i[20][7],kb56i[20][7],kb66i[20][7];
38        char    kb44o[20][7],kb45o[20][7],kb46o[20][7],kb55o[20][7],kb56o[20][7],kb66o[20][7];
39        char    kb40[20][7],kb50[20][7],kb60[20][7];
40        float   bk[MAXPIBONDCONST], bl[MAXPIBONDCONST], bmom[MAXPIBONDCONST],sslop[MAXPIBONDCONST], tslop[MAXPIBONDCONST], tslop2[MAXPIBONDCONST];
41        float   bk44i[20], bl44i[20], bmom44i[20],sslop44i[20], tslop44i[20], tslop244i[20];
42        float   bk45i[20], bl45i[20], bmom45i[20],sslop45i[20], tslop45i[20], tslop245i[20];
43        float   bk46i[20], bl46i[20], bmom46i[20],sslop46i[20], tslop46i[20], tslop246i[20];
44        float   bk55i[20], bl55i[20], bmom55i[20],sslop55i[20], tslop55i[20], tslop255i[20];
45        float   bk56i[20], bl56i[20], bmom56i[20],sslop56i[20], tslop56i[20], tslop256i[20];
46        float   bk66i[20], bl66i[20], bmom66i[20],sslop66i[20], tslop66i[20], tslop266i[20];
47        float   bk44o[20], bl44o[20], bmom44o[20],sslop44o[20], tslop44o[20], tslop244o[20];
48        float   bk45o[20], bl45o[20], bmom45o[20],sslop45o[20], tslop45o[20], tslop245o[20];
49        float   bk46o[20], bl46o[20], bmom46o[20],sslop46o[20], tslop46o[20], tslop246o[20];
50        float   bk55o[20], bl55o[20], bmom55o[20],sslop55o[20], tslop55o[20], tslop255o[20];
51        float   bk56o[20], bl56o[20], bmom56o[20],sslop56o[20], tslop56o[20], tslop256o[20];
52        float   bk66o[20], bl66o[20], bmom66o[20],sslop66o[20], tslop66o[20], tslop266o[20];
53        float   bk40[20], bl40[20], bmom40[20],sslop40[20], tslop40[20], tslop240[20];
54        float   bk50[20], bl50[20], bmom50[20],sslop50[20], tslop50[20], tslop250[20];
55        float   bk60[20], bl60[20], bmom60[20],sslop60[20], tslop60[20], tslop260[20];
56        } bondpk;
26          
27   EXTERN struct t_charge_k {
28           int ncharge, nbndchrg, nbndchrgdel;
# Line 196 | Line 165
165                strcpy(pt,pb);
166                strcat(pt,pa);
167            }
168 <          if( (atom[ia].flags & mask) && (atom[ib].flags & mask) )
200 <          {  // search through pi constants
201 <             bmomj = 0.0;
202 <             for (j=0; j < bondpk.npibond; j++)
203 <             {
204 <                 if (strcmp(pt, bondpk.kb[j]) == 0)
205 <                 {
206 <                    bmomj = bondpk.bmom[j];
207 <                    break;
208 <                 }
209 <              }
210 <          } else
211 <          {
168 >
169                bmomj = 0.0;
170                for (j=0; j < dipole_k.ndipole; j++)
171                {
# Line 218 | Line 175
175                        break;
176                    }
177                }
178 <          }
178 >          
179            if (bmomj != 0.0)
180            {
181                bmomj = 0.42*bmomj/bonds_ff.bl[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines