~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/bin/optking/freq_grad.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
/* FREQ_GRAD_IRREP compute frequencies from gradients for irrep block IRREP */
35
35
 
36
 
void freq_grad_irrep(cartesians &carts, internals &simples, salc_set &all_salcs,
37
 
    int points) {
 
36
void freq_grad_irrep(cartesians &carts, internals &simples, salc_set &all_salcs) {
38
37
 
39
38
  int i,j,ii,jj,k,a,b, cnt, dim, dim_carts, ndisps,irrep;
40
39
  int nirr_salcs, nsalcs, *irrep_salcs;
69
68
fprintf(outfile,"Found %d salcs of this irrep\n",nirr_salcs);
70
69
 
71
70
  open_PSIF();
72
 
  psio_read_entry(PSIF_OPTKING, "OPT: Total num. of disp.",
 
71
  psio_read_entry(PSIF_OPTKING, "OPT: Num. of disp.",
73
72
      (char *) &(ndisps), sizeof(int));
74
73
 
75
74
  // needed?
151
150
  }
152
151
  free_block(all_f_q);
153
152
 
 
153
  /*
154
154
  for (i=0;i<2*nsalcs;++i) {
155
155
    fprintf(outfile,
156
156
        "Redundant values of internal coordinate forces, displacement %d\n",i);
158
158
      fprintf(outfile,"%15.10lf",full_all_f_q[i][j]);
159
159
    fprintf(outfile,"\n");
160
160
  }
 
161
  */
161
162
 
162
163
  // apply three point formula - to generate force constants in this irrep block
163
 
  fprintf(outfile,"Applying %d-point formula\n",points);
 
164
  fprintf(outfile,"Applying %d-point formula\n",optinfo.points_freq);
164
165
  force_constants = block_matrix(nsalcs,nsalcs);
165
166
  for (i=0;i<nirr_salcs;++i)
166
167
    for (j=0;j<nirr_salcs;++j) {
190
191
  free_block(G);
191
192
 
192
193
  //fprintf(outfile,"FG Matrix\n");
193
 
  //print_mat2(FG,salcs.get_num(),salcs.get_num(),outfile);
 
194
  //print_mat2(FG,nsalcs,nsalcs,outfile);
194
195
  //fflush(outfile);
195
196
 
196
197
  evals  = init_array(nsalcs);
205
206
    evals[i] = cm_convert * sqrt( evals[i] );
206
207
  }
207
208
 
208
 
  fprintf(outfile,"\nHarmonic Vibrational Frequencies in cm^(-1) for Irrep %s\n",
 
209
  fprintf(outfile,"\n  Harmonic Vibrational Frequencies in cm^(-1) for Irrep %s\n",
209
210
      syminfo.irrep_lbls[irrep]) ;
 
211
  fprintf(outfile,"  -----------------------------------------------------------\n");
210
212
  for (i=0; i<nirr_salcs; ++i) {
211
213
    tmp = -9999;
212
214
    for (j=0; j<nsalcs; ++j) {
234
236
* coordinates ignoring symmetry */
235
237
 
236
238
void freq_grad_nosymm(cartesians &carts, internals &simples,
237
 
    salc_set &all_salcs, int points) {
 
239
    salc_set &all_salcs) {
238
240
 
239
241
  int i,j,k,a,b, ii, cnt, dim, dim_carts, ndisps;
240
242
  int nsalcs;
248
250
  nsalcs = all_salcs.get_num();
249
251
 
250
252
  open_PSIF();
251
 
  psio_read_entry(PSIF_OPTKING, "OPT: Total num. of disp.",
 
253
  psio_read_entry(PSIF_OPTKING, "OPT: Num. of disp.",
252
254
      (char *) &(ndisps), sizeof(int));
253
255
  if (ndisps != 2*nsalcs) 
254
256
    punt("Error: number of displacements is incorrect.");
324
326
  */
325
327
 
326
328
  // apply three point formula
327
 
  fprintf(outfile,"Applying %d-point formula\n",points);
 
329
  fprintf(outfile,"Applying %d-point formula\n",optinfo.points_freq);
328
330
  force_constants = block_matrix(nsalcs,nsalcs);
329
331
  for (i=0;i<nsalcs;++i)
330
332
    for (j=0;j<nsalcs;++j)
367
369
  }
368
370
 
369
371
  fprintf(outfile,"\nHarmonic Vibrational Frequencies\n");
 
372
  fprintf(outfile,"  -----------------------------------------------------------\n");
370
373
  for (i=0; i<nsalcs; ++i) {
371
374
    tmp = -9999;
372
375
    for (j=0; j<nsalcs; ++j) {