+ hp=hook_params;
+
+ /* quit */
+ if(hp->quit)
+ return 0;
+
+ /* switch on t scaling */
+ if(md->schedule.count==0)
+ set_pt_scale(md,0,0,T_SCALE_BERENDSEN,100.0);
+
+ /* last schedule add if there is enough carbon inside */
+ if(hp->a_count==(INJECT*NR_ATOMS)) {
+ hp->quit=1;
+ moldyn_add_schedule(md,10000,1.0);
+ return 0;
+ }
+
+ /* more relaxing time for too high temperatures */
+ if(md->t-md->t_ref>TC) {
+ moldyn_add_schedule(md,100,1.0);
+ return 0;
+ }