Skip to content

an illustration that depicts the management of a crystal database

Notifications You must be signed in to change notification settings

Bin-Cao/CrystalXRD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ebebaef · Sep 16, 2024

History

16 Commits
Aug 2, 2024
Aug 2, 2024
Sep 16, 2024
Sep 6, 2024
Jun 22, 2024
Aug 2, 2024
Sep 8, 2024
Sep 6, 2024

Repository files navigation

CrystalXRD project

An illustration that depicts the management of a crystal database.

Crystal Database (link)

The CryDB.db is a crystal database that contains 723,158 pieces of crystals:

  • 154,718 crystals from the MP dataset, March 8, 2024
  • 55,723 crystals from the Jarvis dataset, March 8, 2024
  • 512,717 crystals from the COD dataset, May 8, 2024

demo.db

The demo.db shared here is a demo for illustrating the toolkit to manage the database.

Toolkit (see code.ipynb)

1. Show and Query Data

To show and query each data entry, use the CryDBkit package:

from CryDBkit import website

website.show('demo.db')

2. Graph Embedding of Each Data Entry

To perform graph embedding on each data entry, use the Crylearn package:

Python==3.9.19

from Crylearn import cry2graph
from ase.db import connect

database = connect('demo.db')
entry_id = 1

node_embedding, _, dis_matrix, XRDpattern = cry2graph.parser(database, entry_id).get(model='Simulation')

Parse the crystal by lattice cell. Each atom contained in the lattice is a node with a 106-dimensional embedding (N * 106). The distance between any pair of nodes is given in the distance matrix (N * N). XRDpattern is the simulated diffraction pattern of the crystal.

  • node_embedding (np.ndarray): The node embeddings, 106-dimensional.
  • distance_matrix (np.ndarray): The distance matrix in Cartesian coordinates.
  • XRDpattern (np.ndarray): Global information about the graph, 3501-dimensional.

About

an illustration that depicts the management of a crystal database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published