Crates.io | castep_model_generator_backend |
lib.rs | castep_model_generator_backend |
version | 2.1.3 |
source | src |
created_at | 2022-10-14 05:11:47.586199 |
updated_at | 2023-09-19 09:34:56.809848 |
description | A rust-written backend lib for edit and generation of lattice 3D-models compatible with CASTEP and Materials Studio. |
homepage | https://github.com/TonyWu20/castep-model-generator-backend |
repository | https://github.com/TonyWu20/castep-model-generator-backend |
max_upload_size | |
id | 687945 |
size | 112,658 |
A rust-written backend lib for edit and generation of lattice 3D-models compatible with CASTEP
and Materials Studio
.
This library is 100% written in rust
. Currently, it has the following features:
CASTEP
task, supported by castep-model-corerayon
.
YAML
format files.YAML
filesThis lib is designed to be controlled with specific YAML
files.
You can also hardcode the necessary information in your crate.
YAML
file for project level control provides the following fields:base_model_loc
: path to the base model msi
file. This lattice model is used for the consequent batch editing and adsorbate placement.element_table_loc
: path to the element table YAML
file. It will include the elements that will be involved in your project.adsorbate_table_loc
: path to the adsorbate information YAML
file. It records the necessary information to deal with the placement of adsorbates.potentials_loc
: path to the CASTEP
potential files directory.export_loc
: path to export your results.coord_sites
: An array recording the target coordination sites that will be used in your lattice models. It has the following format for example:
coord_sites:
- name: c1
atom_id: 41
- name: c2
atom_id: 42
The name
field is for naming your exported models. The atom_id
field is consistent with the id in msi
file, which is one-indexed.coord_cases
: You will describe the possible coordination cases between the lattice and adsorbates. Currently, the library is designed to handle cases with coordination atoms up to two. For example:
coord_cases:
- name: double
cases: [[41,42], [42,54], [54,53], [53,52], [41, 40], [41, 73], [42, 73]]
- name: single
cases: [[41, null], [42, null], [54, null], [53, null], [52, null], [40, null], [73, null]]
This YAML
file describes the necessary information about the adsorbate, which is key to the placement workflow of adsorbates onto the lattice.
Example structures:
directory: C2_pathways_ads
Adsorbates:
- name: CO
coordAtomIds: [1]
stemAtomIds: [1,2]
# planeAtomIds missing since it has only two atoms
# plane_angle missing since it has only two atoms
stem_coord_angle: 90.0
bSym: false
upperAtomId: 2
atomNums: 2
pathName: ethylene
- name: CHO
coordAtomIds: [1]
stemAtomIds: [2, 3]
planeAtomIds: [1, 2, 3]
plane_angle: 90.0
stem_coord_angle: 90.0
bSym: false
upperAtomId: 2
atomNums: 3
pathName: ethylene
The directory
field tells the code where to locate the adsorbate msi
files. The pathName
field helps the code to find the adsorbate: Currently this lib is designed to find the adsorbate according to the path: ./{directory}/{pathName}_path/{adsorbate_name}.msi
.