added 2b bond check for tersoff
[physik/posic.git] / moldyn.c
index 82ae543..dd8a527 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
 #include "potentials/tersoff.h"
 #endif
 
-
-/*
- * global variables, pse and atom colors (only needed here)
- */ 
-
-static char *pse_name[]={
-       "*",
-       "H",
-       "He",
-       "Li",
-       "Be",
-       "B",
-       "C",
-       "N",
-       "O",
-       "F",
-       "Ne",
-       "Na",
-       "Mg",
-       "Al",
-       "Si",
-       "P",
-       "S",
-       "Cl",
-       "Ar",
-};
-
-static char *pse_col[]={
-       "*",
-       "White",
-       "He",
-       "Li",
-       "Be",
-       "B",
-       "Gray",
-       "N",
-       "Blue",
-       "F",
-       "Ne",
-       "Na",
-       "Mg",
-       "Al",
-       "Yellow",
-       "P",
-       "S",
-       "Cl",
-       "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
  */
@@ -208,7 +113,7 @@ int set_p_scale(t_moldyn *moldyn,u8 ptype,double ptc) {
        moldyn->pt_scale|=ptype;
        moldyn->p_tc=ptc;
 
-       printf("[moldyn] p/t scaling:\n");
+       printf("[moldyn] p scaling:\n");
 
        printf("  p: %s",ptype?"yes":"no ");
        if(ptype)
@@ -224,7 +129,7 @@ int set_t_scale(t_moldyn *moldyn,u8 ttype,double ttc) {
        moldyn->pt_scale|=ttype;
        moldyn->t_tc=ttc;
 
-       printf("[moldyn] p/t scaling:\n");
+       printf("[moldyn] t scaling:\n");
 
        printf("  t: %s",ttype?"yes":"no ");
        if(ttype)
@@ -315,7 +220,7 @@ int set_potential(t_moldyn *moldyn,u8 type) {
                        moldyn->func3b_k1=tersoff_mult_3bp_k1;
                        moldyn->func3b_j2=tersoff_mult_3bp_j2;
                        moldyn->func3b_k2=tersoff_mult_3bp_k2;
-                       // missing: check 2b bond func
+                       moldyn->check_2b_bond=tersoff_mult_check_2b_bond;
                        break;
                case MOLDYN_POTENTIAL_AM:
                        moldyn->func3b_j1=albe_mult_3bp_j1;
@@ -1674,8 +1579,9 @@ int moldyn_integrate(t_moldyn *moldyn) {
                printf("[moldyn] WARNING: forces too high / tau too small!\n");
 
        /* zero absolute time */
-       moldyn->time=0.0;
-       moldyn->total_steps=0;
+       // should have right values!
+       //moldyn->time=0.0;
+       //moldyn->total_steps=0;
 
        /* debugging, ignore */
        moldyn->debug=0;
@@ -2681,8 +2587,6 @@ int bond_analyze_process(t_moldyn *moldyn,t_atom *itom,t_atom *jtom,
        if(moldyn->check_2b_bond(moldyn,itom,jtom,bc)==FALSE)
                return 0;
 
-       d=sqrt(d);
-
        /* now count this bonding ... */
        ba=data;