Chemfiles is a library for reading and writing molecular trajectory files. These files are created by your favorite theoretical chemistry program, and contains information about atomic or residues names and positions. Chemfiles offers abstraction on top of these formats, and a consistent interface for loading and saving data to these files.
This repository contains the JavaScript/TypeScript binding for the chemfiles library. They use a version of the chemfiles library compiled to WebAssembly (WASM) to target web browsers and node.js alike.
TODO
TODO
Here is a simple usage example of chemfiles on a node.js environment:
const chemfiles = require('chemfiles');
const trajectory = new chemfiles.Trajectory("filename.xyz");
const frame = new chemfiles.Frame();
trajectory.read(frame);
console.log(`There are ${frame.natoms} atoms in the frame`)
const positions = frame.positions;
// Do awesome things with the positions here !
Here is the same example in a web browser
// TODO
Please report any bug you find and any feature you may want as a github issue.