Skip to content

Commit

Permalink
Merge pull request #27 from Exabyte-io/chore/SOF-6955-1
Browse files Browse the repository at this point in the history
chore/SOF-6955-1
  • Loading branch information
azech-hqs authored Sep 19, 2023
2 parents 840ff71 + e141a85 commit 6a30503
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,46 @@ npm run transpile
npm run test
```

#### How to Add New Models and Methods

The list of model and method entities is compiled from Yaml assets located in the `./assets` directory
using the `build_entities.js` script. The assets processed by this script usually involve custom Yaml
types such as `!combine` to generate several entity configurations at once.

A new model or method may be added either by extending parameters of an existing entity or by adding
a new asset file such as the following:

```yaml
!combine
name:
template: 'Model{{ "-" + parameters.example }}' # set the model name using a template

# Loop over parameters to create combinations
forEach:
- !parameter
key: parameters.example # path of where to set the property
values: ["A", "B", "C"] # values to iterate over
isOptional: true

# static configuration (same for all created entities
config:
tags:
- example_model
- tutorial
schema: !esse 'schema-id-placeholder' # add a schema using the !esse type to validate each configuration
```
The above asset file will create four model configurations, "Model-A", "Model-B", "Model-C",
and "Model". The latter entity is created due to the `isOptional` flag of the example parameter.
There are a few more options available to customize the entity asset, for instance, the `!combine` type
has an `exclusions` property where conflicting pairs of entity properties can be defined, so that
combinations of those will be avoided.

For more examples, please see the asset files in `./assets` or [code.js](https://github.com/Exabyte-io/code.js)
for the definition of Yaml types such as `!combine` or `!parameter`.



MoDe
====

Expand Down
4 changes: 2 additions & 2 deletions src/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const DFTModelTree = {
functionals: ["pz", "pw", "vwn", "other"],
},
hybrid: {
methods: { [METHODS.localorbital]: ["pople"] },
functionals: ["b3lyp"],
methods,
functionals: ["b3lyp", "hse06"],
},
other: {
methods,
Expand Down

0 comments on commit 6a30503

Please sign in to comment.