MSpin-JCoupling  2.1
frame.h
1 /***************************************************************************
2  frame.h - description
3  -------------------
4  author : Armando Navarro-Vazquez
5  email : armando.deus@gmail.com
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef MAGNES_FRAME_H
18 #define MAGNES_FRAME_H
19 
20 #include <vector>
21 #include "coordinate.h"
22 #include "atom.h"
23 #include "bond.h"
24 #include "energy.h"
25 #include "coreexport.h"
26 
27 namespace magnes
28 {
29 class Molecule;
30 class FramePrivate;
31 
33 class MAGNES_CORE_API Frame
34 {
35 public:
36  Frame ( Molecule* molecule );
37  Frame ( const Frame& frame );
38  Frame& operator = ( const Frame& frame );
39  ~Frame();
41  const std::vector<Bond>& Bonds() const;
43  std::vector<Bond>& Bonds();
45  const std::vector<Coordinate>& XYZ() const ;
47  std::vector<Coordinate>& XYZ();
49  D2Array<double> InertiaTensor() const;
51  D2Array<double> GyrationTensor() const;
53  void SetDihedral ( size_t i,size_t j, size_t k, size_t l, float dihedral );
55  void RotateBond ( size_t i,size_t j,float angle, bool clockwise );
57  Energy& KineticEnergy() ;
59  const Energy& KineticEnergy() const;
61  const Energy& PotentialEnergy() const;
63  Energy& PotentialEnergy() ;
65  Energy TotalEnergy() const ;
67  float Distance ( int i, int j ) const;
69  float Angle ( int i, int j, int l ) const;
71  float Dihedral ( int i, int j, int k, int l ) const;
73  Coordinate MassCenter() const;
75  Coordinate Centroid() const;
77  std::vector < std::vector<size_t> > Rings ( size_t size=0 ) const;
79  Coordinate Vector ( int i, int j ) const;
81  const Molecule* ParentMolecule() const { return m_molecule; }
83  Molecule* ParentMolecule() { return m_molecule; }
85  const std::vector< D2Array<double> >& ChemicalShieldingTensors() const;
87  std::vector< D2Array<double> >& ChemicalShieldingTensors();
89  const std::vector< D2Array<double> >& EFGTensors() const;
91  std::vector< D2Array<double> >& EFGTensors();
93  void SetTitle(const std::string& string);
95  const std::string& Title() const;
97  const std::string& FileName() const;
99  void SetFileName(const std::string& filename);
101  void Reparent(Molecule* mol);
102 private:
103  void RotateNeighbours ( const Coordinate& axisorigin,const Coordinate& axisend,size_t i,size_t j,float pass,bool clockwise,std::vector<size_t>& rotatedatoms );
104 private:
105  Molecule* m_molecule;
106  FramePrivate* m_private;
107 };
108 
110 MAGNES_CORE_API std::ostream& operator << ( std::ostream& s,const magnes::Frame& m );
111 }
112 
113 #endif
MAGNES_CORE_API std::ostream & operator<<(std::ostream &s, const Coordinate &c)
Definition: coordinate.h:269
the global magnes namespace
Definition: ccchequation.h:38
A class for storing energy values.
Definition: energy.h:30
monodimensional array
Definition: mathtools.h:242
Molecule * ParentMolecule()
Definition: frame.h:83
Definition: molecule.h:44
const Molecule * ParentMolecule() const
Definition: frame.h:81
representaion of a 3D point
Definition: coordinate.h:33
Representation of a conformer.
Definition: frame.h:33