<jupyter_start><jupyter_text>Train atomic and molecular systemsThis notebook can be used to train the atomic and molecular systems H, He and H2.If you prefer to use a Python script, use `train_atomic_molecular.py` instead.<jupyter_code>import torch
import sys
sys.path.append('../../')
import continuum
from trainer import Trainer<jupyter_output><empty_output><jupyter_text>Choose system and make hparamsEach system has its own hparams. Please uncomment only the hparams settings for the system you would like to train.<jupyter_code># # hparams for Hydrogen atom (H)
# hparams = deepcopy(continuum.DEFAULT_HPARAMS)
# hparams.net = 'DriftResNet'
# hparams.potential = 'h_potential'
# hparams.number_of_particles = 1
# hparams.D = 3
# hparams.H = 256
# hparams.lr = 1e-2

## hparams for Helium atom (He)
hparams = continuum.DEFAULT_HPARAMS
hparams.net = 'PairDriftHelium'
hparams.potential = 'he_potential'
hparams.number_of_particles = 2
hparams.D = 3
hparams.lr = 1e-3

# # hparams for Hydrogen molecule (H2)
# hparams = deepcopy(continuum.DEFAULT_HPARAMS)
# hparams.net = 'PairDriftH2'
# hparams.potential = 'h2_param'
# hparams.R = 1.401  # set to 2.8 for wide H2 molecule
# hparams.number_of_particles = 2
# hparams.D = 3
# hparams.H = 64
# hparams.lr = 5e-4

# # hparams for wide Hydrogen molecule (H2)
# hparams = deepcopy(continuum.DEFAULT_HPARAMS)
# hparams.net = 'PairDriftH2'
# hparams.potential = 'h2_param'
# hparams.R = 2.8  # set to 2.8 for wide H2 molecule
# hparams.number_of_particles = 2
# hparams.D = 3
# hparams.H = 64
# hparams.lr = 1e-3

print(hparams)<jupyter_output><empty_output><jupyter_text>Train model<jupyter_code>model = continuum.Model(hparams)
trainer = Trainer(name='He', gpus=[3], max_epochs=100)
trainer.fit(model)<jupyter_output><empty_output><jupyter_text>Resume trainingIf you would like to continue training one of our trained models, uncomment and execute the following code blocks.<jupyter_code># checkpoint_path = 'results/H2_wide/version_0/_ckpt_epoch_91.ckpt'
# model = continuum.Model.load_from_checkpoint(checkpoint_path)
# trainer = Trainer(name='H2_wide', gpus=[3],
#                   version=0, resume_from_checkpoint=checkpoint_path,
#                   max_epochs=42)
# trainer.fit(model)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10753635962979285, 'fraction_numerical': 0.024239753195240195, 'mean_word_length': 5.202185792349726, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '319864', 'license': 'MIT', 'n_tokens_mistral': 854, 'n_tokens_neox': 799, 'n_words': 194, 'path': 'experiments/train_atomic_molecular.ipynb', 'repo_name': 'AustenLamacraft/QuaRL', 'size': '2269'}