IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IKNGeometricUnitCellInfo Class Referenceabstract

Iterface for Unitcell information. More...

#include "IKNGeometricUnitCellInfo.h"

Inheritance diagram for IKNGeometricUnitCellInfo:
Inheritance graph
Collaboration diagram for IKNGeometricUnitCellInfo:
Collaboration graph

Public Member Functions

void InitCoordination ()
 Initial Coordination information. More...
 
virtual void SetAtomCoordination ()=0
 Atom coordination setting. More...
 
virtual void SetNeighborCoordination ()=0
 Neighbor atom coordiantion setting. More...
 
virtual void SetUnitCellSize (double fUnitcellSize[3])=0
 Unitcell size setting. More...
 
int GetA2CNeighborCount ()
 Get neigbhor relation count. More...
 
int GetC2ANeighborCount ()
 Get neigbhor relation count. More...
 
 IKNGeometricUnitCellInfo ()
 
 ~IKNGeometricUnitCellInfo ()
 
unsigned int GetAnionCount ()
 
unsigned int GetCationCount ()
 Get anion count in Unitcell. More...
 
double * GetUnitcCellSize ()
 Get cation count in Unitcell. More...
 
CKNGeometricCoordination GetAtomCoordination (CKNGeometricAtom::ATOM_TYPE atomType, unsigned int nIndex)
 Get Unitcell size x, y, z direction axis. More...
 
CKNGeometricCoordination GetNeighborCoordination (CKNGeometricAtom::NEIGHOR_RELATION neighborType, unsigned int nIndex)
 Get neigbhor atom coordination from Unitcell. More...
 
void RotateNeighbor (CKNMatrixOperation::CKNDMatrix *pRotationMatrix)
 Rotating neighbor coordination. More...
 
void RotateAxis (CKNMatrixOperation::CKNDMatrix *pRotationMatrix)
 Rotating axis. More...
 

Protected Member Functions

void SetAtomCoordination (CKNGeometricAtom::ATOM_TYPE type, double x, double y, double z)
 Set single atom coordination. More...
 
void SetNeighborCoordination (CKNGeometricAtom::NEIGHOR_RELATION type, double x, double y, double z)
 Set single neighbor coordination. More...
 

Protected Attributes

double m_UnitCellSize [3]
 Unitcell size x, y, z direction axis. More...
 
double m_NeigbhorOriginSize [3]
 For neighbor distance calculation. More...
 
std::vector< CKNGeometricAtomm_vectAtomList_1
 Atom list in Unitcell for anion. More...
 
std::vector< CKNGeometricAtomm_vectAtomList_2
 Atom list in Unitcell for cation. More...
 
std::vector
< CKNGeometricCoordination
m_vectNeighborRelation1To2
 Neighbor relation list in Unitcell for anion to cation. More...
 
std::vector
< CKNGeometricCoordination
m_vectNeighborRelation2To1
 Neighbor relation list in Unitcell for cation to anion. More...
 

Detailed Description

Iterface for Unitcell information.

Date
03/Oct/2014
Author
Kyu Nam Cho(mysto.nosp@m.us@k.nosp@m.orea..nosp@m.ac.k.nosp@m.r), Hoon Ryu(elec1.nosp@m.020@.nosp@m.gmail.nosp@m..com)

Definition at line 19 of file IKNGeometricUnitCellInfo.h.

Constructor & Destructor Documentation

IKNGeometricUnitCellInfo::~IKNGeometricUnitCellInfo ( )

Definition at line 19 of file IKNGeometricUnitCellInfo.cpp.

20 {
21 }

Member Function Documentation

int IKNGeometricUnitCellInfo::GetA2CNeighborCount ( )
inline

Get neigbhor relation count.

Definition at line 26 of file IKNGeometricUnitCellInfo.h.

References m_vectNeighborRelation1To2.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

unsigned int IKNGeometricUnitCellInfo::GetAnionCount ( )
inline

Definition at line 44 of file IKNGeometricUnitCellInfo.h.

References m_vectAtomList_1.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

44 { return m_vectAtomList_1.size(); };
std::vector< CKNGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

