ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/pcm7.c
(Generate patch)
# Line 13 | Line 13
13   #include "cutoffs.h"
14   #include "nonbond.h"
15   #include "torsions.h"
16 + #include "fix.h"
17  
18   EXTERN struct t_strbnd {
19          int nstrbnd, **isb;
# Line 44 | Line 45
45   void attach(void);
46   void get_bonds(void);
47   void get_angles(void);
48 < void get_torsions(void);
48 > void get_torsions(int natom,int *type,int **iat,int **bo);
49   void set_field(int);
50   double energy(void);
51   double get_total_energy(void);
# Line 52 | Line 53
53   double get_total_deriv_y(int i);
54   double get_total_deriv_z(int i);
55   double print_energy(void);
56 < void set_active(void);
56 > void set_active(int natom,int *use,int natom_fix,int *katm_fix);
57   int setup_calculation(void);
58   void end_calculation(void);
59  
# Line 77 | Line 78
78                float *ksb2,double *estrbnd,double **destb);
79   void egeom(int natom,int *use,double *x,double *y,double *z,double *egeom);
80   void egeom1(int natom,int *use,double *x,double *y,double *z,double *egeom,double **degeom);
81 < void esolv(int natom,double chrgcut,int **skip,int *mmx_type,int *use,double *charge,double *x,double *y,double *z,double *esolv);
82 < void esolv1(int natom,double chrgcut,int **skip,int *mmx_type,int *use,double *charge,double *x,double *y,double *z,double *esolv,double **desolv,double *drb);
81 > void esolv(int natom,double chrgcut,int **skip,int *use,double *charge,double *x,double *y,double *z,double *esolv);
82 > void esolv1(int natom,double chrgcut,int **skip,int *use,double *charge,double *x,double *y,double *z,double *esolv,double **desolv,double *drb);
83  
84   void hessian(int, double *,int *, int *, int *,double *);
85   void ebond2(int ia,int **,int **,int **,double *x,double *y,double *z,double *bl,double *bk,float **hessx,float **hessy,float **hessz);
# Line 92 | Line 93
93               float **hessx,float **hessy,float **hessz);
94   void estrbnd2(int iatom,int nstrbnd,int **,int **,int *use,double *x,double *y,double *z,float *anat,double *bl,double *bk,float *ksb1,
95                float *ksb2,float **hessx,float **hessy,float **hessz);
96 < void esolv2(int ia,int natom,double chrgcut,int *mmx_type,double *charge,double *x,double *y,double *z,float **hessx,float **hessy,float **hessz);
96 > void esolv2(int ia,int natom,double chrgcut,double *charge,double *x,double *y,double *z,float **hessx,float **hessy,float **hessz);
97   void egeom2(int ,int natom,int *use,double *x,double *y,double *z,float **hessx,float **hessy,float **hessz);
98  
99   void kangle(void);
# Line 161 | Line 162
162    // setup bonds, angles, torsions, improper torsions and angles, allenes
163    get_bonds();
164    get_angles();
165 <  get_torsions();
165 >  get_torsions(natom,atom.type,atom.iat,atom.bo);
166  
167    attach();
168    // need allene
169  
170    // set active atoms
171 <  set_active();
171 >  set_active(natom,atom.use,fx_atom.natom_fix,fx_atom.katom_fix);
172    // setup non_bonded list of atoms to skip
173    for (i=1; i <= natom; i++)
174      {
# Line 278 | Line 279
279        if (use_bufcharge()) ebufcharge1(natom,atom.use,skip,atom.x,atom.y,atom.z,atom.charge,cutoffs.chrgcut,&energies.eu,deriv.deqq);
280  
281        if (use_geom()) egeom1(natom,atom.use,atom.x,atom.y,atom.z,&energies.egeom,deriv.degeom);
282 <      if (use_solv()) esolv1(natom,cutoffs.chrgcut,skip,atom.mmx_type,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv,deriv.desolv,deriv.drb);
282 >      if (use_solv()) esolv1(natom,cutoffs.chrgcut,skip,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv,deriv.desolv,deriv.drb);
283      
284        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd + energies.e14+
285                          energies.evdw + energies.eu + energies.ehbond + energies.eangang + energies.estrtor +
# Line 360 | Line 361
361        if (use_bufcharge()) ebufcharge(natom,atom.use,skip,atom.x,atom.y,atom.z,atom.charge,cutoffs.chrgcut,&energies.eu);
362  
363        if (use_geom()) egeom(natom,atom.use,atom.x,atom.y,atom.z,&energies.egeom);
364 <      if (use_solv()) esolv(natom,cutoffs.chrgcut,skip,atom.mmx_type,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv);
364 >      if (use_solv()) esolv(natom,cutoffs.chrgcut,skip,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv);
365                                
366        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd
367               + energies.evdw + energies.e14 + energies.ehbond + energies.eu + energies.eangang +
# Line 406 | Line 407
407        if (use_bufcharge()) ebufcharge(natom,atom.use,skip,atom.x,atom.y,atom.z,atom.charge,cutoffs.chrgcut,&energies.eu);
408        
409        if (use_geom()) egeom(natom,atom.use,atom.x,atom.y,atom.z,&energies.egeom);
410 <      if (use_solv()) esolv(natom,cutoffs.chrgcut,skip,atom.mmx_type,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv);
410 >      if (use_solv()) esolv(natom,cutoffs.chrgcut,skip,atom.use,atom.charge,atom.x,atom.y,atom.z,&energies.esolv);
411  
412        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd
413               + energies.evdw + energies.e14 + energies.ehbond + energies.eu + energies.eangang +
# Line 474 | Line 475
475          if (use_bufcharge())ebufcharge2(i,natom,atom.use,skip,atom.x,atom.y,atom.z,atom.charge,cutoffs.chrgcut,hess.hessx,hess.hessy,hess.hessz);
476  
477          if (use_geom()) egeom2(i,natom,atom.use,atom.x,atom.y,atom.z,hess.hessx,hess.hessy,hess.hessz);
478 <        if (use_solv()) esolv2(i,natom,cutoffs.chrgcut,atom.mmx_type,atom.charge,atom.x,atom.y,atom.z,hess.hessx,hess.hessy,hess.hessz);
478 >        if (use_solv()) esolv2(i,natom,cutoffs.chrgcut,atom.charge,atom.x,atom.y,atom.z,hess.hessx,hess.hessy,hess.hessz);
479  
480          hdiag[(i-1)*3]   += hess.hessx[i][0];
481          hdiag[(i-1)*3+1] += hess.hessy[i][1];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines