ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/pcm7.c
(Generate patch)
# Line 3 | Line 3
3   #include "pcwin.h"
4   #include "pcmod.h"
5  
6 + #include "attached.h"
7   #include "energies.h"
8   #include "bonds_ff.h"
9   #include "derivs.h"
# Line 94 | Line 95
95   // ==================================================================
96   int setup_calculation()
97   {
98 <    int nRet;
98 >  int i,j,nRet;
99      char string[30];
100      double etot;
101      if (minim_control.field == MM3)
# Line 157 | Line 158
158  
159    // set active atoms
160    set_active();
161 <
161 >  // setup non_bonded list of atoms to skip
162 >  for (i=1; i <= natom; i++)
163 >    {
164 >         for (j=0; j < MAXIAT; j++)
165 >             if (atom[i].iat[j] != 0 && atom[i].bo[j] != 9)
166 >               {
167 >                    skip[i][atom[i].iat[j]] = i;
168 >                    skip[atom[i].iat[j]][i] = atom[i].iat[j];
169 >               }
170 >         for (j=0; j < attached.n13[i]; j++)
171 >           {
172 >               skip[i][attached.i13[j][i]] = i;
173 >               skip[attached.i13[j][i]][i] = attached.i13[j][i];
174 >           }
175 >         for(j=0; j < attached.n14[i]; j++)
176 >           {
177 >            skip[i][attached.i14[j][i]] = -i;
178 >            skip[attached.i14[j][i]][i] = -attached.i14[j][i];
179 >           }
180 >    }
181   /*  assign local geometry potential function parameters  */
182      Missing_constants = FALSE;
183      //     errfile = fopen_path(pcwindir,"pcmod.err","w");
# Line 222 | Line 242
242        energies.eurey = 0.0;
243        energies.esolv = 0.0;
244        energies.egeom =0.0;
225
226      virial.virx = 0.0;
227      virial.viry = 0.0;
228      virial.virz = 0.0;
245        
246        for (i=1; i <= natom; i++)
247             atom[i].energy = 0.0;
# Line 283 | Line 299
299   {
300      double etot;
301      int i;
286 //    struct timeb start,end;
302      
303        energies.total = 0.0;
304        energies.estr = 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines