X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.c;h=988b4671780d6fb68a8826c92390c2cedd2ff663;hb=d7f67c88195ab155f2737e57cc5e81973d3feb0c;hp=b52d51d4b790728b9e14f1fd38f48ebd41c8a7b2;hpb=61d24d027511c3e96b2f94558dc1b31c72725767;p=physik%2Fposic.git diff --git a/moldyn.c b/moldyn.c index b52d51d..988b467 100644 --- a/moldyn.c +++ b/moldyn.c @@ -79,6 +79,50 @@ static char *pse_col[]={ "Ar", }; +static double *pse_mass[]={ + 0, + 0, + 0, + 0, + 0, + 0, + M_C, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + M_SI, + 0, + 0, + 0, + 0, +}; + +static double *pse_lc[]={ + 0, + 0, + 0, + 0, + 0, + 0, + LC_C, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + LC_SI, + 0, + 0, + 0, + 0, +}; + /* * the moldyn functions */ @@ -156,6 +200,48 @@ int set_pressure(t_moldyn *moldyn,double p_ref) { return 0; } +int set_p_scale(t_moldyn *moldyn,u8 ptype,double ptc) { + + moldyn->pt_scalei&=(^(P_SCALE_MASK)); + moldyn->pt_scale|=ptype; + moldyn->p_tc=ptc; + + printf("[moldyn] p/t scaling:\n"); + + printf(" p: %s",ptype?"yes":"no "); + if(ptype) + printf(" | type: %02x | factor: %f",ptype,ptc); + printf("\n"); + + printf(" t: %s",ttype?"yes":"no "); + if(ttype) + printf(" | type: %02x | factor: %f",ttype,ttc); + printf("\n"); + + return 0; +} + +int set_t_scale(t_moldyn *moldyn,u8 ttype,double ttc) { + + moldyn->pt_scalei&=(^(T_SCALE_MASK)); + moldyn->pt_scale|=ttype; + moldyn->t_tc=ttc; + + printf("[moldyn] p/t scaling:\n"); + + printf(" p: %s",ptype?"yes":"no "); + if(ptype) + printf(" | type: %02x | factor: %f",ptype,ptc); + printf("\n"); + + printf(" t: %s",ttype?"yes":"no "); + if(ttype) + printf(" | type: %02x | factor: %f",ttype,ttc); + printf("\n"); + + return 0; +} + int set_pt_scale(t_moldyn *moldyn,u8 ptype,double ptc,u8 ttype,double ttc) { moldyn->pt_scale=(ptype|ttype);