add another way of calculating tersoff + small moldyn mods
[physik/posic.git] / potentials / tersoff_orig.h
diff --git a/potentials/tersoff_orig.h b/potentials/tersoff_orig.h
new file mode 100644 (file)
index 0000000..d5d4a66
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * tersoff_orig.h - tersoff potential header file
+ *
+ * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
+ *
+ */
+
+#ifndef TERSOFF_H
+#define TERSOFF_H
+
+/* tersoff exchange type */
+typedef struct s_tersoff_echange {
+       double f_c,df_c;
+       double f_a,df_a;
+
+       t_3dvec dist_ij;
+       double d_ij2;
+       double d_ij;
+
+       double chi;
+
+       double *beta_i;
+       double *beta_j;
+       double *n_i;
+       double *n_j;
+       double *c_i;
+       double *c_j;
+       double *d_i;
+       double *d_j;
+       double *h_i;
+       double *h_j;
+
+       double ci2;
+       double cj2;
+       double di2;
+       double dj2;
+       double ci2di2;
+       double cj2dj2;
+       double betaini;
+       double betajnj;
+
+       u8 run3bp;
+       u8 run2bp_post;
+       u8 d_ij_between_rs;
+
+       double zeta_ij;
+       double zeta_ji;
+       t_3dvec dzeta_ij;
+       t_3dvec dzeta_ji;
+} t_tersoff_exchange;
+
+/* tersoff mult (2!) potential parameters */
+typedef struct s_tersoff_mult_params {
+       double S[2];            /* tersoff cutoff radii */
+       double S2[2];           /* tersoff cutoff radii squared */
+       double R[2];            /* tersoff cutoff radii */
+       double Smixed;          /* mixed S radius */
+       double S2mixed;         /* mixed S radius squared */
+       double Rmixed;          /* mixed R radius */
+       double A[2];            /* factor of tersoff attractive part */
+       double B[2];            /* factor of tersoff repulsive part */
+       double Amixed;          /* mixed A factor */
+       double Bmixed;          /* mixed B factor */
+       double lambda[2];       /* tersoff lambda */
+       double lambda_m;        /* mixed lambda */
+       double mu[2];           /* tersoff mu */
+       double mu_m;            /* mixed mu */
+
+       double chi;
+
+       double beta[2];
+       double n[2];
+       double c[2];
+       double d[2];
+       double h[2];
+
+       t_tersoff_exchange exchange;    /* exchange between 2bp and 3bp calc */
+} t_tersoff_mult_params;
+
+/* function prototypes */
+int tersoff_mult_complete_params(t_tersoff_mult_params *p);
+int tersoff_mult_1bp(t_moldyn *moldyn,t_atom *ai);
+int tersoff_mult_2bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
+int tersoff_mult_post_2bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
+int tersoff_mult_3bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
+
+#endif