<jupyter_start><jupyter_text>TODO `VAEShell`:   Utilities: Usage: - Figure out how to access the trained encoder and latent space         - Is this simply taking the latent space out-put during VAE reconstruction of the structure? If so, then a separate class isn't needed. Only a separate function that stores the encoding. This would exist in the `RNNEncoderDecoder` class - Create a class that loads these weights and either saves the encoded structures in a pickle file or that can be used inline for a larger property prediction network - When predicting properties, it may be best to train the VAE to both reconstruct the molecule and also predict the property. Even if the prediction is bad, it could force the model to identify parts of the molecules most informative to predicting that property. We should compare those two approaches (universal vs. property-specific encodings)<jupyter_code>toknzr = data.SmilesTokenizer(char_dict)

# 7837 COc1cc(CN(C[C@H]2CC[C@H](C(=O)O)CC2)C(C)c2ccc3c(c2)CCO3)ccc1OCCN1C(=O)COC1=O
# 3211 CCC(O)CNC(=O)COc1c(C)cccc1C
# 17617 CCCSc1ccc2nc(NC(=O)OC)[nH]c2c1
# 841 NC1=CC(=O)c2ccc(C=O)nc2C1=O
# 5463 COc1ccc(-c2ccc3ncnc(-c4cncc(C(=O)N5CCN(C)CC5)c4)c3c2)cn1
# 18079 CC1OC(c2nc3c([N+](=O)[O-])cccn3n2)C(O)C(O)C1=O

smiles = 'CC1OC(c2nc3c([N+](=O)[O-])cccn3n2)C(O)C(O)C1=O'

tok_list, ind_list = toknzr.tokenize(smiles)
tok_list
test_dict = {
    1: [0,1,2],
    2: [0,2,1]
}

test_dict[1].append(5)
test_dict<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11231393775372124, 'fraction_numerical': 0.052097428958051424, 'mean_word_length': 5.815668202764977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '296542', 'license': 'MIT', 'n_tokens_mistral': 613, 'n_tokens_neox': 567, 'n_words': 161, 'path': 'VAE_models_dev.ipynb', 'repo_name': 'wesleyktatum/chemical_properties_predictor', 'size': '1478'}