pot hopefully ok, doing timestep tests for 450C now ...
[physik/posic.git] / moldyn.h
index 4203c79..38e4999 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
@@ -27,10 +27,12 @@ typedef struct s_atom {
        t_3dvec r;              /* position */
        t_3dvec v;              /* velocity */
        t_3dvec f;              /* force */
-       t_3dvec virial;         /* virial */
+       t_3dvec virial;         /* virial (v_xx, v_yy, v_zz) */
+       double e;               /* site energy */
        int element;            /* number of element in pse */
        double mass;            /* atom mass */
-       u8 bnum;                /* brand number */
+       u8 brand;               /* brand id */
+       int tag;                /* atom unique id (number of atom) */
        u8 attr;                /* attributes */
 } t_atom;
 
@@ -55,7 +57,8 @@ typedef struct s_linkcell {
 
 /* moldyn schedule structure */
 typedef struct s_moldyn_schedule {
-       int content_count;
+       int count;
+       int total_sched;
        int *runs;
        double *tau;
        int (*hook)(void *moldyn,void *hook);
@@ -376,8 +379,10 @@ int moldyn_set_log(t_moldyn *moldyn,u8 type,int timer);
 int moldyn_log_shutdown(t_moldyn *moldyn);
 
 int create_lattice(t_moldyn *moldyn,u8 type,double lc,int element,double mass,
-                   u8 attr,u8 bnum,int a,int b,int c);
-int add_atom(t_moldyn *moldyn,int element,double mass,u8 bnum,u8 attr,
+                   u8 attr,u8 brand,int a,int b,int c);
+int fcc_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin);
+int diamond_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin);
+int add_atom(t_moldyn *moldyn,int element,double mass,u8 brand,u8 attr,
              t_3dvec *r,t_3dvec *v);
 int destroy_atoms(t_moldyn *moldyn);
 
@@ -404,6 +409,8 @@ int moldyn_integrate(t_moldyn *moldyn);
 int velocity_verlet(t_moldyn *moldyn);
 
 int potential_force_calc(t_moldyn *moldyn);
+inline int check_per_bound(t_moldyn *moldyn,t_3dvec *a)
+       __attribute__((always_inline));
 int check_per_bound(t_moldyn *moldyn,t_3dvec *a);
 int harmonic_oscillator(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
 int lennard_jones(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);