<jupyter_start><jupyter_text>HCP tracer calculationWhat follows is the calculation of the tracer correlation for an HCP crystal (ideal $c/a = \sqrt{8/3}$, $a_0 = 1$, and $\nu = 1$, all for convenience).<jupyter_code>import numpy as np
from onsager import OnsagerCalc
from onsager import crystal
import matplotlib.pyplot as plt
%matplotlib inline
HCP = crystal.Crystal.HCP(1., chemistry="ideal HCP")
print(HCP)
sitelist = HCP.sitelist(0)
vacancyjumps = HCP.jumpnetwork(0, 1.01)
for jlist in vacancyjumps:
    print('---')
    for (i,j), dx in jlist:
        print(i, '-', j, dx)
HCPdiffuser = OnsagerCalc.VacancyMediated(HCP, 0, sitelist, vacancyjumps, 1)
for state in HCPdiffuser.interactlist():
    print(state)
nu0 = 1
dE0 = 1
HCPtracer = {'preV': np.ones(1), 'eneV': np.zeros(1), 
             'preT0': np.array([nu0, nu0]), 'eneT0': np.array([dE0, dE0])}
HCPtracer.update(HCPdiffuser.maketracerpreene(**HCPtracer))
for k,v in zip(HCPtracer.keys(), HCPtracer.values()): print(k,v)
Lvv, Lss, Lsv, L1vv = HCPdiffuser.Lij(*HCPdiffuser.preene2betafree(1, **HCPtracer))<jupyter_output><empty_output><jupyter_text>Correlation coefficient = $L_\text{ss} / L_\text{sv}$ (as $L_\text{sv} = L_\text{vv}$). Should be very close to the FCC correlation coefficient of 0.78145, for this purely isotropic diffusion case.<jupyter_code>np.dot(Lss, np.linalg.inv(Lsv))
print(HCPdiffuser.GFvalues)
print(crystal.yaml.dump(HCPdiffuser.GFvalues))
diffcopy = crystal.yaml.load(crystal.yaml.dump(HCPdiffuser))
diffcopy.Lij(*diffcopy.preene2betafree(1, **HCPtracer))
print(crystal.yaml.dump(HCPtracer))<jupyter_output>eneS: !numpy.ndarray [0.0]
eneSV: !numpy.ndarray [0.0, 0.0]
eneT0: !numpy.ndarray [1, 1]
eneT1: !numpy.ndarray [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
  1.0]
eneT2: !numpy.ndarray [1.0, 1.0]
eneV: !numpy.ndarray [0.0]
preS: !numpy.ndarray [1.0]
preSV: !numpy.ndarray [1.0, 1.0]
preT0: !numpy.ndarray [1, 1]
preT1: !numpy.ndarray [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
  1.0]
preT2: !numpy.ndarray [1.0, 1.0]
preV: !numpy.ndarray [1.0]
{'fraction_non_alphanumeric': 0.17647058823529413, 'fraction_numerical': 0.058823529411764705, 'mean_word_length': 4.828651685393258, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '509043', 'license': 'MIT', 'n_tokens_mistral': 987, 'n_tokens_neox': 923, 'n_words': 201, 'path': 'examples/HCPtracer.ipynb', 'repo_name': 'DallasTrinkle/Onsager', 'size': '2074'}