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

Go to the source code of this file.

Functions

void DumpBonds ()
 

Function Documentation

◆ DumpBonds()

void DumpBonds ( )

Definition at line 24 of file DumpBonds.c.

24 {
25 int n;
26 //Trajectory file in LAMMPS dump format for OVITO visualization
27 fprintf(fpbond, "ITEM: TIMESTEP\n");
28 fprintf(fpbond, "%lf\n",timeNow);
29 fprintf(fpbond, "ITEM: NUMBER OF ENTRIES\n");
30 fprintf(fpbond, "%d\n",nBond);
31 fprintf(fpbond, "ITEM: BOX BOUNDS pp ff pp\n");
32 fprintf(fpbond, "%lf %lf xlo xhi\n", -regionH[1], regionH[1]);
33 fprintf(fpbond, "%lf %lf ylo yhi\n", -regionH[2], regionH[2]);
34 fprintf(fpbond, "%lf %lf zlo zhi\n", -0.1, 0.1);
35 fprintf(fpbond, "ITEM: ENTRIES BondID, BondType, atom1 atom2 BondLength BondLengthEqul nodeDragx1 nodeDragy1\n");
36
37 for(n=1; n<=nBond; n++)
38 fprintf(fpbond, "%d %d %d %d %0.16lf %0.16lf %0.16lf %0.16lf\n", BondID[n], BondType[n], atom1[n], atom2[n],
39 BondLength[n], ro[n], nodeDragx[atom1[n]], nodeDragy[atom1[n]]);
40 }
int * BondID
int * atom2
Definition global.h:36
int * BondType
Definition global.h:37
double * ro
Definition global.h:38
double * BondLength
Definition global.h:39
int * atom1
FILE * fpbond
int nBond
double * nodeDragy
Definition global.h:42
double timeNow
Definition global.h:20
double regionH[2+1]
Definition global.h:20
double * nodeDragx
Definition global.h:42

References atom1, atom2, BondID, BondLength, BondType, fpbond, nBond, nodeDragx, nodeDragy, regionH, ro, and timeNow.

Referenced by main().

+ Here is the caller graph for this function: