Rev 6787 | Rev 6789 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6787 | Rev 6788 | ||
---|---|---|---|
Line 3046... | Line 3046... | ||
3046 | static void |
3046 | static void |
3047 | read_radicals (radstring_) |
3047 | read_radicals (radstring_) |
3048 | char *radstring_; |
3048 | char *radstring_; |
3049 | { |
3049 | { |
3050 | char radstring[256]; |
3050 | char radstring[256]; |
3051 | int a_id, a_rad |
3051 | int a_id, a_rad; |
3052 | 3052 | ||
3053 | /* typical example: a molecule with 2 cations + 1 anion */ |
3053 | /* typical example: a molecule with 2 cations + 1 anion */ |
3054 | /* M CHG 3 8 1 10 1 11 -1 */ |
3054 | /* M CHG 3 8 1 10 1 11 -1 */ |
3055 | strcpy (radstring, radstring_); |
3055 | strcpy (radstring, radstring_); |
3056 | if (strpos2 (radstring, "M RAD", 1) <= 0) |
3056 | if (strpos2 (radstring, "M RAD", 1) <= 0) |
3057 | return; |
3057 | return; |
3058 | strdelete (radstring, 1, 6); |
3058 | strdelete (radstring, 1, 6); |
3059 | left_trim (radstring); |
3059 | left_trim (radstring); |
3060 |
|
3060 | (void)left_int (radstring); |
3061 | /* this assignment must be kept also in non-debug mode! */ |
3061 | /* this assignment must be kept also in non-debug mode! */ |
3062 | /* p2c: checkmol.pas, line 2077: |
3062 | /* p2c: checkmol.pas, line 2077: |
3063 | * Note: Turbo Pascal conditional compilation directive was ignored [218] */ |
3063 | * Note: Turbo Pascal conditional compilation directive was ignored [218] */ |
3064 | /*$IFDEF debug */ |
3064 | /*$IFDEF debug */ |
3065 | /*if (n_chrg == 0) |
3065 | /*if (n_chrg == 0) |
Line 7384... | Line 7384... | ||
7384 | { |
7384 | { |
7385 | /* a_ref = C, a_view = N */ |
7385 | /* a_ref = C, a_view = N */ |
7386 | int i; |
7386 | int i; |
7387 | neighbor_rec nb; |
7387 | neighbor_rec nb; |
7388 | str2 nb_el; |
7388 | str2 nb_el; |
7389 | int a_het, a_c; |
7389 | int a_het = 0, a_c; |
7390 | int het_count = 0, c_count = 0, o_count = 0; /* v0.3k */ |
7390 | int het_count = 0, c_count = 0, o_count = 0; /* v0.3k */ |
7391 | int FORLIM; |
7391 | int FORLIM; |
7392 | 7392 | ||
7393 | /* v0.3k */ |
7393 | /* v0.3k */ |
7394 | if (atom[a_view - 1].neighbor_count == 1) |
7394 | if (atom[a_view - 1].neighbor_count == 1) |
Line 12145... | Line 12145... | ||
12145 | static int |
12145 | static int |
12146 | cv_iterate (n_cv_prev) |
12146 | cv_iterate (n_cv_prev) |
12147 | int n_cv_prev; |
12147 | int n_cv_prev; |
12148 | { |
12148 | { |
12149 | /* new in v0.3j, modified in v0.3m */ |
12149 | /* new in v0.3j, modified in v0.3m */ |
12150 | int |
12150 | int i, j; |
12151 | neighbor_rec nb; |
12151 | neighbor_rec nb; |
12152 | int nnb, nsum, n_cv, FORLIM; |
12152 | int nnb, nsum, n_cv, FORLIM; |
12153 | 12153 | ||
12154 | if (cv == NULL || ndl_n_atoms == 0) |
12154 | if (cv == NULL || ndl_n_atoms == 0) |
12155 | return |
12155 | return false; |
12156 | FORLIM = ndl_n_atoms; |
12156 | FORLIM = ndl_n_atoms; |
12157 | /* update the connection values (Morgan algorithm) */ |
12157 | /* update the connection values (Morgan algorithm) */ |
12158 | 12158 | ||
12159 | memset (nb, 0, sizeof (neighbor_rec)); |
12159 | memset (nb, 0, sizeof (neighbor_rec)); |
12160 | 12160 | ||
Line 13463... | Line 13463... | ||
13463 | /* added in v0.2c */ |
13463 | /* added in v0.2c */ |
13464 | int i; |
13464 | int i; |
13465 | boolean res = true; |
13465 | boolean res = true; |
13466 | /* str3 ndl_atype;*/ |
13466 | /* str3 ndl_atype;*/ |
13467 | str2 ndl_el; /* v0.3l */ |
13467 | str2 ndl_el; /* v0.3l */ |
13468 | int ndl_chg; |
13468 | int ndl_chg = 0; /* v0.3l */ |
13469 | int ndl_rad; |
13469 | int ndl_rad = 0; /* v0.3x */ |
13470 | int ndl_iso; |
13470 | int ndl_iso = 0; /* v0.3x */ |
13471 | 13471 | ||
13472 | 13472 | ||
13473 | if ((ez_search || rs_search) && ndl_n_heavyatoms > 3) |
13473 | if ((ez_search || rs_search) && ndl_n_heavyatoms > 3) |
13474 | /* v0.3f, v0.3m, v0.3o */ |
13474 | /* v0.3f, v0.3m, v0.3o */ |
13475 | return false; |
13475 | return false; |