Skip to content

Commit

Permalink
Merge pull request #841 from janosh/crystal-nn-fingerprint-docs
Browse files Browse the repository at this point in the history
Explain meaning of `'cn' | 'ops'` in `CrystalNNFingerprint.from_preset()`
  • Loading branch information
computron authored Jul 25, 2022
2 parents 76a529b + 2dd8761 commit 886524a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions matminer/featurizers/site/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import copy
import os
from typing import Literal

import numpy as np
import pymatgen.analysis.local_env
Expand Down Expand Up @@ -372,11 +373,12 @@ class CrystalNNFingerprint(BaseFeaturizer):
"""

@staticmethod
def from_preset(preset, **kwargs):
def from_preset(preset: Literal["cn", "ops"], **kwargs):
"""
Use preset parameters to get the fingerprint
Args:
preset (str): name of preset ("cn" or "ops")
preset ('cn' | 'ops'): Initializes the featurizer to use coordination number ('cn') or structural
order parameters like octahedral, tetrahedral ('ops').
**kwargs: other settings to be passed into CrystalNN class
"""
if preset == "cn":
Expand Down

0 comments on commit 886524a

Please sign in to comment.