npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@exabyte-io/materials-designer

v2024.2.1-0

Published

Materials Designer

Downloads

205

Readme

npm version License: Apache

Materials Designer

A standalone React/Redux application for atomistic design of material structures. Deployed within the Mat3ra.com platform as explained in the corresponding part of its documentatation here. Can be used as a library in other applications.

Try Materials Designer in action here

Materials Designer in action

Functionality

As below:

  • Input/Output Menu
    • Export materials in JSON/POSCAR formats
  • Edit Menu
    • Undo/Redo/Reset/Clone operations
  • View
    • Fullscreen mode
    • Multi-material Editor (combining multiple materials into one)
  • Advanced Menu
    • Creating supercells
    • Creating surfaces/slabs
    • Creating combinatorial sets
    • Creating interpolated sets
  • Basis Editor
    • Adding/Removing/Modifying sites
    • Adding/Removing/Modifying atomic constraints
    • Switching Crystal/Cartesian units
  • Lattice Editor
    • Adjusting lattice units/types/parameters
  • 3D Editor
    • Visualizing materials
      • Rotation
      • Repetition/Radius
      • Toggle axes
    • Adjusting materials
      • add/remove/select atoms
      • multiple selection with drag-and-drop

Installation

Tested with Node v14.19.3. The corresponding version(s) of npm should be fine, tested with v6.4.19. We recommend using nvm for version management.

From source

Materials Designer can be installed from source as follows:

git clone [email protected]:Exabyte-io/materials-designer.git

Or use https, if no SSH authentication is set up with GitHub:

git clone https://github.com/Exabyte-io/materials-designer.git

then start the application:

cd materials-designer
sh run-application.sh

Some files might not be downloaded by git clone or git pull commands if your system doesn't have git-lfs installed. To fix this run (on OSX):

brew install git-lfs
# after successful installation run next command in the root directory of this repository:
git lfs install

Open http://localhost:3001 to view the application in the browser

From Docker

See Docker Files section below.

Development

Execute the following commands when running the application in development mode.

npm install
npm start

Tests

Start the application and then run one of the below commands to run the tests.

This will require proper java v1.8 installed, please verify it with command java -version. If version does not mach use next commands to install (on OSX):

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8
# set to path
export PATH=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin:$PATH

To run all tests:

sh run-tests.sh

To run a specific test feature, pass it's relative path as option:

sh run-tests.sh -f=menu/advanced/create-supercell.feature       # to run a specific test

TODO list

Desirable features/fixes for implementation:

  • add tests for all the functionality listed above. We only tests advanced operations at current.
  • switch color back to white when the material is back to original after editing
  • add logic for Interstitials, Vacancy concentrations in combinatorial sets
  • fix modal dialog exceptions for AdvancedGeometryDialog
  • add line numbers to SourceEditor
  • remove updateIndex action when index is the same
  • show the total number of materials in set and the current index
  • fix fullscreen support

Dependencies

This package depends on Made.js and Wave.js. See package.json for the full list.

CI Docker files

There are two docker files used for testing in CI. In principle, we could use more targeted base images for the use case (e.g. node or selenium images), but we want to verify correct behavior on a specific CentOS version. The first dockerfiles/centos/Dockerfile builds and runs the application. The second dockerfiles/test/Dockerfile provisions and runs the tests. The test image uses the centos image as a base and is related by the entrypoint.sh script. It is targeted for CI so if you are editing the entrypoint.sh you may need to re-build both containers for your changes to work. It can also be useful to comment out the ENTRYPOINT in the centos dockerfile as well as the CMD in the test dockerfile in order to easily run and debug both containers. There is also a docker-compose.yml file which can be used for local building and testing. Provided docker-compose is installed, it can be used like so:

docker-compose build materials-designer
docker-compose build materials-designer-test

docker-compose up -d materials-designer
sleep 30  # let the app actually start
docker-compose run materials-designer-test

Cove.js local development

In case you need to link Cove.js into the app for local development you need

  1. Add local path of Cove.js to package.json
    "@exabyte-io/code.js": "file:../../cove.js"
  1. Run the app
    npm start

If you need to re-link it again, remove node_modules in cove.js and the app, run npm install, then run npm start again.

Links

  1. Create React App, GitHub Repository