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

« back to all changes in this revision

Viewing changes to src/bin/intder/displacements.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:
 
1
#include <stdio.h>
 
2
#include <stdlib.h>
 
3
#include "displacements.h"
 
4
#include "params.h"
 
5
 
 
6
extern "C" {
 
7
  #include <libchkpt/chkpt.h>
 
8
  #include <libciomr/libciomr.h>
 
9
  #include <libipv1/ip_lib.h>
 
10
  #include <libpsio/psio.h>
 
11
  #include <psifiles.h>
 
12
  #include <masses.h>
 
13
  #include <physconst.h>
 
14
 
 
15
  extern FILE* outfile;
 
16
  extern Params gParams;
 
17
  extern char *psi_file_prefix;
 
18
};
 
19
 
 
20
void Displacements::addDisplacement(Molecule& mol)
 
21
{
 
22
  vectorMolecules.push_back(mol);
 
23
}
 
24
 
 
25
Molecule* Displacements::displacement(int disp)
 
26
{
 
27
  return &(vectorMolecules[disp]);
 
28
}
 
29
 
 
30
void Displacements::printGeometries()
 
31
{
 
32
  int index;
 
33
  
 
34
  for (index = 0; index < vectorMolecules.size(); index++)
 
35
    {
 
36
      if (index == 0)
 
37
        fprintf(outfile, "Disp #%d (Reference Geometry)\n", index);
 
38
      else
 
39
        fprintf(outfile, "Disp #%d\n", index);
 
40
      vectorMolecules[index].printGeometry();
 
41
    }
 
42
}
 
43
 
 
44
void Displacements::moveToCenterOfMass()
 
45
{
 
46
  int index;
 
47
  
 
48
  for (index = 0; index < vectorMolecules.size(); index++)
 
49
    vectorMolecules[index].moveToCenterOfMass();
 
50
}
 
51
 
 
52
void Displacements::useMasses(double *mass)
 
53
{
 
54
  int index;
 
55
 
 
56
  for (index = 0; index < vectorMolecules.size(); index++)
 
57
    vectorMolecules[index].useMasses(mass);
 
58
}
 
59