diff --git a/jarvis/__init__.py b/jarvis/__init__.py index 34d2ef41..a9f5c29d 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,6 +1,6 @@ """Version number.""" -__version__ = "2024.8.30" +__version__ = "2024.9.30" import os diff --git a/jarvis/core/atoms.py b/jarvis/core/atoms.py index a31a1e38..d12ebe4b 100644 --- a/jarvis/core/atoms.py +++ b/jarvis/core/atoms.py @@ -1438,6 +1438,9 @@ def hook(model, input, output): from alignn.graphs import Graph from alignn.pretrained import get_figshare_model + import torch + + device = torch.device("cuda" if torch.cuda.is_available() else "cpu") g, lg = Graph.atom_dgl_multigraph( self, @@ -1452,6 +1455,8 @@ def hook(model, input, output): model = get_figshare_model( model_name="jv_formation_energy_peratom_alignn" ) + g.to(device) + lg.to(device) h = get_val(model, g, lg) return h @@ -1571,11 +1576,15 @@ def describe( cutoff=4, take_n_bonds=2, include_spg=True, + include_mineral_name=False, ): """Describe for NLP applications.""" from jarvis.analysis.diffraction.xrd import XRD - min_name = self.get_minaral_name() + if include_mineral_name: + min_name = self.get_minaral_name() + else: + min_name = "na" if include_spg: from jarvis.analysis.structure.spacegroup import Spacegroup3D @@ -1713,7 +1722,8 @@ def describe( + struct_info["wyckoff"] + "." ) - if min_name is not None: + if min_name != "na": + # if min_name is not None: line3 = ( chem_info["atomic_formula"] + " is " diff --git a/setup.py b/setup.py index 47400a7a..4f2768a2 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="jarvis-tools", - version="2024.8.30", + version="2024.9.30", long_description=long_d, install_requires=[ "numpy>=1.20.1",