CKNGeometricCoordination IKNGeometricUnitCellInfo::GetAtomCoordination ( CKNGeometricAtom::ATOM_TYPE  atomType,
unsigned int  nIndex 
)

Get Unitcell size x, y, z direction axis.

Get atom coordination from Unitcell

Parameters
atomTypeAtom type, anion or cation
nIndexAtom Index
Returns
Atom coordination

Definition at line 28 of file IKNGeometricUnitCellInfo.cpp.

References CKNGeometricAtom::A, CKNGeometricAtom::C, m_vectAtomList_1, and m_vectAtomList_2.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

29 {
31 
32  switch (atomType)
33  {
35  if (nIndex < 0 || nIndex >= m_vectAtomList_1.size())
36  return dumy;
37  return m_vectAtomList_1[nIndex].GetCoordination();
38  break;
40  if (nIndex < 0 || nIndex >= m_vectAtomList_2.size())
41  return dumy;
42  return m_vectAtomList_2[nIndex].GetCoordination();
43  break;
44  }
45 
46  return dumy;
47 }
Class for coordination.
std::vector< CKNGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
std::vector< CKNGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

int IKNGeometricUnitCellInfo::GetC2ANeighborCount ( )
inline

Get neigbhor relation count.

Definition at line 27 of file IKNGeometricUnitCellInfo.h.

References m_vectNeighborRelation2To1.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

unsigned int IKNGeometricUnitCellInfo::GetCationCount ( )
inline

Get anion count in Unitcell.

Definition at line 45 of file IKNGeometricUnitCellInfo.h.

References m_vectAtomList_2.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

45 { return m_vectAtomList_2.size(); };
std::vector< CKNGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.

Here is the caller graph for this function:

CKNGeometricCoordination IKNGeometricUnitCellInfo::GetNeighborCoordination ( CKNGeometricAtom::NEIGHOR_RELATION  neighborType,
unsigned int  nIndex 
)

Get neigbhor atom coordination from Unitcell.

Parameters
neighborTypeNeighbor Atom type, anion or cation
nIndexAtom Index
Returns
Atom coordination

Definition at line 54 of file IKNGeometricUnitCellInfo.cpp.

References CKNGeometricAtom::A2C, CKNGeometricAtom::C2A, m_vectNeighborRelation1To2, and m_vectNeighborRelation2To1.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

55 {
57 
58  switch (neighborType)
59  {
61  if (nIndex < 0 || nIndex >= m_vectNeighborRelation1To2.size())
62  return dumy;
63  return m_vectNeighborRelation1To2[nIndex];
64  break;
66  if (nIndex < 0 || nIndex >= m_vectNeighborRelation2To1.size())
67  return dumy;
68  return m_vectNeighborRelation2To1[nIndex];
69  break;
70  }
71 
72  return dumy;
73 }
Class for coordination.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.

Here is the caller graph for this function:

double* IKNGeometricUnitCellInfo::GetUnitcCellSize ( )
inline

Get cation count in Unitcell.

Definition at line 46 of file IKNGeometricUnitCellInfo.h.

References m_UnitCellSize.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

46 { return m_UnitCellSize; };
double m_UnitCellSize[3]
Unitcell size x, y, z direction axis.

Here is the caller graph for this function:

void IKNGeometricUnitCellInfo::InitCoordination ( )

Initial Coordination information.

Definition at line 179 of file IKNGeometricUnitCellInfo.cpp.

References m_vectAtomList_1, m_vectAtomList_2, m_vectNeighborRelation1To2, and m_vectNeighborRelation2To1.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

180 {
181  m_vectAtomList_1.clear();
182  m_vectAtomList_2.clear();
185 }
std::vector< CKNGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
std::vector< CKNGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

void IKNGeometricUnitCellInfo::RotateAxis ( CKNMatrixOperation::CKNDMatrix pRotationMatrix)

Rotating axis.

Parameters
pRotationMatrixRotation matrix

Definition at line 125 of file IKNGeometricUnitCellInfo.cpp.

References CKNMatrixOperation::CKNVector::GetAt(), CKNComplex::GetRealNumber(), m_UnitCellSize, CKNMatrixOperation::MVMul(), CKNMatrixOperation::CKNVector::SetAt(), and CKNMatrixOperation::CKNVector::SetSize().

126 {
127  CKNMatrixOperation::CKNVector Vector, Result;
128  int i;
129  double *fCoordination = NULL;
130 
131  Vector.SetSize(3);
132  Result.SetSize(3);
133 
134  for (i = 0; i < 3; ++i)
135  Vector.SetAt(i, m_UnitCellSize[i], 0);
136 
137  CKNMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
138 
139  for (i = 0; i < 3; ++i)
140  m_UnitCellSize[i] = Result.GetAt(i).GetRealNumber();
141 }
void SetSize(unsigned int nSize)
Set Vector elements size.
double GetRealNumber() const
Get real part.
Definition: KNComplex.h:26
CKNComplex GetAt(unsigned int nIndex)
Get element value from specific index.
static void MVMul(CKNCSR *pAMatrix, CKNVector *pVector, CKNVector *pResult)
Matrix and vector multiple operation.
void SetAt(unsigned int nIndex, CKNComplex value)
Set element value in specific index, Call by value.
double m_UnitCellSize[3]
Unitcell size x, y, z direction axis.
This class for describing vector for Lanczos method.

Here is the call graph for this function:

void IKNGeometricUnitCellInfo::RotateNeighbor ( CKNMatrixOperation::CKNDMatrix pRotationMatrix)

Rotating neighbor coordination.

Parameters
pRotationMatrixRotation matrix

Definition at line 146 of file IKNGeometricUnitCellInfo.cpp.

References CKNMatrixOperation::CKNVector::GetAt(), CKNComplex::GetRealNumber(), m_vectNeighborRelation1To2, m_vectNeighborRelation2To1, CKNMatrixOperation::MVMul(), CKNMatrixOperation::CKNVector::SetAt(), and CKNMatrixOperation::CKNVector::SetSize().

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

147 {
148  CKNMatrixOperation::CKNVector Vector, Result;
149  unsigned int i, j;
150  double *fCoordination = NULL;
151 
152  Vector.SetSize(3);
153  Result.SetSize(3);
154 
155  for (i = 0; i < m_vectNeighborRelation1To2.size() ; ++i)
156  {
157  fCoordination = m_vectNeighborRelation1To2[i].GetCoordinationAll();
158 
159  for (j = 0; j < 3; ++j)
160  Vector.SetAt(j, fCoordination[j], 0);
161 
162  CKNMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
163  m_vectNeighborRelation1To2[i].SetCoordination(Result.GetAt(0).GetRealNumber(), Result.GetAt(1).GetRealNumber(), Result.GetAt(2).GetRealNumber());
164  }
165 
166  for (i = 0; i < m_vectNeighborRelation2To1.size(); ++i)
167  {
168  fCoordination = m_vectNeighborRelation2To1[i].GetCoordinationAll();
169 
170  for (j = 0; j < 3; ++j)
171  Vector.SetAt(j, fCoordination[j], 0);
172 
173  CKNMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
174  m_vectNeighborRelation2To1[i].SetCoordination(Result.GetAt(0).GetRealNumber(), Result.GetAt(1).GetRealNumber(), Result.GetAt(2).GetRealNumber());
175  }
176 
177 }
void SetSize(unsigned int nSize)
Set Vector elements size.
double GetRealNumber() const
Get real part.
Definition: KNComplex.h:26
CKNComplex GetAt(unsigned int nIndex)
Get element value from specific index.
static void MVMul(CKNCSR *pAMatrix, CKNVector *pVector, CKNVector *pResult)
Matrix and vector multiple operation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
void SetAt(unsigned int nIndex, CKNComplex value)
Set element value in specific index, Call by value.
This class for describing vector for Lanczos method.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void IKNGeometricUnitCellInfo::SetAtomCoordination ( )
pure virtual
void IKNGeometricUnitCellInfo::SetAtomCoordination ( CKNGeometricAtom::ATOM_TYPE  type,
double  x,
double  y,
double  z 
)
protected

Set single atom coordination.

Parameters
typeAtom type
xx coordination
yy coordination
zz coordination

