A tool for creating macromolecular images and 3D models. It is based on molrender, which is based on Mol*. It can create PNG, JPEG, OBJ, GLB, and USDZ files.
The tool is being used on MolAR to create 3D models of proteins for augmented reality.
molrender3d model [options] IN OUT MODEL_INDEX
molrender3d assembly [options] IN OUT ASSEMBLY_INDEX
molrender3d chain [options] IN OUT CHAIN_NAME
molrender3d models [options] IN OUT
molrender3d all [options] IN OUT
The options
are
--width WIDTH image height
--height HEIGHT image width
--format FORMAT image format (png, jpeg, obj, glb, or usdz)
For example, the following command will create 6vxx.obj
in the out
folder. The 6vxx.cif
file (structure data of SARS-CoV-2 spike glycoprotein) can be downloaded from https://files.rcsb.org/download/6vxx.cif.
molrender3d assembly 6vxx.cif out 0 --format obj
npm install
npm run build
npm run watch
DEBUG=molstar npm run watch
NODE_ENV=production npm run build
npm run build
npm install -g
Just open an issue or make a pull request. All contributions are welcome.