Lemina
A molecular dynamics package for network, granular material and point particles with a range of interaction potential.
 
Loading...
Searching...
No Matches
Trajectory.c File Reference
#include <stdio.h>
#include "global.h"
+ Include dependency graph for Trajectory.c:

Go to the source code of this file.

Functions

void Trajectory ()
 

Function Documentation

◆ Trajectory()

void Trajectory ( )

Definition at line 25 of file Trajectory.c.

25 {
26 int n;
27 //Trajectory file in LAMMPS dump format for OVITO visualization
28 fprintf(fpxyz, "ITEM: TIMESTEP\n");
29 fprintf(fpxyz, "%lf\n",timeNow);
30 fprintf(fpxyz, "ITEM: NUMBER OF ATOMS\n");
31 fprintf(fpxyz, "%d\n",nAtom);
32 fprintf(fpxyz, "ITEM: BOX BOUNDS pp ff pp\n");
33 fprintf(fpxyz, "%lf %lf xlo xhi\n", -regionH[1], regionH[1]);
34 fprintf(fpxyz, "%lf %lf ylo yhi\n", -regionH[2], regionH[2]);
35 fprintf(fpxyz, "%lf %lf zlo zhi\n", -0.1, 0.1);
36 fprintf(fpxyz, "ITEM: ATOMS id mol type radius x y vx vy fx fy\n");
37 for(n=1; n<=nAtom; n++)
38 fprintf(fpxyz, "%d\t %d\t %d\t %0.2lf\t %0.16lf\t %0.16lf\t %0.16lf\t %0.16lf\t %0.16lf\t %0.16lf\n",
39 atomID[n], molID[n], atomType[n], atomRadius[n], rx[n], ry[n], vx[n], vy[n], fx[n], fy[n]);
40}
int nAtom
Definition global.h:24
FILE * fpxyz
int * molID
double * vx
Definition global.h:17
double * rx
double * fy
Definition global.h:17
double * atomRadius
double timeNow
Definition global.h:20
int * atomType
double * vy
Definition global.h:17
double regionH[2+1]
Definition global.h:20
int * atomID
double * fx
Definition global.h:17
double * ry
Definition global.h:17

References atomID, atomRadius, atomType, fpxyz, fx, fy, molID, nAtom, regionH, rx, ry, timeNow, vx, and vy.

Referenced by main().

+ Here is the caller graph for this function: