Skip to content

Commit 886524a

Browse files
authored
Merge pull request #841 from janosh/crystal-nn-fingerprint-docs
Explain meaning of `'cn' | 'ops'` in `CrystalNNFingerprint.from_preset()`
2 parents 76a529b + 2dd8761 commit 886524a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

matminer/featurizers/site/fingerprint.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
import copy
55
import os
6+
from typing import Literal
67

78
import numpy as np
89
import pymatgen.analysis.local_env
@@ -372,11 +373,12 @@ class CrystalNNFingerprint(BaseFeaturizer):
372373
"""
373374

374375
@staticmethod
375-
def from_preset(preset, **kwargs):
376+
def from_preset(preset: Literal["cn", "ops"], **kwargs):
376377
"""
377378
Use preset parameters to get the fingerprint
378379
Args:
379-
preset (str): name of preset ("cn" or "ops")
380+
preset ('cn' | 'ops'): Initializes the featurizer to use coordination number ('cn') or structural
381+
order parameters like octahedral, tetrahedral ('ops').
380382
**kwargs: other settings to be passed into CrystalNN class
381383
"""
382384
if preset == "cn":

0 commit comments

Comments
 (0)