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

« back to all changes in this revision

Viewing changes to src/bin/cchbar/purge.c

  • 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:
177
177
  }
178
178
  dpd_file4_close(&W);
179
179
 
180
 
 
181
 
 
182
 
 
183
180
  /* Purge Wmbej matrix elements */
184
181
  dpd_file4_init(&W, CC_HBAR, 0, 10, 10,"WMBEJ");
185
182
  for(h=0; h < nirreps; h++) {
203
200
  }
204
201
  dpd_file4_close(&W);
205
202
 
206
 
 
207
203
  dpd_file4_init(&W, CC_HBAR, 0, 10, 10,"Wmbej");
208
204
  for(h=0; h < nirreps; h++) {
209
205
    dpd_file4_mat_irrep_init(&W, h);
226
222
  }
227
223
  dpd_file4_close(&W);
228
224
 
229
 
 
230
225
  dpd_file4_init(&W, CC_HBAR, 0, 10, 10,"WMbEj");
231
226
  for(h=0; h < nirreps; h++) {
232
227
    dpd_file4_mat_irrep_init(&W, h);
249
244
  }
250
245
  dpd_file4_close(&W);
251
246
 
252
 
 
253
247
  dpd_file4_init(&W, CC_HBAR, 0, 10, 10,"WmBeJ");
254
248
  for(h=0; h < nirreps; h++) {
255
249
    dpd_file4_mat_irrep_init(&W, h);
272
266
  }
273
267
  dpd_file4_close(&W);
274
268
 
275
 
 
276
269
  dpd_file4_init(&W, CC_HBAR, 0, 10, 10,"WmBEj");
277
270
  for(h=0; h < nirreps; h++) {
278
271
    dpd_file4_mat_irrep_init(&W, h);
305
298
 
306
299
  /* WMbeJ is already OK */
307
300
 
308
 
 
309
 
 
310
301
  /* Purge Wamef matrix elements */
311
 
  dpd_file4_init(&W, CC_HBAR, 0, 10, 7,"WAMEF");
 
302
  dpd_file4_init(&W, CC_HBAR, 0, 11, 7,"WAMEF");
312
303
  for(h=0; h < nirreps; h++) {
313
304
    dpd_file4_mat_irrep_init(&W, h);
314
305
    dpd_file4_mat_irrep_rd(&W, h);
315
306
    for(ma=0; ma < W.params->rowtot[h]; ma++) {
316
 
      a = W.params->roworb[h][ma][1];
317
 
      asym = W.params->qsym[a];
 
307
      a = W.params->roworb[h][ma][0];
 
308
      asym = W.params->psym[a];
318
309
      A = a - vir_off[asym];
319
310
      for(ef=0; ef< W.params->coltot[h]; ef++) {
320
311
        e = W.params->colorb[h][ef][0];
334
325
  }
335
326
  dpd_file4_close(&W);
336
327
 
337
 
  dpd_file4_init(&W, CC_HBAR, 0, 10, 7,"Wamef");
 
328
  dpd_file4_init(&W, CC_HBAR, 0, 11, 7,"Wamef");
338
329
  for(h=0; h < nirreps; h++) {
339
330
    dpd_file4_mat_irrep_init(&W, h);
340
331
    dpd_file4_mat_irrep_rd(&W, h);
341
332
    for(ma=0; ma < W.params->rowtot[h]; ma++) {
342
 
      m = W.params->roworb[h][ma][0];
343
 
      msym = W.params->psym[m];
 
333
      m = W.params->roworb[h][ma][1];
 
334
      msym = W.params->qsym[m];
344
335
      M = m - occ_off[msym];
345
336
      for(ef=0; ef< W.params->coltot[h]; ef++) {
346
337
        if (M >=  (occpi[msym] - openpi[msym]))
352
343
  }
353
344
  dpd_file4_close(&W);
354
345
 
355
 
  dpd_file4_init(&W, CC_HBAR, 0, 10, 5,"WAmEf");
 
346
  dpd_file4_init(&W, CC_HBAR, 0, 11, 5,"WAmEf");
356
347
  for(h=0; h < nirreps; h++) {
357
348
    dpd_file4_mat_irrep_init(&W, h);
358
349
    dpd_file4_mat_irrep_rd(&W, h);
359
350
    for(ma=0; ma < W.params->rowtot[h]; ma++) {
360
 
      m = W.params->roworb[h][ma][0];
361
 
      a = W.params->roworb[h][ma][1];
362
 
      msym = W.params->psym[m];
363
 
      asym = W.params->qsym[a];
 
351
      a = W.params->roworb[h][ma][0];
 
352
      m = W.params->roworb[h][ma][1];
 
353
      asym = W.params->psym[a];
 
354
      msym = W.params->qsym[m];
364
355
      M = m - occ_off[msym];
365
356
      A = a - vir_off[asym];
366
357
      for(ef=0; ef< W.params->coltot[h]; ef++) {
378
369
  }
379
370
  dpd_file4_close(&W);
380
371
 
381
 
  dpd_file4_init(&W, CC_HBAR, 0, 10, 5,"WaMeF");
 
372
  dpd_file4_init(&W, CC_HBAR, 0, 11, 5,"WaMeF");
382
373
  for(h=0; h < nirreps; h++) {
383
374
    dpd_file4_mat_irrep_init(&W, h);
384
375
    dpd_file4_mat_irrep_rd(&W, h);
397
388
  dpd_file4_close(&W);
398
389
 
399
390
 
400
 
 
401
 
 
402
 
 
403
391
  /* Purge Wmnie matrix elements */
 
392
  /* moving to separate function
404
393
  dpd_file4_init(&W, CC_HBAR, 0, 2, 11,"WMNIE");
405
394
  for(h=0; h < W.params->nirreps; h++) {
406
395
    dpd_file4_mat_irrep_init(&W, h);
487
476
    dpd_file4_mat_irrep_close(&W, h);
488
477
  }
489
478
  dpd_file4_close(&W);
490
 
 
 
479
  */
491
480
 
492
481
 
493
482
  /* Purge WMBIJ matrix elements */
675
664
 
676
665
  return;
677
666
}
 
667
 
 
668
/* Purge Wmnie matrix elements */
 
669
void purge_Wmnie(void) {
 
670
  dpdfile4 W;
 
671
  int *occpi, *virtpi;
 
672
  int h, a, b, e, f, i, j, m, n;
 
673
  int    A, B, E, F, I, J, M, N;
 
674
  int mn, ei, ma, ef, me, jb, mb, ij, ab;
 
675
  int asym, bsym, esym, fsym, isym, jsym, msym, nsym;
 
676
  int *occ_off, *vir_off;
 
677
  int *occ_sym, *vir_sym;
 
678
  int *openpi, nirreps;
 
679
 
 
680
  nirreps = moinfo.nirreps;
 
681
  occpi = moinfo.occpi; virtpi = moinfo.virtpi;
 
682
  occ_off = moinfo.occ_off; vir_off = moinfo.vir_off;
 
683
  occ_sym = moinfo.occ_sym; vir_sym = moinfo.vir_sym;
 
684
  openpi = moinfo.openpi;
 
685
 
 
686
  dpd_file4_init(&W, CC_HBAR, 0, 0, 11,"WMnIe (Mn,eI)");
 
687
  for(h=0; h < nirreps; h++) {
 
688
    dpd_file4_mat_irrep_init(&W, h);
 
689
    dpd_file4_mat_irrep_rd(&W, h);
 
690
    for(mn=0; mn<W.params->rowtot[h]; mn++) {
 
691
      n = W.params->roworb[h][mn][1];
 
692
      nsym = W.params->qsym[n];
 
693
      N = n - occ_off[nsym];
 
694
      for(ei=0; ei<W.params->coltot[h]; ei++) {
 
695
        if (N >= (occpi[nsym] - openpi[nsym]))
 
696
          W.matrix[h][mn][ei] = 0.0;
 
697
      }
 
698
    }
 
699
    dpd_file4_mat_irrep_wrt(&W, h);
 
700
    dpd_file4_mat_irrep_close(&W, h);
 
701
  }
 
702
 
 
703
  dpd_file4_init(&W, CC_HBAR, 0, 2, 11, "WMNIE (M>N,EI)");
 
704
  for(h=0; h < W.params->nirreps; h++) {
 
705
    dpd_file4_mat_irrep_init(&W, h);
 
706
    dpd_file4_mat_irrep_rd(&W, h);
 
707
    for(mn=0; mn<W.params->rowtot[h]; mn++) {
 
708
      for(ei=0; ei<W.params->coltot[h]; ei++) {
 
709
        e = W.params->colorb[h][ei][0];
 
710
        esym = W.params->rsym[e];
 
711
        E = e - vir_off[esym];
 
712
        if (E >= (virtpi[esym] - openpi[esym]))
 
713
          W.matrix[h][mn][ei] = 0.0;
 
714
      }
 
715
    }
 
716
    dpd_file4_mat_irrep_wrt(&W, h);
 
717
    dpd_file4_mat_irrep_close(&W, h);
 
718
  }
 
719
  dpd_file4_close(&W);
 
720
 
 
721
  dpd_file4_init(&W, CC_HBAR, 0, 2, 11,"Wmnie (m>n,ei)");
 
722
  for(h=0; h < nirreps; h++) {
 
723
    dpd_file4_mat_irrep_init(&W, h);
 
724
    dpd_file4_mat_irrep_rd(&W, h);
 
725
    for(mn=0; mn<W.params->rowtot[h]; mn++) {
 
726
      m = W.params->roworb[h][mn][0];
 
727
      n = W.params->roworb[h][mn][1];
 
728
      msym = W.params->psym[m];
 
729
      nsym = W.params->qsym[n];
 
730
      M = m - occ_off[msym];
 
731
      N = n - occ_off[nsym];
 
732
      for(ei=0; ei<W.params->coltot[h]; ei++) {
 
733
        i = W.params->colorb[h][ei][1];
 
734
        isym = W.params->ssym[i];
 
735
        I = i - occ_off[isym];
 
736
        if ((M >= (occpi[msym] - openpi[msym])) ||
 
737
          (N >= (occpi[nsym] - openpi[nsym])) ||
 
738
          (I >= (occpi[isym] - openpi[isym])) )
 
739
          W.matrix[h][mn][ei] = 0.0;
 
740
      }
 
741
    }
 
742
    dpd_file4_mat_irrep_wrt(&W, h);
 
743
    dpd_file4_mat_irrep_close(&W, h);
 
744
  }
 
745
  dpd_file4_close(&W);
 
746
 
 
747
  dpd_file4_init(&W, CC_HBAR, 0, 0, 11,"WmNiE (mN,Ei)");
 
748
  for(h=0; h < nirreps; h++) {
 
749
    dpd_file4_mat_irrep_init(&W, h);
 
750
    dpd_file4_mat_irrep_rd(&W, h);
 
751
    for(mn=0; mn<W.params->rowtot[h]; mn++) {
 
752
      m = W.params->roworb[h][mn][0];
 
753
      msym = W.params->psym[m];
 
754
      M = m - occ_off[msym];
 
755
      for(ei=0; ei<W.params->coltot[h]; ei++) {
 
756
        e = W.params->colorb[h][ei][0];
 
757
        i = W.params->colorb[h][ei][1];
 
758
        esym = W.params->rsym[e];
 
759
        isym = W.params->ssym[i];
 
760
        E = e - vir_off[esym];
 
761
        I = i - occ_off[isym];
 
762
        if ((M >= (occpi[msym] - openpi[msym])) ||
 
763
            (E >= (virtpi[esym] - openpi[esym])) ||
 
764
            (I >= (occpi[isym] - openpi[isym])) )
 
765
          W.matrix[h][mn][ei] = 0.0;
 
766
      }
 
767
    }
 
768
    dpd_file4_mat_irrep_wrt(&W, h);
 
769
    dpd_file4_mat_irrep_close(&W, h);
 
770
  }
 
771
  dpd_file4_close(&W);
 
772
  return;
 
773
}