-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from stan-donarise/master
matinfio: node support
- Loading branch information
Showing
11 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace $ { | ||
|
||
export const $optimade_cifplayer_lib_math = $node.mathjs as any | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace $ { | ||
|
||
export const $optimade_cifplayer_lib_spacegroups = $node['@chemistry/space-groups'] | ||
export type $optimade_cifplayer_lib_spacegroups_info = import( './_spacegroups' ).SpaceGroupInfo | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# `$optimade_cifplayer_matinfio` | ||
|
||
The module parses CIF, POSCAR or OPTIMADE structures and prepares them for visualisation. | ||
|
||
|
||
## Building | ||
|
||
```bash | ||
npm exec mam@latest optimade/cifplayer/matinfio | ||
``` | ||
|
||
The web module bundle will be in `optimade/cifplayer/matinfio/-/web.js` | ||
|
||
|
||
## Usage example | ||
|
||
```js | ||
const structure = new $optimade_cifplayer_matinfio( data ).player() | ||
``` | ||
|
||
### Parameter | ||
|
||
**`data`** | ||
|
||
- An object or string containing a structure in CIF, POSCAR or OPTIMADE format. The format will be determined automatically. | ||
|
||
### Result | ||
|
||
**`structure`** | ||
|
||
- An object of the following type: | ||
|
||
```ts | ||
type $optimade_cifplayer_matinfio_player_obj = { | ||
cell_matrix?: number[][], | ||
descr: { | ||
a: number, | ||
b: number, | ||
c: number, | ||
alpha: number, | ||
beta: number, | ||
gamma: number, | ||
symlabel?: string, | ||
}, | ||
overlayed: Record< string, string >, | ||
atoms: { | ||
fract: { | ||
x: number, | ||
y: number, | ||
z: number, | ||
} | null, | ||
x: number, | ||
y: number, | ||
z: number, | ||
c: string, //color | ||
r: number, //radius | ||
symbol: string, | ||
label: string, | ||
overlays: Record< string, string | number >, | ||
}[] | ||
sg_name: string, | ||
ng_name: number, | ||
info: string, | ||
mpds_demo: boolean, | ||
mpds_data: boolean, | ||
} | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.