Tools to process MCNP models and results
Project description
MCKIT: MCNP model and results processing utilities
The mckit package provides a programming framework and command line tools to manipulate complex MCNP models. When a model is rather complex and its description occupies thousands of text lines it becomes hard to modify it and integrate several model manually. The package automates integration process.
Usage
Command line interface
Usage: mckit [OPTIONS] COMMAND [ARGS]...
Tools to process MCNP models and results
Options:
--override / --no-override
--version Show the version and exit.
-v, --verbose Log debugging info to stderr. [default: False]
-q, --quiet Suppress info to stderr. [default: False]
--logfile / --no-logfile Log to file. [default: True]
--profile_mem Profile peak memory use. [default: False]
--help Show this message and exit.
Commands:
check Read MCNP model(s) and show statistics and clashes.
compose Merge universes and envelopes into MCNP model using merge...
concat Concat text files.
decompose Separate an MCNP model to envelopes and filling universes
split Splits MCNP model to text portions (opposite to concat)
transform Transform MCNP model(s) with one of specified transformation.
Library
The library allows subtraction and merging models, renaming objects (cells, surfaces, compositions, universes), simplification of cell expressions (removing redundant surfaces), homogenization, computation of cell volumes and material masses, and more.
LOG.info("Loading c-model envelopes")
envelopes = load_model(str(CMODEL_ROOT / "c-model.universes/envelopes.i"))
cells_to_fill = [11, 14, 75]
cells_to_fill_indexes = [c - 1 for c in cells_to_fill]
LOG.info("Attaching bounding boxes to c-model envelopes %s", cells_to_fill)
attach_bounding_boxes(
[envelopes[i] for i in cells_to_fill_indexes], tolerance=5.0, chunk_size=1
)
LOG.info("Backing up original envelopes")
envelopes_original = envelopes.copy()
antenna_envelop.rename(start_cell=200000, start_surf=200000)
LOG.info("Subtracting antenna envelop from c-model envelopes %s", cells_to_fill)
envelopes = subtract_model_from_model(
envelopes, antenna_envelop, cells_filter=lambda c: c in cells_to_fill
)
LOG.info("Adding antenna envelop to c-model envelopes")
envelopes.add_cells(antenna_envelop, name_rule="clash")
envelopes_path = "envelopes+antenna-envelop.i"
envelopes.save(envelopes_path)
LOG.info("The model of HFSR in envelopes is saved to %s", envelopes_path)
Installation
Installing from pypi:
pip3 install mckit
Installing from github.com:
pip3 install git+https://github.com/MC-kit/mckit.git
Versioning
This software follows Semantic Versioning
Contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file mckit-0.8.2.tar.gz
.
File metadata
- Download URL: mckit-0.8.2.tar.gz
- Upload date:
- Size: 231.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0796f88ecc3954cb533c85358889fd5cb4b5abb8c8e665d588682030c5147318 |
|
MD5 | 2c4f50790d812c5cfbf9040d4e4f044b |
|
BLAKE2b-256 | a88f716a717dad326f1831e9d676973f19a79feed7293ef1a7d4fbaeda6ea470 |
File details
Details for the file mckit-0.8.2-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 583.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Windows/2022Server
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00fff9cb3cdf3d3b821fa9f98d82e6bbb777a7e81de1dc9e1e4444a8baa54739 |
|
MD5 | ce607b34bf8a1d96e6cf315a2048ae72 |
|
BLAKE2b-256 | d62a7774c7773c85dee214845ff860684310ee8eb1f4572a28a8a6d215c20351 |
File details
Details for the file mckit-0.8.2-cp312-cp312-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 630.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4817b4997ab3562e5576d52bcfc5d7f72f2a06036b24281b5fafabd9118cd22 |
|
MD5 | 9df5c50185cebe6925d7c88ee07b3344 |
|
BLAKE2b-256 | 97e5f3a649a5f36e901953f773772dfdc427006dbc3968a202ea73fafcc1e8be |
File details
Details for the file mckit-0.8.2-cp312-cp312-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp312-cp312-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 630.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/5.15.0-1074-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 608519f8dbc19f15949310f5ed583915cb9cae4fed83a6b360668c0fab37cf7a |
|
MD5 | 9c4ccb3e3cdfb41ef5bec31f314a2b09 |
|
BLAKE2b-256 | 712a7ec4c05ad32948506d4a4d2eb706e577c647b8eb88888fdbe41f151191f6 |
File details
Details for the file mckit-0.8.2-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 583.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7d4b393190539cbabe05cc2ead9ffa8ca3194e95991bc7c4d7d29eeed261047 |
|
MD5 | aab0cfe0c72063cef493c25ecebded20 |
|
BLAKE2b-256 | 80bc48012460f0b00a823ac13a79fe35bca4414384591c264159e5842738dd45 |
File details
Details for the file mckit-0.8.2-cp311-cp311-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 629.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 405ae251480217546582d1fb0cc846fa3ce0edc6efa5e084f941e9c88da00976 |
|
MD5 | 536c39e9b603d787bf125786b5f43524 |
|
BLAKE2b-256 | 5176de2a65b1ae2059f625cea67cebe92b61168684e04aad049b172a16d1b443 |
File details
Details for the file mckit-0.8.2-cp311-cp311-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp311-cp311-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 630.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Linux/5.15.0-1073-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd5340b6f61b88f9fe2e799e6eb643f63a9d0967b235fd83c1fcc511e8c63c4 |
|
MD5 | b23445a6bc7ea98aa791088c1c06a659 |
|
BLAKE2b-256 | a556366361ab212888f0312a557cb94d2e9ed4d6addbff27d604931a711f9431 |
File details
Details for the file mckit-0.8.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 583.4 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83c6e8d98dfe256d9485165a5720cee1c472e4785d8fc0ba7b3dcf9b82f47922 |
|
MD5 | cc283e5aabead2a539d6936f81228513 |
|
BLAKE2b-256 | 6ccf5165ccab9614dde41acac19ab4b1e7bcc5bd04079171f8cb53bcd14719dc |
File details
Details for the file mckit-0.8.2-cp310-cp310-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 629.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6ebaa9f4019dfa8625479b6d43c3ddd4d1447192abd4d58f5c0e8ae91c3970 |
|
MD5 | 9a3d86ea663c74a58735360f6465da83 |
|
BLAKE2b-256 | 8617f6d2ecb23c13a5e46f045180e16a2c6abc13f20d09a0c344dfe16fedea82 |
File details
Details for the file mckit-0.8.2-cp310-cp310-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: mckit-0.8.2-cp310-cp310-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 630.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.15 Linux/5.15.0-1073-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 393422f0d532a5d982913ac8a4670641ffc75019990ae281e00b77432fe5d23e |
|
MD5 | 228d538388cb671c8ae0b81a5ff2c468 |
|
BLAKE2b-256 | c37dfbfbf2e408ec59104c1342d7b83ed2e465f36c1a1fad903b6a703bd35507 |