X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=9f9d0f71fcd8f44985ab07960bac8d4bb34a51f5;hb=e67bb08cb64bf21a6d4e7e8275007bdc5e769154;hp=212db144cd500c9c578b2b842c596999c564067e;hpb=e2c5d8b0eb4ce6faeb48830634eef522dbdb52b0;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index 212db14..9f9d0f7 100644 --- a/moldyn.h +++ b/moldyn.h @@ -33,11 +33,13 @@ typedef struct s_virial { /* the atom of the md simulation */ typedef struct s_atom { + t_3dvec r_0; /* initial position */ t_3dvec r; /* position */ t_3dvec v; /* velocity */ t_3dvec f; /* force */ t_virial virial; /* virial */ double e; /* site energy */ + double ekin; /* kinetic energy */ int element; /* number of element in pse */ double mass; /* atom mass */ u8 brand; /* brand id */ @@ -76,6 +78,9 @@ typedef struct s_moldyn_schedule { /* moldyn main structure */ typedef struct s_moldyn { + int argc; /* number of arguments */ + char **args; /* pointer to arguments */ + int count; /* total amount of atoms */ double mass; /* total system mass */ t_atom *atom; /* pointer to the atoms */ @@ -109,18 +114,24 @@ typedef struct s_moldyn { double t_sum; /* sum over all t */ double t_avg; /* average value of t */ - t_virial virial; /* global virial (absolute coordinates) */ + t_virial gvir; /* global virial (absolute coordinates) */ + double gv; + double gv_sum; + double gv_avg; + double gp; /* pressure computed from global virial */ double gp_sum; /* sum over all gp */ double gp_avg; /* average value of gp */ - double virial_avg; /* average of virial */ + double virial; /* actual virial */ double virial_sum; /* sum over all calculated virials */ + double virial_avg; /* average of virial */ double p_ref; /* reference pressure */ double p; /* actual pressure (computed by virial) */ double p_sum; /* sum over all p */ double p_avg; /* average value of p */ + t_3dvec tp; /* thermodynamic pressure dU/dV */ double dv; /* dV for thermodynamic pressure calc */ @@ -404,11 +415,11 @@ int moldyn_log_shutdown(t_moldyn *moldyn); int create_lattice(t_moldyn *moldyn,u8 type,double lc,int element,double mass, u8 attr,u8 brand,int a,int b,int c,t_3dvec *origin); +int add_atom(t_moldyn *moldyn,int element,double mass,u8 brand,u8 attr, + t_3dvec *r,t_3dvec *v); int cubic_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin); 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); int thermal_init(t_moldyn *moldyn,u8 equi_init); @@ -416,6 +427,7 @@ double total_mass_calc(t_moldyn *moldyn); double temperature_calc(t_moldyn *moldyn); double get_temperature(t_moldyn *moldyn); int scale_velocity(t_moldyn *moldyn,u8 equi_init); +double virial_sum(t_moldyn *moldyn); double pressure_calc(t_moldyn *moldyn); int energy_fluctuation_calc(t_moldyn *moldyn); int get_heat_capacity(t_moldyn *moldyn);