OSDN Git Service

783f9c66f1c4c1f0b3c2fdc97f6c67e7aaf55b44
[eos/base.git] / src / Objects / General / Crystal / doc / Crystal.html
1 <HR>
2 <A NAME="Information">
3 <H2>Information from source codes</H2>
4 </A>
5 <PRE>
6 ../src/crystalHelix.c:
7      $Revision: 1.1 $
8      $Date: 2002/02/14 10:18:46 $
9      $Author: tacyas $
10      $State: Exp $
11      $Log: crystalHelix.c,v $
12
13 ../src/crystalInfoFile.c:
14
15 ../src/crystalInit.c:
16
17 ../src/crystalUtil.c:
18 </PRE>
19 <HR>
20 <A NAME="include">
21 <H2>Crystal.h</H2>
22 </A>
23 <PRE>
24 #ifndef CRYSTAL_H
25 #define CRYSTAL_H
26
27 #include <stdio.h>
28
29 /* struct begin */
30
31 typedef enum CrystalSpaceGroup {
32         CrystalSpaceGroupP1=0,
33         CrystalSpaceGroupHelical=1
34 } CrystalSpaceGroup;
35
36 #ifdef __CRYSTALINIT__ 
37 char* CrystalSpaceGroupString[] = {
38         "P1",
39         "HelicalSymmmetry",
40         NULL    
41 };
42 #else
43 extern char* CrystalSpaceGroupString[];
44 #endif
45
46 typedef float CrystalParaTypeReal;
47 typedef int   CrystalParaTypeInteger;
48
49 typedef struct CrystalParaTypeRealCoord {
50         CrystalParaTypeReal x;
51         CrystalParaTypeReal y;
52         CrystalParaTypeReal z;
53 } CrystalParaTypeRealCoord;
54
55 typedef struct CrystalParaTypeIntegerCoord {
56         CrystalParaTypeInteger x;
57         CrystalParaTypeInteger y;
58         CrystalParaTypeInteger z;
59 } CrystalParaTypeIntegerCoord;
60
61 typedef struct CrystalParaTypeRealAxis {
62         CrystalParaTypeReal a;
63         CrystalParaTypeReal b;
64         CrystalParaTypeReal c;
65 } CrystalParaTypeRealAxis;
66
67 typedef struct CrystalParaTypeIntegerAxis {
68         CrystalParaTypeInteger a;
69         CrystalParaTypeInteger b;
70         CrystalParaTypeInteger c;
71 } CrystalParaTypeIntegerAxis;
72
73 typedef struct HelicalSymmetryInfo {
74         CrystalParaTypeInteger t;         /* Turn */
75         CrystalParaTypeInteger u;         /* Unit */ 
76         CrystalParaTypeInteger n;         /* n-strands */
77
78         /* 
79                 Don't change the below variables directly,
80                 bacause the variables can be calculated by the upper's.
81         */
82         CrystalParaTypeReal    dz;     /* dz     = TruePitch/unit */
83         CrystalParaTypeReal    dphi;   /* dphi   = 2*PI*turn/unit */
84 } HelicalSymmetryInfo;
85
86 typedef struct CrystalInfo {
87         CrystalParaTypeRealCoord    aAxis;    /* Unit Cell Vector : a-axis : Length = 1 */
88         CrystalParaTypeRealCoord    bAxis;    /* Unit Cell Vector : b-axis : Length = 1 */
89         CrystalParaTypeRealCoord    cAxis;    /* Unit Cell Vector : c-axis : Length = 1 */
90         CrystalParaTypeRealAxis     CellLength;    /* Unit Cell Size   a, b, c-axis [A] */
91         CrystalParaTypeRealCoord    Origin;        /* Unit Cell Origin [A] */
92         CrystalParaTypeIntegerAxis  N;             /* Number of Unit Cells a, b, c-axis */
93         CrystalParaTypeIntegerAxis  StartN;        /* Start  of Unit Cells a, b, c-axis */
94         CrystalSpaceGroup           SpaceGroup;
95
96     /* Reciprocal Space */
97         CrystalParaTypeRealCoord    aReciprocalAxis;
98         CrystalParaTypeRealCoord    bReciprocalAxis;
99         CrystalParaTypeRealCoord    cReciprocalAxis;
100
101         /* Information for Special Symmetry */
102         HelicalSymmetryInfo HelixInfo;
103                 /* For HelicalSymmetry : 
104                         The filament axis (z-axis) is treated as the c-axis. 
105                         The azimuthal axis (phi-axis) is treated as the b-axis. 
106                         The radius axis (r-axis) is treated as the a-axis.
107                 */
108 } CrystalInfo;
109
110 /* struct end */
111
112 /* prototype begin */
113
114 #ifdef __cplusplus
115         extern "C" {
116 #endif
117 extern void crystalInit(CrystalInfo* crystal);
118
119 extern void crystalSpaceGroupPrint(FILE* fpt, int mode);
120
121 extern void crystalInfoRead(FILE* fpt, CrystalInfo* linfo, int mode);
122 extern void crystalInfoWrite(FILE* fpt, CrystalInfo* linfo, int mode);
123 extern void crystalInfoFileFormat(FILE* fpt, int mode);
124
125 extern void crystalCellLengthSet(CrystalInfo* C, char axis, CrystalParaTypeReal length, int mode);
126 extern void crystalAxisSet(CrystalInfo* C, char axis, CrystalParaTypeReal x, CrystalParaTypeReal y, CrystalParaTypeReal z, int mode);
127 extern void crystalCellLengthSetUsingAxis(CrystalInfo* C, char axis, int mode);
128 extern void crystalAxisSetUsingCellLength(CrystalInfo* C, char axis, int mode);
129
130 extern double crystalInfoGetLatticeVolume(CrystalInfo* linfo, int mode);
131 extern void crystalInfoGetReciprocalLattice(CrystalInfo* linfo, int mode);
132
133 #ifdef __cplusplus
134         };      
135 #endif
136
137 /* prototype end */
138
139 #endif /* CRYSTAL_H */
140 </PRE>