X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=posic.c;h=04d9b7f1ff23bc0d3f5dcf504ff9f6f83b461979;hb=3961d57b84198e336085fd79263fec40837066a0;hp=79654cdb37403891a8ea285ced20e6cf3f75e949;hpb=4e6604346459a4a8619bfc45f2a4b7dbd925ae86;p=physik%2Fposic.git diff --git a/posic.c b/posic.c index 79654cd..04d9b7f 100644 --- a/posic.c +++ b/posic.c @@ -57,9 +57,6 @@ int main(int argc,char **argv) { printf("setting thermal fluctuations\n"); thermal_init(si,&random,count,t); - /* visualize */ - - visual_atoms(&vis,0.0,si,count); /* check kinetic energy */ @@ -78,8 +75,11 @@ int main(int argc,char **argv) { md.force=force_lennard_jones; md.cutoff_square=((LC_SI/4.0)*(LC_SI/4.0)); md.pot_params=&lj; - md.force=NULL; + md.integrate=velocity_verlet; + md.time_steps=RUNS; + md.tau=TAU; md.status=0; + md.visual=&vis; lj.sigma6=3.0/16.0*LC_SI*LC_SI; help=lj.sigma6*lj.sigma6; @@ -103,6 +103,14 @@ int main(int argc,char **argv) { * integration of newtons equations */ + /* visualize */ + //visual_atoms(&vis,0.0,si,count); + + + moldyn_integrate(&md); + + printf("total energy (after integration): %f\n",get_total_energy(&md)); + /* close */ visual_tini(&vis);