<jupyter_start><jupyter_text>Calculation of Steinhardt parameters using pyscalImport statements<jupyter_code>import pyscal.core as pc
import pyscal.crystal_structures as pcs
from ase.build import bulk
import numpy as np<jupyter_output><empty_output><jupyter_text>Function to calculate and print q values. Structures will be created using both ase and pyscal crystal structures module.<jupyter_code>def calc_q_ase(element=None, reps=None):
    ob = bulk(element).repeat(reps)
    sys = pc.System()
    sys.read_inputfile(ob, format="ase")
    sys.find_neighbors(method="cutoff", cutoff=0)
    sys.calculate_q([4,6,8,10,12])
    q = sys.get_qvals([4, 6, 8, 10, 12])
    print("q4: %.2f, q6: %.2f, q8: %.2f, q10: %.2f, q12: %.2f"%(np.mean(q[0]),
        np.mean(q[1]), np.mean(q[2]), np.mean(q[3]), np.mean(q[4])))
def calc_q_pcs(structure=None, alat=None, reps=None, ca_ratio=1.633):
    atoms, box = pcs.make_crystal(structure=structure,
        lattice_constant=alat, repetitions=reps, ca_ratio=ca_ratio)
    sys = pc.System()
    sys.box = box
    sys.atoms = atoms
    sys.find_neighbors(method="cutoff", cutoff=0)
    sys.calculate_q([4,6,8,10,12])
    q = sys.get_qvals([4, 6, 8, 10, 12])
    print("q4: %.2f, q6: %.2f, q8: %.2f, q10: %.2f, q12: %.2f"%(np.mean(q[0]),
        np.mean(q[1]), np.mean(q[2]), np.mean(q[3]), np.mean(q[4])))<jupyter_output><empty_output><jupyter_text>BCC<jupyter_code>calc_q_ase(element="Nb", reps=(1,1,1))
calc_q_ase(element="Nb", reps=(2,2,2))
calc_q_ase(element="Nb", reps=(3,3,3))
calc_q_ase(element="Nb", reps=(3,3,2))
calc_q_pcs(structure="bcc", alat=4.00, reps=(1,1,1))
calc_q_pcs(structure="bcc", alat=4.00, reps=(2,2,2))
calc_q_pcs(structure="bcc", alat=4.00, reps=(3,3,3))
calc_q_pcs(structure="bcc", alat=4.00, reps=(3,3,2))<jupyter_output>q4: 0.04, q6: 0.51, q8: 0.43, q10: 0.20, q12: 0.40<jupyter_text>FCC<jupyter_code>calc_q_ase(element="Al", reps=(1,1,1))
calc_q_ase(element="Al", reps=(2,2,2))
calc_q_ase(element="Al", reps=(3,3,3))
calc_q_ase(element="Al", reps=(3,3,2))
calc_q_pcs(structure="fcc", alat=4.00, reps=(1,1,1))
calc_q_pcs(structure="fcc", alat=4.00, reps=(2,2,2))
calc_q_pcs(structure="fcc", alat=4.00, reps=(3,3,3))
calc_q_pcs(structure="fcc", alat=4.00, reps=(3,3,2))<jupyter_output>q4: 0.19, q6: 0.57, q8: 0.40, q10: 0.01, q12: 0.60<jupyter_text>HCP<jupyter_code>calc_q_ase(element="Mg", reps=(1,1,1))
calc_q_ase(element="Mg", reps=(2,2,2))
calc_q_ase(element="Mg", reps=(3,3,3))
calc_q_ase(element="Mg", reps=(3,3,2))
calc_q_pcs(structure="hcp", alat=4.00, reps=(1,1,1), ca_ratio=1.624)
calc_q_pcs(structure="hcp", alat=4.00, reps=(2,2,2), ca_ratio=1.624)
calc_q_pcs(structure="hcp", alat=4.00, reps=(3,3,3), ca_ratio=1.624)
calc_q_pcs(structure="hcp", alat=4.00, reps=(3,3,2), ca_ratio=1.624)<jupyter_output>q4: 0.09, q6: 0.48, q8: 0.32, q10: 0.01, q12: 0.56<jupyter_text>Diamond<jupyter_code>calc_q_ase(element="Si", reps=(1,1,1))
calc_q_ase(element="Si", reps=(2,2,2))
calc_q_ase(element="Si", reps=(3,3,3))
calc_q_ase(element="Si", reps=(3,3,2))
calc_q_pcs(structure="diamond", alat=4.00, reps=(1,1,1))
calc_q_pcs(structure="diamond", alat=4.00, reps=(2,2,2))
calc_q_pcs(structure="diamond", alat=4.00, reps=(3,3,3))
calc_q_pcs(structure="diamond", alat=4.00, reps=(3,3,2))<jupyter_output>q4: 0.51, q6: 0.63, q8: 0.21, q10: 0.65, q12: 0.42
{'fraction_non_alphanumeric': 0.22145015105740182, 'fraction_numerical': 0.09546827794561934, 'mean_word_length': 7.319095477386934, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '488119', 'license': 'MIT', 'n_tokens_mistral': 1727, 'n_tokens_neox': 1580, 'n_words': 227, 'path': 'notebooks/test.ipynb', 'repo_name': 'srmnitc/pyscal_boo_test', 'size': '3310'}