OSDN Git Service

merge:
[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         /* Information for Special Symmetry */
97         HelicalSymmetryInfo HelixInfo;
98                 /* For HelicalSymmetry : 
99                         The filament axis (z-axis) is treated as the c-axis. 
100                         The azimuthal axis (phi-axis) is treated as the b-axis. 
101                         The radius axis (r-axis) is treated as the a-axis.
102                 */
103 } CrystalInfo;
104
105 /* struct end */
106
107 /* prototype begin */
108
109 #ifdef __cplusplus
110         extern "C" {
111 #endif
112 extern void crystalInit(CrystalInfo* crystal);
113
114 extern void crystalSpaceGroupPrint(FILE* fpt, int mode);
115
116 extern void crystalInfoRead(FILE* fpt, CrystalInfo* linfo, int mode);
117 extern void crystalInfoWrite(FILE* fpt, CrystalInfo* linfo, int mode);
118 extern void crystalInfoFileFormat(FILE* fpt, int mode);
119
120 extern void crystalCellLengthSet(CrystalInfo* C, char axis, CrystalParaTypeReal length, int mode);
121 extern void crystalAxisSet(CrystalInfo* C, char axis, CrystalParaTypeReal x, CrystalParaTypeReal y, CrystalParaTypeReal z, int mode);
122 extern void crystalCellLengthSetUsingAxis(CrystalInfo* C, char axis, int mode);
123 extern void crystalAxisSetUsingCellLength(CrystalInfo* C, char axis, int mode);
124
125 #ifdef __cplusplus
126         };      
127 #endif
128
129 /* prototype end */
130
131 #endif /* CRYSTAL_H */
132 </PRE>