mcpy-gcmc 1.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcpy/__init__.py +12 -0
- mcpy/calculators/__init__.py +24 -0
- mcpy/calculators/alchemi.py +975 -0
- mcpy/calculators/base_calculator.py +50 -0
- mcpy/calculators/mace_f_calculator.py +59 -0
- mcpy/cell/__init__.py +8 -0
- mcpy/cell/base_cell.py +91 -0
- mcpy/cell/cell.py +271 -0
- mcpy/cell/custom_cell.py +98 -0
- mcpy/cell/dome_cell.py +109 -0
- mcpy/cell/null_cell.py +41 -0
- mcpy/cell/spherical_cell.py +132 -0
- mcpy/ensembles/__init__.py +13 -0
- mcpy/ensembles/base_ensemble.py +356 -0
- mcpy/ensembles/batched_replica_exchange.py +534 -0
- mcpy/ensembles/canonical_ensemble.py +193 -0
- mcpy/ensembles/grand_canonical_ensemble.py +568 -0
- mcpy/ensembles/replica_exchange.py +473 -0
- mcpy/moves/__init__.py +27 -0
- mcpy/moves/alchemi_brownian_move.py +91 -0
- mcpy/moves/base_move.py +71 -0
- mcpy/moves/brownian_move.py +91 -0
- mcpy/moves/deletion_move.py +62 -0
- mcpy/moves/displacement_move.py +82 -0
- mcpy/moves/insertion_move.py +58 -0
- mcpy/moves/molecule_deletion_move.py +52 -0
- mcpy/moves/molecule_displacement_move.py +107 -0
- mcpy/moves/molecule_insertion_move.py +73 -0
- mcpy/moves/molecule_utils.py +98 -0
- mcpy/moves/move_selector.py +163 -0
- mcpy/moves/permutation_move.py +63 -0
- mcpy/moves/shake_move.py +47 -0
- mcpy/utils/__init__.py +23 -0
- mcpy/utils/chunking.py +26 -0
- mcpy/utils/logging.py +56 -0
- mcpy/utils/md_trajectory.py +28 -0
- mcpy/utils/phase_diagram.py +747 -0
- mcpy/utils/random_number_generator.py +42 -0
- mcpy/utils/reference_mu.py +106 -0
- mcpy/utils/set_unit_constant.py +106 -0
- mcpy_gcmc-1.5.0.dist-info/METADATA +157 -0
- mcpy_gcmc-1.5.0.dist-info/RECORD +45 -0
- mcpy_gcmc-1.5.0.dist-info/WHEEL +5 -0
- mcpy_gcmc-1.5.0.dist-info/licenses/LICENSE +21 -0
- mcpy_gcmc-1.5.0.dist-info/top_level.txt +1 -0
mcpy/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
3
|
+
|
|
4
|
+
try:
|
|
5
|
+
__version__ = version('mcpy-gcmc')
|
|
6
|
+
except PackageNotFoundError: # not installed, e.g. run from a source checkout
|
|
7
|
+
__version__ = '0.0.0.unknown'
|
|
8
|
+
|
|
9
|
+
# Library convention: attach a NullHandler to the top-level package logger so
|
|
10
|
+
# importing mcpy has no side effects on the host application's logging config.
|
|
11
|
+
# Users opt in to logging via mcpy.utils.logging.configure(...).
|
|
12
|
+
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from .base_calculator import BaseCalculator
|
|
2
|
+
|
|
3
|
+
# The backend calculators import lazily (PEP 562): mace-torch and nvalchemi
|
|
4
|
+
# pull in torch, which costs seconds and, in a misconfigured env, kills the
|
|
5
|
+
# process with SIGBUS. Accessing one without its backend raises the real
|
|
6
|
+
# ImportError (install with: pip install -e .[mace] or .[alchemi]).
|
|
7
|
+
_LAZY = {
|
|
8
|
+
'MACE_F_Calculator': 'mace_f_calculator',
|
|
9
|
+
'AlchemiCalculator': 'alchemi',
|
|
10
|
+
'AlchemiFCalculator': 'alchemi',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
__all__ = ['BaseCalculator', *_LAZY]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name):
|
|
17
|
+
if name in _LAZY:
|
|
18
|
+
from importlib import import_module
|
|
19
|
+
return getattr(import_module(f'.{_LAZY[name]}', __name__), name)
|
|
20
|
+
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def __dir__():
|
|
24
|
+
return sorted({*globals(), *__all__})
|