safety checkin before mensa
[physik/posic.git] / moldyn.c
index b52d51d..6fa9df2 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -79,6 +79,52 @@ 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 +202,38 @@ int set_pressure(t_moldyn *moldyn,double p_ref) {
        return 0;
 }
 
+int set_p_scale(t_moldyn *moldyn,u8 ptype,double ptc) {
+
+       moldyn->pt_scale&=(~(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");
+
+       return 0;
+}
+
+int set_t_scale(t_moldyn *moldyn,u8 ttype,double ttc) {
+
+       moldyn->pt_scale&=(~(T_SCALE_MASK));
+       moldyn->pt_scale|=ttype;
+       moldyn->t_tc=ttc;
+
+       printf("[moldyn] p/t scaling:\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);
@@ -1557,6 +1635,7 @@ int moldyn_integrate(t_moldyn *moldyn) {
        atom=moldyn->atom;
 
        /* initialize linked cell method */
+printf(" hier soll es sein\n");
        link_cell_init(moldyn,VERBOSE);
 
        /* logging & visualization */
@@ -2337,6 +2416,8 @@ int process_2b_bonds(t_moldyn *moldyn,void *data,
 
        lc=&(moldyn->lc);
 
+       /* only init link cell if it doesn't exist! */
+       HIER WEITER
        link_cell_init(moldyn,VERBOSE);
 
        itom=moldyn->atom;