Utilize the power of HTML5 and PlotlyJS to build a lightweight molecular dynamics viewer.
This is a samll application for visualize the xyz file. You may download an example xyz file here.
This application will generate a standalone html file for the animation with just the standard gcc compiler and without further dependence. The motivation of creating this project, is because the software VMD(a xyz file viewer) was not compatible with the Mac OS X 10.15 when it released. Therefore this project is launched as an alternative.
- Download the C header file, xyzViewer.h
- Include the header file in your C source code, and call the API:
// Here is an example
// The xyzViewer.h will use both stdlib.h and math.h. Please include them.
#includes <stdio.h>
#includes <stdlib.h>
#includes <math.h>
#includes "xyzViewer.h"
int main( ) {
// Here, the first arguement "example.xyz" is the path to your xyz file;
// the second arguement "example.html" is the path of your output file.
xyzViewer( "example.xyz", "example.html" );
return 0;
}