Skip to content

[WIP] Javascript (node.js and browser) bindings to chemfiles

Notifications You must be signed in to change notification settings

chemfiles/chemfiles.js

Repository files navigation

JavaScript (node and browser) bindings for the Chemfiles library

Build Status Code coverage Documentation

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.

Installation

TODO

Installation from sources

TODO

Usage example

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

Bug reports, feature requests

Please report any bug you find and any feature you may want as a github issue.

About

[WIP] Javascript (node.js and browser) bindings to chemfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages