first commit, Readme.html更新して、git管理することにした。
This commit is contained in:
+62
@@ -0,0 +1,62 @@
|
||||
#include "dump2analysis.h"
|
||||
/* -m template */
|
||||
/* lammpstrjから3原子の角度分布を計算する */
|
||||
/* A原子(-a, -x, -s)とB原子(-c, -z, -u)で端の原子を指定する。 */
|
||||
/* B原子(-b, -y, -t)で中心原子を指定する。 */
|
||||
/* --rcut_abは角度を計算するA-B原子距離のカッとオフ。 default:2.3 */
|
||||
/* --rcut_bcは角度を計算するB-C原子距離のカッとオフ。 default:2.3 */
|
||||
|
||||
void ErrorTemplate(){
|
||||
printf("Required arguments atoms A, atoms B, and atom C\n");
|
||||
printf("(-a, -x, -s) atom A\n");
|
||||
printf("(-b, -y, -t) atom B\n");
|
||||
printf("(-c, -z, -u) atom B\n");
|
||||
printf("------------------------------------------------------------\n");
|
||||
printf("Optional arguments for Gr analysis:\n");
|
||||
printf("--rcut_ab cut-off for A-B bonds [2.3]\n");
|
||||
printf("--rcut_bc cut-off for B-C bonds [2.3]\n");
|
||||
printf("------------------------------------------------------------\n");
|
||||
printf("Example:\n");
|
||||
printf("dump2analysis -m angle -x Si -y O -z Si -i hoge.lammpstrj -o hoge.angle\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
void OutputTemplate(PARAM *p){
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(p->outfile, "w");
|
||||
fclose(fp);
|
||||
|
||||
}
|
||||
|
||||
void EstimateTemplate(PARAM *param){
|
||||
FILE *f;
|
||||
HEAD head;
|
||||
ATOMS a, b, c; /* bが中心元素 */
|
||||
int i, j, k;
|
||||
int s;
|
||||
|
||||
if (ArgCheckInputOutput(param) != 0) ErrorTemplate();
|
||||
SetAtomsSteps(param);
|
||||
if (CheckArgAtomSelect(param) != 7) ErrorTemplate();
|
||||
|
||||
Allocate(&a, param->atoms);
|
||||
Allocate(&b, param->atoms);
|
||||
Allocate(&c, param->atoms);
|
||||
f = fopen(param->infile, "r");
|
||||
|
||||
/* 距離の計算 */
|
||||
for (s=0; s<param->steps; s++){
|
||||
if (s%10 == 0) printf("Calculating angle step: %d...\n", s);
|
||||
/* 原子の選択 */
|
||||
GetData(f, param, &head, &a, &b, &c);
|
||||
for(i=0; i<b.atoms; i++){
|
||||
for(j=0; j<a.atoms; j++){
|
||||
for(k=0; k<c.atoms; k++){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OutputTemplate(param);
|
||||
}
|
||||
Reference in New Issue
Block a user