OSDN Git Service

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