projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
just foo
[physik/posic.git]
/
sic.c
diff --git
a/sic.c
b/sic.c
index
5edb699
..
a105987
100644
(file)
--- a/
sic.c
+++ b/
sic.c
@@
-8,13
+8,18
@@
#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!=2) {
+ printf("[sic] error: arg1 (vis/log/save location) ");
+ printf("must be given!\n");
+ return -1;
+ }
+
/* main moldyn structure */
t_moldyn md;
/* main moldyn structure */
t_moldyn md;
@@
-27,7
+32,7
@@
int main(int argc,char **argv) {
double tau;
/* testing location & velocity vector */
double tau;
/* testing location & velocity vector */
- t_3dvec r,v;
+
//
t_3dvec r,v;
/* values */
tau=1.0e-15; /* delta t = 1 fs */
/* values */
tau=1.0e-15; /* delta t = 1 fs */
@@
-111,6
+116,7
@@
int main(int argc,char **argv) {
create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
0,5,5,5);
create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
0,5,5,5);
+ moldyn_bc_check(&md);
/* testing configuration */
//r.x=2.45/2; v.x=0;
/* testing configuration */
//r.x=2.45/2; v.x=0;
@@
-131,12
+137,20
@@
int main(int argc,char **argv) {
/* set temperature */
printf("[sic] setting temperature\n");
/* set temperature */
printf("[sic] setting temperature\n");
+ set_temperature(&md,273.0+1410.0);
//set_temperature(&md,273.0+450.0);
//set_temperature(&md,273.0+450.0);
- set_temperature(&md,0.0);
+ //set_temperature(&md,273.0);
+ //set_temperature(&md,1.0);
+ //set_temperature(&md,0.0);
+
+ /* set pressure */
+ printf("[sic] setting pressure\n");
+ set_pressure(&md,ATM);
/* set p/t scaling */
printf("[sic] set p/t scaling\n");
/* set p/t scaling */
printf("[sic] set p/t scaling\n");
- set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100.0);
+ //set_pt_scale(&md,P_SCALE_BERENDSEN,100.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");
@@
-144,13
+158,13
@@
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,
1000
,1.0);
+ moldyn_add_schedule(&md,
20001
,1.0);
/* 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,
1
0);
- moldyn_set_log(&md,VISUAL_STEP,
1
0);
+ moldyn_set_log_dir(&md,
argv[1]
);
+ moldyn_set_log(&md,LOG_TOTAL_ENERGY,
20
0);
+ moldyn_set_log(&md,VISUAL_STEP,
20
0);
/*
* let's do the actual md algorithm now
/*
* let's do the actual md algorithm now