montepy


Namemontepy JSON
Version 0.2.6 PyPI version JSON
download
home_pageNone
SummaryA library for reading, editing, and writing MCNP input files
upload_time2024-04-15 22:02:29
maintainerNone
docs_urlNone
authorBrenna Carbno
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Battelle Energy Alliance, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords mcnp neutronics imcnp input file monte carlo radiation transport
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MontePy

<img src="https://raw.githubusercontent.com/idaholab/MontePy/develop/graphics/monty.svg" width="180" alt="MontePY: a cute snek on a red over white circle"/>

[![license](https://img.shields.io/github/license/idaholab/MontePy.svg)](https://github.com/idaholab/MontePy/blob/develop/LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/idaholab/MontePy/badge.svg?branch=develop)](https://coveralls.io/github/idaholab/MontePy?branch=develop)
[![PyPI version](https://badge.fury.io/py/montepy.svg)](https://badge.fury.io/py/montepy)

MontePy is a python library to read, edit, and write MCNP input files. 

## Installing

See the [Installing section in the user guide](https://idaholab.github.io/MontePy/starting.html#installing).


## User Documentation

MontePy has a [sphinx website](https://idaholab.github.io/MontePy/index.html). 
This has a getting started guide for users,
as well as API documentation. 
There is also a developer's guide covering the design and approach of MontePy, and how to contribute.

## Features
	
* Handles almost all MCNP input syntax including: message blocks, & continue, comments, etc.
* Parses Cells, surfaces, materials, and transforms very well.	
* Can parse the following surfaces exactly P(X|Y|Z), C(X|Y|Z), C/(X|Y|Z) (I mean it can do PX, and PY, etc.)
* Can read in all other inputs but not understand them	
* Can write out full MCNP problem even if it doesn't fully understand an input.	
* Can write out the MCNP problem verbatim, and try to match the original user formatting. 
* Can quickly access cells, surfaces, and materials by their numbers. For example: `cell = problem.cells[105]`.
* Can quickly update cell importances. For example `cell.importance.neutron = 2.0`.
* Has over 240 test cases right now 

 
Quick example for renumbering all of the cells in a problem:

```python
import montepy
foo = montepy.read_input("foo.imcnp")
i = 9500
for cell in foo.cells:
  cell.number = i
  i = i + 5
  
foo.write_to_file("foo_update.imcnp")

```

## Limitations

Here a few of the known bugs and limitations:

	
* Cannot handle vertical input mode.
* Does not support tallies in an easy way.
* Does not support source definition in an easy way.
	
## Bugs, Requests and Development

So MontePy doesn't do what you want? Right now development is done with a  Just-In-Time development approach, as in features are added JIT for a developer to use them on my current projects. 
If there's a feature you want add an issue here with the feature request tag. 
If you want to add a feature on your own talk to Micah Gale (but still add the issue). 
The system is very modular and you should be able to develop it pretty quickly.
Also read the [developer's guide](https://idaholab.github.io/MontePy/developing.html).

# Version Numbering Scheme

* Software on `develop` and feature branches are subject to change without a version number increment. These version
  may be suffixed as dev (e.g., `0.1.0.dev2`) and may change as features and bug fixes are implemented.

* Versions are official if and only if they are:
   1. on the branch `main`.
   1. has a release git tag assigned
   1. has distribution packages created and released
   Official shall not change. New merges to main shall have a version number incremented.

 
# Finally: make objects not regexes!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "montepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Micah Gale <micah.gale@inl.gov>",
    "keywords": "MCNP, neutronics, imcnp, input file, monte carlo, radiation transport",
    "author": "Brenna Carbno",
    "author_email": "Micah Gale <micah.gale@inl.gov>, Travis Labossiere-Hickman <Travis.LabossiereHickman@inl.gov>",
    "download_url": "https://files.pythonhosted.org/packages/3b/70/cbee277783e22fe14cb588a1f71219d41379e54676a6e373870d6064f4b1/montepy-0.2.6.tar.gz",
    "platform": null,
    "description": "# MontePy\n\n<img src=\"https://raw.githubusercontent.com/idaholab/MontePy/develop/graphics/monty.svg\" width=\"180\" alt=\"MontePY: a cute snek on a red over white circle\"/>\n\n[![license](https://img.shields.io/github/license/idaholab/MontePy.svg)](https://github.com/idaholab/MontePy/blob/develop/LICENSE)\n[![Coverage Status](https://coveralls.io/repos/github/idaholab/MontePy/badge.svg?branch=develop)](https://coveralls.io/github/idaholab/MontePy?branch=develop)\n[![PyPI version](https://badge.fury.io/py/montepy.svg)](https://badge.fury.io/py/montepy)\n\nMontePy is a python library to read, edit, and write MCNP input files. \n\n## Installing\n\nSee the [Installing section in the user guide](https://idaholab.github.io/MontePy/starting.html#installing).\n\n\n## User Documentation\n\nMontePy has a [sphinx website](https://idaholab.github.io/MontePy/index.html). \nThis has a getting started guide for users,\nas well as API documentation. \nThere is also a developer's guide covering the design and approach of MontePy, and how to contribute.\n\n## Features\n\t\n* Handles almost all MCNP input syntax including: message blocks, & continue, comments, etc.\n* Parses Cells, surfaces, materials, and transforms very well.\t\n* Can parse the following surfaces exactly P(X|Y|Z), C(X|Y|Z), C/(X|Y|Z) (I mean it can do PX, and PY, etc.)\n* Can read in all other inputs but not understand them\t\n* Can write out full MCNP problem even if it doesn't fully understand an input.\t\n* Can write out the MCNP problem verbatim, and try to match the original user formatting. \n* Can quickly access cells, surfaces, and materials by their numbers. For example: `cell = problem.cells[105]`.\n* Can quickly update cell importances. For example `cell.importance.neutron = 2.0`.\n* Has over 240 test cases right now \n\n \nQuick example for renumbering all of the cells in a problem:\n\n```python\nimport montepy\nfoo = montepy.read_input(\"foo.imcnp\")\ni = 9500\nfor cell in foo.cells:\n  cell.number = i\n  i = i + 5\n  \nfoo.write_to_file(\"foo_update.imcnp\")\n\n```\n\n## Limitations\n\nHere a few of the known bugs and limitations:\n\n\t\n* Cannot handle vertical input mode.\n* Does not support tallies in an easy way.\n* Does not support source definition in an easy way.\n\t\n## Bugs, Requests and Development\n\nSo MontePy doesn't do what you want? Right now development is done with a  Just-In-Time development approach, as in features are added JIT for a developer to use them on my current projects. \nIf there's a feature you want add an issue here with the feature request tag. \nIf you want to add a feature on your own talk to Micah Gale (but still add the issue). \nThe system is very modular and you should be able to develop it pretty quickly.\nAlso read the [developer's guide](https://idaholab.github.io/MontePy/developing.html).\n\n# Version Numbering Scheme\n\n* Software on `develop` and feature branches are subject to change without a version number increment. These version\n  may be suffixed as dev (e.g., `0.1.0.dev2`) and may change as features and bug fixes are implemented.\n\n* Versions are official if and only if they are:\n   1. on the branch `main`.\n   1. has a release git tag assigned\n   1. has distribution packages created and released\n   Official shall not change. New merges to main shall have a version number incremented.\n\n \n# Finally: make objects not regexes!\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Battelle Energy Alliance, LLC  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A library for reading, editing, and writing MCNP input files",
    "version": "0.2.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/idaholab/MontePy/issues",
        "Documentation": "https://idaholab.github.io/MontePy/index.html",
        "Homepage": "https://idaholab.github.io/MontePy/index.html",
        "Repository": "https://github.com/idaholab/montepy.git"
    },
    "split_keywords": [
        "mcnp",
        " neutronics",
        " imcnp",
        " input file",
        " monte carlo",
        " radiation transport"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5c861d32fa2e2d6893c6e4e8ba7fc84e9d85bc5baaf3d25c3eb31c60dc818af",
                "md5": "eab9e8638160dadd098c961da5730401",
                "sha256": "94a6e28d61e7ff65ed878d990dbc5d4998e37dc493ca999ed91d7017e51bc2b8"
            },
            "downloads": -1,
            "filename": "montepy-0.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eab9e8638160dadd098c961da5730401",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 126521,
            "upload_time": "2024-04-15T22:02:27",
            "upload_time_iso_8601": "2024-04-15T22:02:27.876226Z",
            "url": "https://files.pythonhosted.org/packages/c5/c8/61d32fa2e2d6893c6e4e8ba7fc84e9d85bc5baaf3d25c3eb31c60dc818af/montepy-0.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b70cbee277783e22fe14cb588a1f71219d41379e54676a6e373870d6064f4b1",
                "md5": "193ee271caa31adc919f0790e75876c5",
                "sha256": "482987dbbbd891ddefe3ec9fdcb8550730d9243fdfbfc81ff76db81c705c773c"
            },
            "downloads": -1,
            "filename": "montepy-0.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "193ee271caa31adc919f0790e75876c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 237644,
            "upload_time": "2024-04-15T22:02:29",
            "upload_time_iso_8601": "2024-04-15T22:02:29.796593Z",
            "url": "https://files.pythonhosted.org/packages/3b/70/cbee277783e22fe14cb588a1f71219d41379e54676a6e373870d6064f4b1/montepy-0.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 22:02:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "idaholab",
    "github_project": "MontePy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "montepy"
}
        
Elapsed time: 0.22875s