X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=potentials%2Ftersoff.h;fp=potentials%2Ftersoff.h;h=a04ed0246c15eee1d531b7b23ccd95d1ed4ed90a;hb=e333d9448b383cd3977f3919b6a1283a1e5e40e8;hp=0000000000000000000000000000000000000000;hpb=296a35b943e922173ce648ec76a4472e287af108;p=physik%2Fposic.git diff --git a/potentials/tersoff.h b/potentials/tersoff.h new file mode 100644 index 0000000..a04ed02 --- /dev/null +++ b/potentials/tersoff.h @@ -0,0 +1,87 @@ +/* + * tersoff.h - tersoff potential header file + * + * author: Frank Zirkelbach + * + */ + +#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