projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
little more tersoff ...
[physik/posic.git]
/
moldyn.c
diff --git
a/moldyn.c
b/moldyn.c
index
dc2dd8e
..
1b52a56
100644
(file)
--- a/
moldyn.c
+++ b/
moldyn.c
@@
-998,6
+998,14
@@
int tersoff(t_moldyn *moldyn) {
v3_sub(&dist_ij,btom,&(atom[i]));
d_ij=v3_norm(&dist_ij);
if(d_ij<=S) {
v3_sub(&dist_ij,btom,&(atom[i]));
d_ij=v3_norm(&dist_ij);
if(d_ij<=S) {
+
+ S=;
+ R=;
+ A=;
+ lambda=;
+ B=;
+ mu=;
+
if(d_ij<=R) {
f_c=1.0;
df_c=0.0;
if(d_ij<=R) {
f_c=1.0;
df_c=0.0;
@@
-1007,6
+1015,8
@@
int tersoff(t_moldyn *moldyn) {
arg1=PI*(d_ij-R)/s_r;
f_c=0.5+0.5*cos(arg1);
df_c=-0.5*sin(arg1)*(PI/(s_r*d_ij));
arg1=PI*(d_ij-R)/s_r;
f_c=0.5+0.5*cos(arg1);
df_c=-0.5*sin(arg1)*(PI/(s_r*d_ij));
+ f_r=A*exp(-lambda*d_ij);
+ f_a=-B*exp(-mu*d_ij);
}
}
else
}
}
else