Skip to content

Commit

Permalink
remove fp from db loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksund committed Oct 25, 2024
1 parent 18ce966 commit 3e35b93
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/simmate/database/base_data_types/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,14 @@ def _from_toolkit(
# prototype_name = prototype[0]["tags"]["mineral"] if prototype else None
# Alternatively, add as a method to the table, similar to
# the "update_all_stabilities" for thermodynamics

# TODO:
# Generate fingerprint
featurizer = PartialCrystalNNFingerprint.get_featurizer(
composition=structure.composition
)
fingerprint = featurizer.featurize(structure)
# featurizer = PartialCrystalNNFingerprint.get_featurizer(
# composition=structure.composition
# )
# fingerprint = featurizer.featurize(structure)

# Given a pymatgen structure object, this will return a database structure
# object, but will NOT save it to the database yet. The kwargs input
# is only if you inherit from this class and add extra fields.
Expand Down Expand Up @@ -406,7 +409,7 @@ def _from_toolkit(
formula_full=structure.composition.formula,
formula_reduced=structure.composition.reduced_formula,
formula_anonymous=structure.composition.anonymized_formula,
fingerprint_crystalnn=list(fingerprint),
# fingerprint_crystalnn=list(fingerprint),
# prototype=prototype_name,
**kwargs, # this allows subclasses to add fields with ease
)
Expand Down

0 comments on commit 3e35b93

Please sign in to comment.