memset(file,0,128+8);
sprintf(file,"%s.scr",v->fb);
- v->fd=open(file,O_WRONLY);
+ v->fd=open(file,O_WRONLY|O_CREAT|O_TRUNC);
if(v->fd<0) {
perror("open visual fd");
return -1;
};
sprintf(file,"%s-%.15f.xyz",v->fb,time);
- fd=open(file,O_WRONLY);
+ fd=open(file,O_WRONLY|O_CREAT|O_TRUNC);
if(fd<0) {
perror("open visual save file fd");
return -1;
/* script file update */
dprintf(v->fd,"load xyz %s\n",file);
dprintf(v->fd,"spacefill 200\n");
- dprintf(v->fd,"rotate x 11\n");
- dprintf(v->fd,"rotate y 13\n");
+ //dprintf(v->fd,"rotate x 100\n");
+ //dprintf(v->fd,"rotate y 10\n");
dprintf(v->fd,"set ambient 20\n");
dprintf(v->fd,"set specular on\n");
sprintf(file,"%s-%.15f.ppm",v->fb,time);
dprintf(v->fd,"zap\n");
/* write the actual data file */
- dprintf(fd,"Atoms at time %.15f\n",time);
dprintf(fd,"%d\n",n);
+ dprintf(fd,"atoms at time %.15f\n",time);
for(i=0;i<n;i++)
dprintf(fd,"%s %f %f %f\n",pse[atom[i].element],
atom[i].r.x,atom[i].r.y,atom[i].r.z);