Skip to main content

Tools to process MCNP models and results

Reason this release was yanked:

errors on building from source

Project description

https://img.shields.io/badge/Maintained%3F-yes-green.svg https://github.com/MC-kit/mckit/workflows/Tests/badge.svg https://codecov.io/gh/MC-kit/mckit/branch/devel/graph/badge.svg?token=05OFBQS3RX https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 https://img.shields.io/github/license/MC-kit/mckit

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mckit-0.6.20.tar.gz (121.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mckit-0.6.20-cp311-cp311-win_amd64.whl (503.8 kB view details)

Uploaded CPython 3.11Windows x86-64

mckit-0.6.20-cp311-cp311-manylinux_2_35_x86_64.whl (483.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

mckit-0.6.20-cp311-cp311-macosx_12_0_x86_64.whl (501.2 kB view details)

Uploaded CPython 3.11macOS 12.0+ x86-64

mckit-0.6.20-cp310-cp310-win_amd64.whl (503.8 kB view details)

Uploaded CPython 3.10Windows x86-64

mckit-0.6.20-cp310-cp310-manylinux_2_35_x86_64.whl (483.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

mckit-0.6.20-cp310-cp310-macosx_12_0_x86_64.whl (477.9 kB view details)

Uploaded CPython 3.10macOS 12.0+ x86-64

mckit-0.6.20-cp39-cp39-win_amd64.whl (503.8 kB view details)

Uploaded CPython 3.9Windows x86-64

mckit-0.6.20-cp39-cp39-manylinux_2_35_x86_64.whl (483.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.35+ x86-64

mckit-0.6.20-cp39-cp39-macosx_12_0_x86_64.whl (477.9 kB view details)

Uploaded CPython 3.9macOS 12.0+ x86-64

mckit-0.6.20-cp38-cp38-win_amd64.whl (503.8 kB view details)

Uploaded CPython 3.8Windows x86-64

mckit-0.6.20-cp38-cp38-manylinux_2_35_x86_64.whl (483.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.35+ x86-64

mckit-0.6.20-cp38-cp38-macosx_12_0_x86_64.whl (477.9 kB view details)

Uploaded CPython 3.8macOS 12.0+ x86-64

File details

Details for the file mckit-0.6.20.tar.gz.

File metadata

  • Download URL: mckit-0.6.20.tar.gz
  • Upload date:
  • Size: 121.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1030-azure

File hashes

Hashes for mckit-0.6.20.tar.gz
Algorithm Hash digest
SHA256 7e3dcffdd138ceae5fd69a332df5ae256856b896a88bd662bf6b8d2b4ea4217f
MD5 f34f9dd9a78d24379638cc361e895a5b
BLAKE2b-256 9b411bd300514e4a5a167763501bf09870a2d35d9459a3752e8137c99002d93b

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Windows/10

File hashes

Hashes for mckit-0.6.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 48a9cb50de407c90bfeea06a2e08fdd5b3f73ecbb000e19a2bb913625b260d4e
MD5 8c1a1cfc8cb7020747198cbb92c478ae
BLAKE2b-256 ab82f87dbbaba247fcb9920db8308f5d318dcf696a5fcd503726e86ddeb73190

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp311-cp311-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 483.2 kB
  • Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1030-azure

File hashes

Hashes for mckit-0.6.20-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 0b7003322a1a613df06e4f80fb41915dd59e030eb1950b0a954e3f4750b31122
MD5 69ed49edc32d44ee1e9072f950e73981
BLAKE2b-256 f8ada91998d1e111e823a39dd781b58e092ff66cd9c9ad2042477b8b7e403a9a

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp311-cp311-macosx_12_0_x86_64.whl
  • Upload date:
  • Size: 501.2 kB
  • Tags: CPython 3.11, macOS 12.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Darwin/21.6.0

File hashes

Hashes for mckit-0.6.20-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 750615f54fd076daca393dfd0ac83fbf2266fe6916daa9cca252aa5512403405
MD5 8f94a53792ad59b5cba5c385bc5d24d7
BLAKE2b-256 c96bcbea424b814266d7b0eb05303da705d4205000c8b50147712494a9361e00

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Windows/10

File hashes

Hashes for mckit-0.6.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fcb08cdd558c02749d86f48801dd2a123bfd6c179f6c71f4427bd17aee7a6bd3
MD5 ca6384e75dde2e1f95923c180cfbff77
BLAKE2b-256 b12ccbdb308bcca20f61b2ca08a1c460d4fff814e17db8b119ee2b3f0ee4ca82

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp310-cp310-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 483.2 kB
  • Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/5.15.0-1030-azure

File hashes

Hashes for mckit-0.6.20-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f7589070457bd5d06d2f7476a254d37c3e8bdd47dd24840fee7e3f5c498a019d
MD5 1396ab671d51190b5b032d8d4cafc75a
BLAKE2b-256 908c873b568ec5e5763cb5104519af27f0fa43829d82493d6e9637c519ed0e03

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp310-cp310-macosx_12_0_x86_64.whl
  • Upload date:
  • Size: 477.9 kB
  • Tags: CPython 3.10, macOS 12.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Darwin/21.6.0

File hashes

Hashes for mckit-0.6.20-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 9dc6df25cf57c5c4f5e5037a648842d4ee2becf55957606b437ea2ba0e916706
MD5 3eca0011cbbf62296f3d0c2cd35a082e
BLAKE2b-256 8dac484c6d0f019a397198af7f79b613697cf3ba38cca0af7326f06e333d6cb7

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.13 Windows/10

File hashes

Hashes for mckit-0.6.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 05a5a5506f66bd5db731b79ef464241a4050a7c027bab3b74599b1caf5334963
MD5 432fb9871fe983f19aa949917de2503f
BLAKE2b-256 091d7fc0a7568c502463975f13205ea0f22580f3fd669e8e840ea6b7d95d0c25

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp39-cp39-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp39-cp39-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 483.1 kB
  • Tags: CPython 3.9, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1030-azure

File hashes

Hashes for mckit-0.6.20-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d6bc8149c25af7043dccce04d24b40d674bd1f5da6579aadc9f3307c341f2399
MD5 6a8f2d81e2fe833887d935ef36bdd32f
BLAKE2b-256 66f599a9f79001a110e24ab513e16dc9b609516dc879dd8c355bf5126e7ea47d

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp39-cp39-macosx_12_0_x86_64.whl
  • Upload date:
  • Size: 477.9 kB
  • Tags: CPython 3.9, macOS 12.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Darwin/21.6.0

File hashes

Hashes for mckit-0.6.20-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 d61b806a57a26d1088b596b525c609316f9595a74f7606ef6f8e23f215ef3c39
MD5 38c8b05c8d7a01ee00b43510e29e27f7
BLAKE2b-256 a1d0c00851a9315bff2660f21de83dff914f64d030410efe3e279f30a9506956

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.10 Windows/10

File hashes

Hashes for mckit-0.6.20-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 14a4b45516c4d8b95251ef2466585c5e446d23d9912149c2f41800d6f082f1be
MD5 ebecba43d93d7766d071eda169a92356
BLAKE2b-256 51f01983c4c2585b0ed3c2d6be41c543398ab2629771a0d989a05be1636d299f

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp38-cp38-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp38-cp38-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 483.1 kB
  • Tags: CPython 3.8, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.15 Linux/5.15.0-1030-azure

File hashes

Hashes for mckit-0.6.20-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 b9eaf347de70b73ba168bc3e718ea5b51e4c4bf3852cef8b13b07f1b041a9550
MD5 cc1e550f7663ef2fd699aa5e94787e61
BLAKE2b-256 ef74af6e820d3e6eb4984c16f3d68df0a344d94a449136ffcd9449cecbd99077

See more details on using hashes here.

File details

Details for the file mckit-0.6.20-cp38-cp38-macosx_12_0_x86_64.whl.

File metadata

  • Download URL: mckit-0.6.20-cp38-cp38-macosx_12_0_x86_64.whl
  • Upload date:
  • Size: 477.9 kB
  • Tags: CPython 3.8, macOS 12.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.15 Darwin/21.6.0

File hashes

Hashes for mckit-0.6.20-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 19c038fe899e5e1d7a7a3b0cd46cdf52149797f6e9109a333e21d19e0d7563b6
MD5 c31adb2f92d6c0893d1c7a10197381d5
BLAKE2b-256 93a94e0a56d8441eb58f2042f407cb359a20d21c1abb79fc58780636feb94239

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page