Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when training on O2 with multiplicity 3 #86

Open
arnon-1 opened this issue Nov 26, 2024 · 2 comments
Open

Infinite loop when training on O2 with multiplicity 3 #86

arnon-1 opened this issue Nov 26, 2024 · 2 comments

Comments

@arnon-1
Copy link

arnon-1 commented Nov 26, 2024

Not sure if this is expected behaviour, but the default implementation for the initial electron configuration doesn't seem to work in all cases.
The script tries to assign a number of electrons to each atom according to the charge and ground state spin of the individual atoms (as mentioned in the ferminet paper) but this fails in some cases.
The main issue is that this behaviour is hardcoded and doesn't seem to be easily changeable without modifying the source code.
Example to reproduce:

import sys

from absl import logging
from ferminet.utils import system
from ferminet import base_config
from ferminet import train

# Optional, for also printing training progress to STDOUT.
# If running a script, you can also just use the --alsologtostderr flag.
logging.get_absl_handler().python_handler.stream = sys.stdout
logging.set_verbosity(logging.INFO)

# Define O2 molecule
cfg = base_config.default()
cfg.system.electrons = (9,7)  # (alpha electrons, beta electrons)
cfg.system.molecule = [system.Atom('O', (0, 0, -1)), system.Atom('O', (0, 0, 1))]

train.train(cfg)
@jsspencer
Copy link
Collaborator

Sorry, this used to be ok. I'll add a fallback strategy -- don't have time for a complete fix, as selecting particle initialisation is hard -- though increasing the number of pretraining and MCMC burn-in iterations will probably be a good idea for such cases (or at least carefully monitoring MCMC and convergence).

@arnon-1
Copy link
Author

arnon-1 commented Dec 12, 2024

Ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants