projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pot hopefully ok, doing timestep tests for 450C now ...
[physik/posic.git]
/
sic.c
diff --git
a/sic.c
b/sic.c
index
516ee01
..
35931e0
100644
(file)
--- a/
sic.c
+++ b/
sic.c
@@
-8,13
+8,17
@@
#include <math.h>
#include "moldyn.h"
#include <math.h>
#include "moldyn.h"
-#include "math/math.h"
-#include "init/init.h"
-#include "visual/visual.h"
#include "posic.h"
int main(int argc,char **argv) {
#include "posic.h"
int main(int argc,char **argv) {
+
+ /* check argv */
+ if(argc!=3) {
+ printf("[sic] usage: %s <logdir> <temperatur>\n",argv[0]);
+ return -1;
+ }
+
/* main moldyn structure */
t_moldyn md;
/* main moldyn structure */
t_moldyn md;
@@
-114,29
+118,30
@@
int main(int argc,char **argv) {
moldyn_bc_check(&md);
/* testing configuration */
moldyn_bc_check(&md);
/* testing configuration */
- //r.x=2.
4
5/2; v.x=0;
+ //r.x=2.
9
5/2; v.x=0;
//r.y=0; v.y=0;
//r.z=0; v.z=0;
//add_atom(&md,SI,M_SI,0,
//r.y=0; v.y=0;
//r.z=0; v.z=0;
//add_atom(&md,SI,M_SI,0,
- // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
+ // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP
,//
|ATOM_ATTR_HB,
// &r,&v);
// &r,&v);
- //r.x=-2.
4
5/2; v.x=0;
+ //r.x=-2.
9
5/2; v.x=0;
//r.y=0; v.y=0;
//r.z=0; v.z=0;
//add_atom(&md,SI,M_SI,0,
//r.y=0; v.y=0;
//r.z=0; v.z=0;
//add_atom(&md,SI,M_SI,0,
- // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
+ // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP
,//
|ATOM_ATTR_HB,
// &r,&v);
/* setting a nearest neighbour distance for the moldyn checks */
set_nn_dist(&md,0.25*sqrt(3.0)*LC_SI); /* diamond ! */
/* set temperature */
// &r,&v);
/* setting a nearest neighbour distance for the moldyn checks */
set_nn_dist(&md,0.25*sqrt(3.0)*LC_SI); /* diamond ! */
/* set temperature */
- printf("[sic] setting temperature
\n"
);
- set_temperature(&md,273.0+1410.0);
+ printf("[sic] setting temperature
-> %f\n",273+atof(argv[2])
);
+
//
set_temperature(&md,273.0+1410.0);
//set_temperature(&md,273.0+450.0);
//set_temperature(&md,273.0);
//set_temperature(&md,1.0);
//set_temperature(&md,0.0);
//set_temperature(&md,273.0+450.0);
//set_temperature(&md,273.0);
//set_temperature(&md,1.0);
//set_temperature(&md,0.0);
+ set_temperature(&md,atof(argv[2])+273.0);
/* set pressure */
printf("[sic] setting pressure\n");
/* set pressure */
printf("[sic] setting pressure\n");
@@
-146,6
+151,7
@@
int main(int argc,char **argv) {
printf("[sic] set p/t scaling\n");
//set_pt_scale(&md,P_SCALE_BERENDSEN,100.0,
// T_SCALE_BERENDSEN,100.0);
printf("[sic] set p/t scaling\n");
//set_pt_scale(&md,P_SCALE_BERENDSEN,100.0,
// T_SCALE_BERENDSEN,100.0);
+ set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100.0);
/* initial thermal fluctuations of particles (in equilibrium) */
printf("[sic] thermal init\n");
/* initial thermal fluctuations of particles (in equilibrium) */
printf("[sic] thermal init\n");
@@
-153,13
+159,17
@@
int main(int argc,char **argv) {
/* create the simulation schedule */
printf("[sic] adding schedule\n");
/* create the simulation schedule */
printf("[sic] adding schedule\n");
- moldyn_add_schedule(&md,100001,1.0);
+ moldyn_add_schedule(&md,20000,.1);
+ moldyn_add_schedule(&md,10000,.2);
+ moldyn_add_schedule(&md,6667,.3);
+ moldyn_add_schedule(&md,5000,.4);
+ moldyn_add_schedule(&md,4001,.5);
/* activate logging */
printf("[sic] activate logging\n");
/* activate logging */
printf("[sic] activate logging\n");
- moldyn_set_log_dir(&md,
"saves/test"
);
- moldyn_set_log(&md,LOG_TOTAL_ENERGY,
2
00);
- moldyn_set_log(&md,VISUAL_STEP,
2
00);
+ moldyn_set_log_dir(&md,
argv[1]
);
+ moldyn_set_log(&md,LOG_TOTAL_ENERGY,
1
00);
+ moldyn_set_log(&md,VISUAL_STEP,
1
00);
/*
* let's do the actual md algorithm now
/*
* let's do the actual md algorithm now