+ // second line -> scale
+ cnt=get_line(fd,buf,256);
+ get_max3_vals(buf,1,&scale,NULL,NULL);
+ printf("scale: %f\n",scale);
+
+ // third line -> X
+ cnt=get_line(fd,buf,256);
+ get_max3_vals(buf,3,&X1,&X2,&X3);
+ printf("X: %f %f %f\n",X1,X2,X3);
+
+ // 4th line -> Y
+ cnt=get_line(fd,buf,256);
+ get_max3_vals(buf,3,&Y1,&Y2,&Y3);
+ printf("Y: %f %f %f\n",Y1,Y2,Y3);
+
+ // 5th line -> Z
+ cnt=get_line(fd,buf,256);
+ get_max3_vals(buf,3,&Z1,&Z2,&Z3);
+ printf("Z: %f %f %f\n",Z1,Z2,Z3);
+
+ // 6th line -> nsi + nc = ntot
+ cnt=get_line(fd,buf,256);
+ get_2_ints(buf,&nsi,&nc);
+ ntot=nsi+nc;
+ printf("Si: %d - C: %d - tot: %d\n",nsi,nc,ntot);
+
+ // 7th line
+ cnt=get_line(fd,buf,256);
+
+ // 8th line
+ cnt=get_line(fd,buf,256);
+
+ // read in atoms
+ count=0;
+ while(count<ntot) {
+ cnt=get_line(fd,buf,256);
+ if(cnt<=0) {
+ printf("Should never happen!\n");
+ return cnt;
+ }
+
+ atom=realloc(atom,(count+1)*sizeof(t_atom));
+ if(count<nsi)
+ atom[count].type='S';
+ else
+ atom[count].type='C';
+
+ get_max3_vals(buf,3,
+ &(atom[count].x),
+ &(atom[count].y),
+ &(atom[count].z));
+
+ count+=1;
+ }
+
+ printf("i: read in %d atoms ...\n",count);
+
+ // calc pc