Definition at line 81 of file IKNGeometricUnitCellInfo.cpp.

References CKNGeometricAtom::A, ATOM_NUM_BASE, CKNGeometricAtom::C, m_vectAtomList_1, m_vectAtomList_2, CKNGeometricAtom::SetCoordination(), and CKNGeometricAtom::SetType().

82 {
83  CKNGeometricAtom atom;
84 
85  atom.SetType(type, ATOM_NUM_BASE);
86  atom.SetCoordination(x, y, z);
87 
88  switch (type)
89  {
91  m_vectAtomList_1.push_back(atom);
92  break;
94  m_vectAtomList_2.push_back(atom);
95  break;
96  }
97 }
void SetCoordination(CKNGeometricCoordination coordination)
Get atom coordination.
void SetType(ATOM_TYPE type, MATERIAL_INDEX number)
Set atom information.
std::vector< CKNGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
Class for Atom.
std::vector< CKNGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the call graph for this function:

virtual void IKNGeometricUnitCellInfo::SetNeighborCoordination ( )
pure virtual
void IKNGeometricUnitCellInfo::SetNeighborCoordination ( CKNGeometricAtom::NEIGHOR_RELATION  type,
double  x,
double  y,
double  z 
)
protected

Set single neighbor coordination.

Parameters
typeNeighbor relationship type
xx axis distance
yy axis distance
zz axis distance

Definition at line 105 of file IKNGeometricUnitCellInfo.cpp.

References CKNGeometricAtom::A2C, CKNGeometricAtom::C2A, m_vectNeighborRelation1To2, m_vectNeighborRelation2To1, and CKNGeometricCoordination::SetCoordination().

106 {
107  CKNGeometricCoordination relationCoordnation;
108 
109  relationCoordnation.SetCoordination(x, y, z);
110 
111  switch (type)
112  {
114  m_vectNeighborRelation1To2.push_back(relationCoordnation);
115  break;
117  m_vectNeighborRelation2To1.push_back(relationCoordnation);
118  break;
119  }
120 }
Class for coordination.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
std::vector< CKNGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
void SetCoordination(CKNGeometricCoordination coordination)
Get coordination with double buffer.

Here is the call graph for this function:

virtual void IKNGeometricUnitCellInfo::SetUnitCellSize ( double  fUnitcellSize[3])
pure virtual

Unitcell size setting.

Implemented in CKNGeometricUnitCellInfo_cubic, and CKNGeometricUnitCellInfo_zincblende.

Referenced by CKNGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

Member Data Documentation

double IKNGeometricUnitCellInfo::m_NeigbhorOriginSize[3]
protected
std::vector<CKNGeometricAtom> IKNGeometricUnitCellInfo::m_vectAtomList_1
protected

Atom list in Unitcell for anion.

Definition at line 35 of file IKNGeometricUnitCellInfo.h.

Referenced by GetAnionCount(), GetAtomCoordination(), InitCoordination(), and SetAtomCoordination().

std::vector<CKNGeometricAtom> IKNGeometricUnitCellInfo::m_vectAtomList_2
protected

Atom list in Unitcell for cation.

Definition at line 36 of file IKNGeometricUnitCellInfo.h.

Referenced by GetAtomCoordination(), GetCationCount(), InitCoordination(), and SetAtomCoordination().

std::vector<CKNGeometricCoordination> IKNGeometricUnitCellInfo::m_vectNeighborRelation1To2
protected

Neighbor relation list in Unitcell for anion to cation.

Definition at line 37 of file IKNGeometricUnitCellInfo.h.

Referenced by GetA2CNeighborCount(), GetNeighborCoordination(), InitCoordination(), RotateNeighbor(), and SetNeighborCoordination().

std::vector<CKNGeometricCoordination> IKNGeometricUnitCellInfo::m_vectNeighborRelation2To1
protected

Neighbor relation list in Unitcell for cation to anion.

Definition at line 38 of file IKNGeometricUnitCellInfo.h.

Referenced by GetC2ANeighborCount(), GetNeighborCoordination(), InitCoordination(), RotateNeighbor(), and SetNeighborCoordination().


The documentation for this class was generated from the following files: