<jupyter_start><jupyter_text>Example notebook for the functions contained in cry_calculate.py  Calculate the BSSE<jupyter_code>from crystal_functions.calculate import cry_bsse<jupyter_output><empty_output><jupyter_text>Generate a pymatgen structure (substrate+adsorbate)<jupyter_code>import sys
sys.path.insert(1, '../')

from pymatgen.core import Structure, Lattice
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.core.surface import SlabGenerator

#from cry_file_readwrite import write_gui 
import numpy as np

substrate = Structure.from_spacegroup("Fm-3m", Lattice.cubic(3.597), ["Cu"], [[0, 0, 0]])
substrate = SpacegroupAnalyzer(substrate).get_conventional_standard_structure()
substrate = SpacegroupAnalyzer(substrate).get_symmetrized_structure()


slab = SlabGenerator(substrate, (1,0,0), 5., 10., center_slab=True).get_slab()
substrate.atomic_numbers
n_symmops = len(SpacegroupAnalyzer(substrate).get_space_group_operations())
print(n_symmops/4)
print(SpacegroupAnalyzer(substrate).get_point_group_operations(cartesian=True)[3])
print(np.array(SpacegroupAnalyzer(substrate).get_point_group_operations(cartesian=True)[3].as_dict()['matrix']))
np.array(SpacegroupAnalyzer(substrate).get_point_group_operations(cartesian=True)[3].as_dict()['matrix'])[0:4,0:3]
for i in range(len(SpacegroupAnalyzer(substrate).get_space_group_operations())):
    for symmops in np.array(SpacegroupAnalyzer(substrate).get_point_group_operations(cartesian=True)[i].as_dict()['matrix'])[0:4,0:3]:    
        print('{}\n'.format(' '.join(str(np.around(n,8)) for n in symmops)))<jupyter_output>1.0 0.0 0.0

0.0 1.0 0.0

0.0 -0.0 1.0

0.0 0.0 0.0

-1.0 0.0 0.0

0.0 -1.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

-0.0 -1.0 0.0

1.0 0.0 0.0

0.0 -0.0 1.0

0.0 0.0 0.0

0.0 1.0 0.0

-1.0 -0.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

-1.0 0.0 0.0

0.0 -1.0 0.0

-0.0 -0.0 1.0

0.0 0.0 0.0

1.0 0.0 0.0

0.0 1.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

0.0 1.0 0.0

-1.0 -0.0 0.0

-0.0 -0.0 1.0

0.0 0.0 0.0

-0.0 -1.0 0.0

1.0 0.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

1.0 0.0 0.0

0.0 -1.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

-1.0 -0.0 0.0

0.0 1.0 0.0

-0.0 -0.0 1.0

0.0 0.0 0.0

0.0 -1.0 0.0

-1.0 -0.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

-0.0 1.0 0.0

1.0 0.0 0.0

0.0 -0.0 1.0

0.0 0.0 0.0

-1.0 -0.0 0.0

0.0 1.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

1.0 0.0 0.0

0.0 -1.0 0.0

0.0 -0.0 1.0

0.0 0.0 0.0

-0.0 1.0 0.0

1.0 0.0 0.0

0.0 0.0 -1.0

0.0 0.0 0.0

0.0 -1.0 0.0

-1.0 -0.0 0.0

-0.0 -0.0 1.0

0.0 0.0 0.0

-0.0 -0.0 1.0

1.0 0.0 0.0

0.0 1.0 0.0

0.0 0.0 0.0

0.0 0.0 -1.0

-1.0 -0.0 0.0

-0.0 -1.0 -0.0

0.0 0.0 0.0

-0.0 -0.0 [...]
{'fraction_non_alphanumeric': 0.18802762854950114, 'fraction_numerical': 0.1780506523407521, 'mean_word_length': 2.6512605042016806, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '237923', 'license': 'MIT', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1404, 'n_words': 296, 'path': 'examples/calculate.ipynb', 'repo_name': 'bcamino/crystal_functions', 'size': '2606'}