ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/branches/sync4pymol12/src/mengine/src/xlogp.c
(Generate patch)
# Line 3 | Line 3
3   #include "pcwin.h"
4   #include "pcmod.h"
5  
6 < int get_hybrid(int);
7 < void message_alert(char *,char *);
8 < int check_ring1(int);
6 > static int get_hybrid(int);
7 > static int check_ring1(int);
8 > int is_ring31(int);
9 > int is_ring41(int);
10 > int is_ring51(int);
11 > int is_ring61(int);
12  
13   void xlogp(float *result)
14   {
# Line 443 | Line 446
446      
447      *result = total + nhydrophobic*0.19F + n13FX*0.08 + n13XX*(-0.26F);
448   }
449 + // ==================
450 + // ==================================
451 + int check_ring1(int ia)
452 + {
453 +    if (is_ring61(ia)) return TRUE;
454 +    if (is_ring51(ia)) return TRUE;
455 +    if (is_ring31(ia)) return TRUE;
456 +    if (is_ring41(ia)) return TRUE;
457 +    return FALSE;
458 + }
459 + /* =============================================== */
460 + // get hybridization of atom - tetrahedral = 1, planar = 2, linear = 3
461 + //
462 + int get_hybrid(int ia)
463 + {
464 +    int itype;
465 +
466 +    itype = atom[ia].mmx_type;
467 +    if (itype == 2 || itype == 3 || itype == 7 || itype == 9 || itype == 25 ||
468 +        itype == 26 || itype == 29 || itype == 30 || itype == 37 || itype == 38 ||
469 +        itype == 40 || itype == 57 )
470 +        return 2;
471 +    else if (itype == 4 || itype == 10)
472 +        return 3;
473 +    else
474 +        return 1;
475 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines