pthread_mutex_init(&emutex,NULL);
#endif
+#ifdef CONSTRAINT_110_5832
+ printf("\n\n\nWARNING! WARNING! WARNING!\n\n\n");
+ printf("\n\n\n!! -- constraints enabled -- !!\n\n\n");
+#endif
return 0;
}
}
+ /* writing a final save file! */
+ if(s) {
+ snprintf(dir,128,"%s/s-final.save",moldyn->vlsdir);
+ fd=open(dir,O_WRONLY|O_TRUNC|O_CREAT,S_IRUSR|S_IWUSR);
+ if(fd<0) perror("[moldyn] save fd open");
+ else {
+ write(fd,moldyn,sizeof(t_moldyn));
+ write(fd,moldyn->atom,
+ moldyn->count*sizeof(t_atom));
+ }
+ close(fd);
+ }
+ /* writing a final visual file! */
+ if(a)
+ visual_atoms(moldyn);
+
return 0;
}
tau=moldyn->tau;
tau_square=moldyn->tau_square;
+#ifdef CONSTRAINT_110_5832
+ if(count==5833) {
+ atom[5832].f.x=0.5*(atom[5832].f.x-atom[5832].f.y);
+ atom[5832].f.y=-atom[5832].f.x;
+ }
+#endif
for(i=0;i<count;i++) {
/* check whether fixed atom */
if(atom[i].attr&ATOM_ATTR_FP)
/* new positions */
h=0.5/atom[i].mass;
v3_scale(&delta,&(atom[i].v),tau);
+#ifdef CONSTRAINT_110_5832
+ if(i==5832) {
+ delta.y=-delta.x;
+ }
+#endif
v3_add(&(atom[i].r),&(atom[i].r),&delta);
v3_scale(&delta,&(atom[i].f),h*tau_square);
+#ifdef CONSTRAINT_110_5832
+ if(i==5832) {
+ delta.y=-delta.x;
+ }
+#endif
v3_add(&(atom[i].r),&(atom[i].r),&delta);
//check_per_bound_and_care_for_pbc(moldyn,&(atom[i]));
check_per_bound(moldyn,&(atom[i].r));
albe_potential_force_calc(moldyn);
#endif
+#ifdef CONSTRAINT_110_5832
+ if(count==5833) {
+ atom[5832].f.x=0.5*(atom[5832].f.x-atom[5832].f.y);
+ atom[5832].f.y=-atom[5832].f.x;
+ }
+#endif
for(i=0;i<count;i++) {
/* check whether fixed atom */
if(atom[i].attr&ATOM_ATTR_FP)
if(fsize!=sizeof(t_moldyn)+size) {
corr=fsize-sizeof(t_moldyn)-size;
printf("[moldyn] WARNING: lsf (illegal file size)\n");
- printf(" moifying offset:\n");
+ printf(" modifying offset:\n");
printf(" - current pos: %d\n",sizeof(t_moldyn));
printf(" - atom size: %d\n",size);
printf(" - file size: %d\n",fsize);