X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fposic.git;a=blobdiff_plain;f=posic.c;h=6b92a5e51b0428de417e34392189a6aa246abffb;hp=2b18c79155caf6e2282eaf5bdb6101b6ffdb65d5;hb=HEAD;hpb=177cf8b5cb5a3c59e2330327b628937540f123ac diff --git a/posic.c b/posic.c index 2b18c79..6b92a5e 100644 --- a/posic.c +++ b/posic.c @@ -5,153 +5,38 @@ * */ -#include - -#include "moldyn.h" -#include "math/math.h" -#include "init/init.h" -#include "visual/visual.h" +/* main include file */ #include "posic.h" +/* functions */ + + + +/* main code */ + +int parse_config_file() { + + return 0; +} + int main(int argc,char **argv) { t_moldyn md; - int a,b,c; - double e; - double help; - t_3dvec p; - - t_lj_params lj; - t_ho_params ho; - - /* - * moldyn init - * - * - parsing argv - * - log init - * - random init - * - */ - moldyn_init(&md,argc,argv); - - /* - * the following overrides possibly set interaction methods by argv !! - */ - - /* params */ - lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI; - help=lj.sigma6*lj.sigma6; - lj.sigma6*=help; - lj.sigma12=lj.sigma6*lj.sigma6; - lj.epsilon4=4.0*LJ_EPSILON_SI; - ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI; - ho.spring_constant=1.0; - /* assignement */ - md.potential_force_function=lennard_jones; - //md.potential_force_function=harmonic_oscillator; - md.pot_params=&lj; - //md.pot_params=&ho; - /* cutoff radius */ - md.cutoff=R_CUTOFF*LC_SI; - - /* - * testing random numbers - */ - -#ifdef DEBUG_RANDOM_NUMBER - for(a=0;a<1000000;a++) - printf("%f %f\n",rand_get_gauss(&(md.random)), - rand_get_gauss(&(md.random))); - return 0; -#endif - - /* - * geometry & particles - */ - - /* simulation cell volume in lattice constants */ - a=LEN_X; - b=LEN_Y; - c=LEN_Z; - md.dim.x=a*LC_SI; - md.dim.y=b*LC_SI; - md.dim.z=c*LC_SI; - - /* (un)set to (not) get visualized 'bounding atoms' */ - md.vis.dim.x=a*LC_SI; - md.vis.dim.y=b*LC_SI; - md.vis.dim.z=c*LC_SI; - - /* - * particles - */ - - /* lattice init */ - -#ifndef SIMPLE_TESTING - md.count=create_lattice(DIAMOND,SI,M_SI,LC_SI,a,b,c,&(md.atom)); - printf("created silicon lattice (#atoms = %d)\n",md.count); -#else - md.count=2; - moldyn->atom=malloc(2*sizeof(t_atom)); - moldyn->atom[0].r.x=0.13*sqrt(3.0)*LC_SI/2.0; - moldyn->atom[0].r.y=0; - moldyn->atom[0].r.z=0; - moldyn->atom[0].element=SI; - moldyn->atom[0].mass=M_SI; - moldyn->atom[1].r.x=-si[0].r.x; - moldyn->atom[1].r.y=0; - moldyn->atom[1].r.z=0; - moldyn->atom[1].element=SI; - moldyn->atom[1].mass=M_SI; -#endif - - /* initial thermal fluctuations of particles */ - -#ifndef SIMPLE_TESTING - printf("setting thermal fluctuations (T=%f K)\n",md.t); - thermal_init(&md); -#else - for(a=0;a