From 6885c894b0126f842676ba312ae574fb11d7e439 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Tue, 4 Apr 2023 14:26:56 -0400 Subject: [PATCH 1/2] Add simple cubic material --- src/made.js | 3 ++- src/material.js | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/made.js b/src/made.js index 6d4c1fef..0d6270d5 100644 --- a/src/made.js +++ b/src/made.js @@ -5,7 +5,7 @@ import { AtomicConstraints } from "./constraints/constraints"; import { Lattice, nonPeriodicLatticeScalingFactor } from "./lattice/lattice"; import { ReciprocalLattice } from "./lattice/reciprocal/lattice_reciprocal"; import { DEFAULT_LATTICE_UNITS, LATTICE_TYPE_CONFIGS } from "./lattice/types"; -import { defaultMaterialConfig, Material } from "./material"; +import { defaultMaterialConfig, Material, simpleBasisMaterialConfig } from "./material"; import MadeMath from "./math"; import parsers from "./parsers/parsers"; import tools from "./tools/index"; @@ -19,6 +19,7 @@ export const Made = { Material, defaultMaterialConfig, + simpleBasisMaterialConfig, Lattice, nonPeriodicLatticeScalingFactor, ReciprocalLattice, diff --git a/src/material.js b/src/material.js index 4129ae07..af13c979 100644 --- a/src/material.js +++ b/src/material.js @@ -14,6 +14,47 @@ import { LATTICE_TYPE } from "./lattice/types"; import parsers from "./parsers/parsers"; import supercellTools from "./tools/supercell"; +export const simpleBasisMaterialConfig = { + name: "Silicon Cubic", + basis: { + elements: [ + { + id: 1, + value: "Si", + }, + { + id: 2, + value: "Si", + }, + ], + coordinates: [ + { + id: 1, + value: [0.0, 0.0, 0.0], + }, + { + id: 2, + value: [0.25, 0.25, 0.25], + }, + ], + units: ATOMIC_COORD_UNITS.crystal, + }, + lattice: { + // Conventional cubic cell + type: LATTICE_TYPE.CUB, + a: 5.43, + b: 5.43, + c: 5.43, + alpha: 90, + beta: 90, + gamma: 90, + units: { + length: units.angstrom, + angle: units.degree, + }, + }, +}; + export const defaultMaterialConfig = { name: "Silicon FCC", basis: { From cdc0bcf3dfbb221b1b6b62ac6e25a48b0f974ff5 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Tue, 4 Apr 2023 21:38:21 -0400 Subject: [PATCH 2/2] Use MP-10 material for simple cubic --- src/material.js | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/material.js b/src/material.js index af13c979..e00296aa 100644 --- a/src/material.js +++ b/src/material.js @@ -15,26 +15,19 @@ import parsers from "./parsers/parsers"; import supercellTools from "./tools/supercell"; export const simpleBasisMaterialConfig = { - name: "Silicon Cubic", + name: "As Simple Cubic", + description: "https://materialsproject.org/materials/mp-10", basis: { elements: [ { id: 1, - value: "Si", - }, - { - id: 2, - value: "Si", + value: "As", }, ], coordinates: [ { id: 1, - value: [0.0, 0.0, 0.0], - }, - { - id: 2, - value: [0.25, 0.25, 0.25], + value: [0.5, 0.5, 0.5], }, ], units: ATOMIC_COORD_UNITS.crystal, @@ -42,9 +35,9 @@ export const simpleBasisMaterialConfig = { lattice: { // Conventional cubic cell type: LATTICE_TYPE.CUB, - a: 5.43, - b: 5.43, - c: 5.43, + a: 2.7, + b: 2.7, + c: 2.7, alpha: 90, beta: 90, gamma: 90,