Skip to content

Commit

Permalink
Add examples to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Mar 15, 2024
1 parent 4da114a commit b2f3367
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Tools for machine learnt interatomic potentials

The code relies heavily on ASE, unless something else is mentioned.


## Development

1. Install [poetry](https://python-poetry.org/docs/#installation)
Expand Down Expand Up @@ -61,6 +60,41 @@ To prevent poetry downgrading ASE when installing in future, add the commit to p
poetry add git+https://gitlab.com:ase/ase.git#b31569210d739bd12c8ad2b6ec0290108e049eea
```

## Examples

Perform a single point calcuation:
```shell
janus singlepoint --struct tests/data/NaCl.cif
```

This will calculate the energy, stress and forces and save this in `NaCl-results.xyz`, in addition to generating a log file, `singlepoint.log`.

Additional options may be specified. For example:

```shell
janus singlepoint --struct tests/data/NaCl.cif --property energy --arch mace_mp --calc-kwargs "{'model' : './tests/models/mace_mp_small.model'}" --log './example.log' --write-kwargs "{'filename': './example.xyz'}"
```

This defines the MLIP architecture and path to the saved model, as well as changing where the log and results files are saved.

Note: the MACE calculator currently returns energy, forces and stress together, so in this case the choice of property will not change the output.


Perform geometry optimization:
```shell
janus geomopt --struct tests/data/H2O.cif
```

This will calculate optimize the atomic positions and save the resulting structure in `H2O-opt.xyz`, in addition to generating a log file, `geomopt.log`.

Additional options may be specified. This shares most options with `singlepoint`, as well as a few additional options, such as:

```shell
janus geomopt --struct tests/data/NaCl.cif --fully-opt --vectors-only --traj 'NaCl-traj.xyz'
```

This allows the cell to be optimised, allowing only hydrostatic deformation, and saves the optimization trajector in addition to the final structure and log.

## License

[BSD 3-Clause License](LICENSE)
Expand Down

0 comments on commit b2f3367

Please sign in to comment.