├── .gitignore ├── images ├── icon.png ├── example_fmesh.png ├── tropt_prompt.png ├── act_card_example.png ├── act_card_prompt.png ├── physn_completed.png ├── tropt_completed.png └── example_input_deck.png ├── .vscode └── launch.json ├── CHANGELOG.md ├── language-configuration.json ├── package.json ├── README.md ├── LICENSE ├── syntaxes └── mcnp.tmLanguage.yaml └── snippets ├── mcnp.tmSnippets.yaml └── mcnp.tmSnippets.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/icon.png -------------------------------------------------------------------------------- /images/example_fmesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/example_fmesh.png -------------------------------------------------------------------------------- /images/tropt_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/tropt_prompt.png -------------------------------------------------------------------------------- /images/act_card_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/act_card_example.png -------------------------------------------------------------------------------- /images/act_card_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/act_card_prompt.png -------------------------------------------------------------------------------- /images/physn_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/physn_completed.png -------------------------------------------------------------------------------- /images/tropt_completed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/tropt_completed.png -------------------------------------------------------------------------------- /images/example_input_deck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repositony/vscode_mcnp/HEAD/images/example_input_deck.png -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | { 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "args": [ 10 | "--extensionDevelopmentPath=${workspaceFolder}" 11 | ] 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the extension will be documented in this file. 4 | 5 | For full commit history and versions please see the [repository](https://github.com/repositony/vscode_mcnp). 6 | 7 | ## Version 1.0.4 8 | 9 | - Fixed missing UKAEA-CuV syntax highlighting 10 | - Capitalised macrobody code snippet keywords 11 | 12 | ## Version 1.0.3 13 | 14 | - Added macrobody code snippets 15 | - Fixed numbered geometry cardname captures 16 | 17 | ## Version 1.0.2 18 | 19 | - Added full template for settings.json colour customisation 20 | - Added sensible logo to replace the placeholder 21 | - Readability updates to the README 22 | 23 | ## Version 1.0.1 24 | 25 | - Simplified colour customisation section of readme 26 | - F5 debugging added 27 | - Added vertical data input format 28 | - Fixed missing highlighting of default material library cards 29 | - Fixed `contrib` arguments and highlighting 30 | - Added js-yaml as a dev dependency 31 | 32 | ## Version 1.0.0 33 | 34 | - Initial release 35 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. 4 | "lineComment": "c", 5 | }, 6 | // symbols that are auto closed when typing 7 | "autoClosingPairs": [ 8 | [ 9 | "{", 10 | "}" 11 | ], 12 | [ 13 | "[", 14 | "]" 15 | ], 16 | [ 17 | "(", 18 | ")" 19 | ], 20 | [ 21 | "\"", 22 | "\"" 23 | ], 24 | [ 25 | "'", 26 | "'" 27 | ] 28 | ], 29 | // symbols that can be used to surround a selection 30 | "surroundingPairs": [ 31 | [ 32 | "{", 33 | "}" 34 | ], 35 | [ 36 | "[", 37 | "]" 38 | ], 39 | [ 40 | "(", 41 | ")" 42 | ], 43 | [ 44 | "\"", 45 | "\"" 46 | ], 47 | [ 48 | "'", 49 | "'" 50 | ] 51 | ] 52 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscodemcnp", 3 | "version": "1.0.5", 4 | "displayName": "MCNP6 syntax highlighting and snippets", 5 | "publisher": "repositony", 6 | "author": { 7 | "name": "Tony Turner" 8 | }, 9 | "description": "Syntax highlighting and autocomplete code snippets for MCNP input files", 10 | "icon": "/images/icon.png", 11 | "galleryBanner": { 12 | "color": "#161935", 13 | "theme": "dark" 14 | }, 15 | "pricing": "Free", 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/repositony/vscode_mcnp" 19 | }, 20 | "engines": { 21 | "vscode": "^1.0.0" 22 | }, 23 | "categories": [ 24 | "Programming Languages", 25 | "Snippets" 26 | ], 27 | "keywords": [ 28 | "mcnp", 29 | "syntax", 30 | "snippets", 31 | "monte-carlo", 32 | "radiation-transport", 33 | ".ip" 34 | ], 35 | "contributes": { 36 | "languages": [ 37 | { 38 | "id": "mcnp", 39 | "aliases": [ 40 | "MCNP", 41 | "mcnp" 42 | ], 43 | "extensions": [ 44 | ".i", 45 | ".ip", 46 | ".mcnp" 47 | ], 48 | "configuration": "./language-configuration.json" 49 | } 50 | ], 51 | "grammars": [ 52 | { 53 | "language": "mcnp", 54 | "scopeName": "source.mcnp", 55 | "path": "./syntaxes/mcnp.tmLanguage.json" 56 | } 57 | ], 58 | "snippets": [ 59 | { 60 | "language": "mcnp", 61 | "path": "./snippets/mcnp.tmSnippets.json" 62 | } 63 | ] 64 | }, 65 | "devDependencies": { 66 | "js-yaml": "^4.1.0" 67 | }, 68 | "bugs": { 69 | "url": "https://github.com/repositony/vscode_mcnp/issues" 70 | } 71 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MCNP6 syntax highlighting and snippets 2 | 3 | **An extension providing syntax highlighting and code snippets for MCNP input decks** 4 | 5 | Cards, keywords, and constants were taken from the [MCNPv6.3.0 user manual](https://mcnp.lanl.gov/manual.html) but is compatible with most version 6.x input files. By default this applies to files with the `.i`, `.ip`, or `.mcnp` file extension. The source is available on [github](https://github.com/repositony/vscode_mcnp). 6 | 7 | *Note: The default theme colours are not fantastic, but are easily customised with the template [here](#customising-syntax-colours)* 8 | 9 | ## Syntax highlighting 10 | 11 | All the expected syntax rules are implemented for cards, keywords, constants, and comments. Syntax highlighting rules are case insesnitive, and apply across multiple lines where appropriate, such as with the `SDEF` and `FMESH` cards seen in the example below. 12 | 13 | ![example_input_deck](/images/example_input_deck.png) 14 | 15 | Highlighting rules are contextualised and will generally not apply to incorrect syntax or invalid states. In the following example: 16 | 17 | - Only tallies ending 1-8 are valid, so `FC9` is will not be highlighted 18 | - The `XYZ` geometry constant is only valid for `GEOM=`, and fails to highlight on `OUT=` 19 | 20 | ![fmesh_examples](/images/example_fmesh.png) 21 | 22 | Note that while this is a useful indication of problems, it guarantees nothing for runtime. 23 | 24 | *There are plans to implement a fully featured language server with detailed error reporting, linting, etc... but this is not a trivial task and will take time.* 25 | 26 | ## Autocomplete code snippets 27 | 28 | Lines may be commented out with the usual `ctrl+/` shortcut, adding a `c` to the start of the selected line(s). The typical bracket matching and quotation autocomplete also included. 29 | 30 | Code snippets are defined for input cards where appropriate. Simply start typing and hit `enter` to generate the card with default values. Tab-stops are defined for all snippets, so pressing `tab` will then cycle through keywords on the card for editing. 31 | 32 | For example, selecting `ACT` from the suggestions, 33 | 34 | ![act_card_prompt](/images/act_card_prompt.png) 35 | 36 | will generate the following: 37 | 38 | ![act_card_example](/images/act_card_example.png) 39 | 40 | **For productivity, keywords and values are set to default or a simple hint where ambiguous.** 41 | 42 | A comprehensive guide for most cards would take up the entire screen. As a compromise, every line simply has a small comment for context. This is still very useful for cards such as `PHYS`, which are just sets of values. 43 | 44 | ![Alt text](/images/physn_completed.png) 45 | 46 | The template above is far easier than trying to remember whatever `"phys:n 100 0 0 j j j 0 -1 j j 1 0 0"` means. 47 | 48 | Of course, card snippets are fairly subjective in their usefulness. Any feedback on what defaults, flags, or comments should be used for certain cards would be appreciated. 49 | 50 | ## Customising syntax colours 51 | 52 | The textmate [naming conventions](https://macromates.com/manual/en/language_grammars) are used for tokenisation to support most themes. MCNP specific syntax highlighting colours are customisable by overwriting the theme in your `settings.json`. 53 | 54 |
55 | Click to show example settings.json template 56 | 57 | ```json 58 | "editor.tokenColorCustomizations": { 59 | "textMateRules": [ 60 | { 61 | "scope": "comment.line.mcnp", 62 | "settings": { "foreground": "#676767" } 63 | }, 64 | { 65 | "scope": "keyword.cellnumber.mcnp", 66 | "settings": { "foreground": "#82AAFF" } 67 | }, 68 | { 69 | "scope": "constant.numeric.cellmaterial.mcnp", 70 | "settings": { "foreground": "#E74856" } 71 | }, 72 | { 73 | "scope": "constant.numeric.celldensity.mcnp", 74 | "settings": { "foreground": "#2AB5CA" } 75 | }, 76 | { 77 | "scope": "keyword.surfacenumber.mcnp", 78 | "settings": { "foreground": "#ea82ff" } 79 | }, 80 | { 81 | "scope": "constant.language.surfacetype.mcnp", 82 | "settings": { "foreground": "#4ecc86" } 83 | }, 84 | { 85 | "scope": "constant.language.zaidlib.mcnp", 86 | "settings": { "foreground": "#e88e96" } 87 | }, 88 | { 89 | "scope": "keyword.mcnp", 90 | "settings": { "foreground": "#82AAFF" } 91 | }, 92 | { 93 | "scope": "constant.numeric.mcnp", 94 | "settings": { "foreground": "#B987E1" } 95 | }, 96 | { 97 | "scope": "variable.mcnp", 98 | "settings": { "foreground": "#a3d3fb" } 99 | }, 100 | { 101 | "scope": "constant.language.mcnp", 102 | "settings": { "foreground": "#4ecc86" } 103 | }, 104 | { 105 | "scope": "string.mcnp", 106 | "settings": { "foreground": "#ea6cc7" } 107 | } 108 | ] 109 | } 110 | ``` 111 | 112 |
113 | 114 |
115 | Click to show table of scopes 116 | 117 | Values for the MCNP syntax `"scope"` are described in the table below. 118 | 119 | | Syntax description | Example | Scope | 120 | | :---------------- | :--------- | :------ | 121 | | Comments | **c example comment line** | comment.line.mcnp | 122 | | Cell number | **99** 5 -0.26 surface numbers...| keyword.cellnumber.mcnp | 123 | | Cell material number | 99 **5** -0.26 surface numbers... | constant.numeric.cellmaterial.mcnp | 124 | | Cell material density | 99 5 **-0.26** surface numbers... | constant.numeric.celldensity.mcnp | 125 | | Surface number | **20** PX values... | keyword.surfacenumber.mcnp | 126 | | Surface type | 20 **PX** values... | constant.language.surfacetype.mcnp | 127 | | ZAID suffix | M1 08016.**32c** 1.0 | constant.language.zaidlib.mcnp | 128 | | Data card name | **fmesh**34:n geom=rzt | keyword.mcnp | 129 | | Numeric identifiers | fmesh**34**:n geom=rzt | constant.numeric.mcnp | 130 | | General variable | fmesh34:n **geom**=rzt | variable.mcnp | 131 | | General constants | fmesh34:n geom=**rzt** | constant.language.mcnp | 132 | | Strings | fc34 **example tally comment** | string.mcnp | 133 | 134 |
135 | 136 | ## Issues and bugs 137 | 138 | It is guaranteed that there are missing cards or rules that are not working as intended, so if you find anything please [raise an issue](https://github.com/repositony/vscode_mcnp/issues). 139 | 140 | Suggestions for improvements and features are also welcome. 141 | 142 |
143 | Notes for developers 144 | 145 | The JSON files quickly spiral out of control with all the nuances of the various input cards and their edge cases. 146 | 147 | The YAML file format is much easier to deal with, so it is suggested that you just install `js-yaml` and convert updates from the YAML versions. 148 | 149 | ```shell 150 | # Install js-yaml 151 | $ npm install js-yaml 152 | 153 | # Use the command-line tool to convert the yaml files to json 154 | $ npx js-yaml syntaxes/mcnp.tmLanguage.yaml > syntaxes/mcnp.tmLanguage.json 155 | $ npx js-yaml snippets/mcnp.tmSnippets.yaml > snippets/mcnp.tmSnippets.json 156 | ``` 157 | 158 | The included `.vscode/launch.json` allows for easy development. Hit `F5` to bring up a debug instance with the extension loaded, and `ctrl+R` to reload the window whenever a change is made. 159 | 160 |
161 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /syntaxes/mcnp.tmLanguage.yaml: -------------------------------------------------------------------------------- 1 | $schema: https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json 2 | name: mcnp 3 | 4 | patterns: 5 | - include: "#comment" 6 | - include: "#cell_cards" 7 | - include: "#surface_cards" 8 | - include: "#data_cards" 9 | 10 | repository: 11 | #! Top level for comment variations 12 | comment: 13 | patterns: 14 | - include: "#line_comment" 15 | - include: "#inline_comment" 16 | 17 | # not u for 'CUT', not numbered for 'Cn', not 'o' for 'COSY/COSYP' 18 | # need the qualifiers as commets take precedence 19 | line_comment: 20 | match: ^\s{0,4}[cC]\s.*$ 21 | name: comment.line.mcnp 22 | 23 | inline_comment: 24 | match: \$.*$ 25 | name: comment.line.mcnp 26 | 27 | #! Top level for cell cards 28 | cell_cards: 29 | patterns: 30 | - include: "#void_cell" 31 | - include: "#material_cell" 32 | - include: "#like_cell" 33 | 34 | void_cell: 35 | begin: (?i)^\s{0,4}(\d+)\s+(0)\s 36 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 37 | beginCaptures: 38 | "1": 39 | name: keyword.cellnumber.mcnp 40 | "2": 41 | name: constant.numeric.cellmaterial.mcnp 42 | patterns: 43 | - include: "#comment" 44 | - include: "#cell_keywords" 45 | 46 | material_cell: 47 | begin: (?i)^\s{0,4}(\d+)\s+([1-9]\d*)\s+(\S+)\s 48 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 49 | beginCaptures: 50 | "1": 51 | name: keyword.cellnumber.mcnp 52 | "2": 53 | name: constant.numeric.cellmaterial.mcnp 54 | "3": 55 | name: constant.numeric.celldensity.mcnp 56 | patterns: 57 | - include: "#comment" 58 | - include: "#cell_keywords" 59 | 60 | like_cell: 61 | begin: (?i)^\s{0,4}(\d+)\s+(like)\s+\d+\s+(but)\s 62 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 63 | beginCaptures: 64 | "1": 65 | name: keyword.cellnumber.mcnp 66 | "2": 67 | name: constant.language.mcnp 68 | "3": 69 | name: constant.language.mcnp 70 | patterns: 71 | - include: "#comment" 72 | - include: "#cell_keywords" 73 | 74 | cell_keywords: 75 | match: (?i)(IMP|VOL|PWT|EXT|FCL|WWN|DXC|NONU|PD|TMP|TRCL|LAT|FILL|ELPT|COSY|BFLCL|UNC|U) 76 | name: variable.mcnp 77 | 78 | #! Top level for surface cards 79 | surface_cards: 80 | patterns: 81 | - include: "#surface" 82 | 83 | surface: 84 | # [j n A list], where n is optional and can be -ve 85 | begin: (?i)^\s{0,4}([\+\*]?\d+)\s+(-?\d+\s+)?(?=[[a-z]\/]{1,3}) 86 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 87 | beginCaptures: 88 | "1": 89 | name: keyword.surfacenumber.mcnp 90 | "2": 91 | name: constant.numeric.mcnp 92 | patterns: 93 | - include: "#comment" 94 | - include: "#surface_macrobody" 95 | - include: "#surface_core" 96 | 97 | surface_core: 98 | name: constant.language.surfacetype.mcnp 99 | match: (?i)(p[xyz]?|s[qxyzo]?|[ck]\/?[xyz]|gq|t[xyz])[\s\n] 100 | 101 | surface_macrobody: 102 | name: constant.language.surfacetype.mcnp 103 | match: (?i)(box|rpp|sph|rcc|rhp|hex|rec|trc|ell|wed|arb)[\s\n] 104 | 105 | #! Top level for all data cards, which are split by user manyal chapter 106 | data_cards: 107 | patterns: 108 | - include: "#5.5_geometry" 109 | - include: "#5.6_material" 110 | - include: "#5.7_physics" 111 | - include: "#5.8_source" 112 | - include: "#5.9_tally" 113 | - include: "#5.10_perturbation" 114 | - include: "#5.11_mesh_tally" 115 | - include: "#5.12_variance_reduction" 116 | - include: "#5.13_control" 117 | - include: "#miscellaneous" 118 | 119 | #* Chapter level for grouping geometry cards 120 | 5.5_geometry: 121 | patterns: 122 | - include: "#geometry_cardname" 123 | - include: "#geometry_cardname_starred" 124 | - include: "#geometry_cardname_numbered" 125 | - include: "#VOL" 126 | - include: "#TRn" 127 | - include: "#DMn" 128 | - include: "#DAWWG" 129 | - include: "#EMBED" 130 | - include: "#EMBEE" 131 | 132 | # cardname only, no keywords or constants 133 | geometry_cardname: 134 | name: keyword.mcnp 135 | match: (?i)^\s{0,4}(area|u|lat|uran)\s 136 | 137 | geometry_cardname_starred: 138 | name: keyword.mcnp 139 | match: (?i)^\s{0,4}(\*?fill)\s 140 | 141 | geometry_cardname_numbered: 142 | match: (?i)^\s{0,4}(embeb|embem|embtb|embtm|embde|embdf)(\d+)\s 143 | captures: 144 | "1": 145 | name: keyword.mcnp 146 | "2": 147 | name: constant.numeric.mcnp 148 | 149 | VOL: 150 | # multiline likely, and 'no' can appear anywhere 151 | begin: (?i)^\s{0,4}(vol)\s 152 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 153 | beginCaptures: 154 | "1": 155 | name: keyword.mcnp 156 | patterns: 157 | - include: "#comment" 158 | - name: constant.language.mcnp 159 | match: (?i)(no)[\s\n] 160 | 161 | TRn: 162 | # cardname + id, no keywords or constants 163 | match: (?i)^\s{0,4}(\*{0,1}tr)(\d+)\s 164 | captures: 165 | "1": 166 | name: keyword.mcnp 167 | "2": 168 | name: constant.numeric.mcnp 169 | 170 | DMn: 171 | # multiline likely, and material suffix can appear throughout 172 | begin: (?i)^\s{0,4}(DM)(\d+)\s 173 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 174 | beginCaptures: 175 | "1": 176 | name: keyword.mcnp 177 | "2": 178 | name: constant.numeric.mcnp 179 | patterns: 180 | - include: "#comment" 181 | - include: "#zaid.abx" 182 | 183 | DAWWG: 184 | # multiline likely, keywords only 185 | begin: (?i)^\s{0,4}(DAWWG)\s 186 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 187 | beginCaptures: 188 | "1": 189 | name: keyword.mcnp 190 | patterns: 191 | - include: "#comment" 192 | - name: variable.mcnp 193 | match: (?i)(points|xsec|tally|block)(?=[\=\s\n]) 194 | 195 | EMBED: 196 | # multiline likely, keywords + constants 197 | begin: (?i)^\s{0,4}(EMBED)(\d+)\s 198 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 199 | beginCaptures: 200 | "1": 201 | name: keyword.mcnp 202 | "2": 203 | name: constant.numeric.mcnp 204 | patterns: 205 | - include: "#comment" 206 | - include: "#embed_variables" 207 | - include: "#embed_meshgeo" 208 | - include: "#embed_yesno" 209 | - include: "#embed_debug" 210 | - include: "#embed_type" 211 | - include: "#embed_overlap" 212 | 213 | embed_variables: 214 | match: (?i)(background|matcell|mgeoin|mgeout|meein|gmvfile|hdf5file|length|mcnpumfile)[\=\s\n] 215 | name: variable.mcnp 216 | 217 | embed_meshgeo: 218 | match: (?i)(meshgeo)[\s\=]*(lnk3dnt|abaqus|mcnpum|hdf5)?[\s\n] 219 | captures: 220 | "1": 221 | name: variable.mcnp 222 | "2": 223 | name: constant.language.mcnp 224 | 225 | embed_yesno: 226 | match: (?i)(elementchk|calc\_vols)[\s\=]*(yes|no)?[\s\n] 227 | captures: 228 | "1": 229 | name: variable.mcnp 230 | "2": 231 | name: constant.language.mcnp 232 | 233 | embed_debug: 234 | match: (?i)(debug)[\s\=]*(echomesh)?[\s\n] 235 | captures: 236 | "1": 237 | name: variable.mcnp 238 | "2": 239 | name: constant.language.mcnp 240 | 241 | embed_type: 242 | match: (?i)(filetype)[\s\=]*(ascii|binary)?[\s\n] 243 | captures: 244 | "1": 245 | name: variable.mcnp 246 | "2": 247 | name: constant.language.mcnp 248 | 249 | embed_overlap: 250 | match: (?i)(overlap)[\s\=]*(exit|entry|average)?[\s\n] 251 | captures: 252 | "1": 253 | name: variable.mcnp 254 | "2": 255 | name: constant.language.mcnp 256 | 257 | EMBEE: 258 | # multiline likely, keywords + constants 259 | begin: (?i)^\s{0,4}(EMBEE)(\d+)(\:) 260 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 261 | beginCaptures: 262 | "1": 263 | name: keyword.mcnp 264 | "2": 265 | name: constant.numeric.mcnp 266 | patterns: 267 | - include: "#comment" 268 | - include: "#embee_variables" 269 | - include: "#embee_yesno" 270 | - include: "#embee_type" 271 | 272 | embee_variables: 273 | match: (?i)(embed|comment|energy|time|factor|list|mat)[\s\n] 274 | name: variable.mcnp 275 | 276 | embee_yesno: 277 | match: (?i)(errors|atom)[\s\=]*(yes|no)?[\s\n] 278 | captures: 279 | "1": 280 | name: variable.mcnp 281 | "2": 282 | name: constant.language.mcnp 283 | 284 | embee_type: 285 | match: (?i)(mtype)[\s\=]*(flux|isotopic|population|reaction|source|tracks)?[\s\n] 286 | captures: 287 | "1": 288 | name: variable.mcnp 289 | "2": 290 | name: constant.language.mcnp 291 | 292 | #* Chapter level for grouping geometry cards 293 | 5.6_material: 294 | patterns: 295 | - include: "#Mn" 296 | - include: "#MTn" 297 | - include: "#MXn" 298 | - include: "#OTFDB" 299 | - include: "#TOTNU" 300 | - include: "#material_cardname" 301 | - include: "#XSn" 302 | - include: "#DRXS" 303 | 304 | Mn: 305 | # multiline likely, keywords + constants 306 | begin: (?i)^\s{0,4}(m)(\d+)\s 307 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 308 | beginCaptures: 309 | "1": 310 | name: keyword.mcnp 311 | "2": 312 | name: constant.numeric.mcnp 313 | patterns: 314 | - include: "#comment" 315 | - include: "#zaid.abx" 316 | - include: "#material_variables" 317 | - include: "#material_default_libraries" 318 | 319 | material_variables: 320 | # highlight any library identifiers 321 | match: (?i)(gas|[eh]step|cond|ref[is])(?=[\=\s\n]) 322 | name: variable.mcnp 323 | 324 | material_default_libraries: 325 | # highlight any library identifiers 326 | match: (?i)([npehastd]lib|pnlib)[\=\s]+(\d\d[a-z])[\s\n] 327 | captures: 328 | "1": 329 | name: variable.mcnp 330 | "2": 331 | name: constant.language.zaidlib.mcnp 332 | 333 | zaid.abx: 334 | # highlight library identifiers following integers 335 | match: (?i)(?<=\d+)(\.\d{1,2}[a-z])[\s\n] 336 | name: constant.language.zaidlib.mcnp 337 | 338 | any.abx: 339 | # highlight any library identifiers 340 | match: (?i)(\.\d{1,2}[a-z])[\s\n] 341 | name: constant.language.zaidlib.mcnp 342 | 343 | material_cardname: 344 | match: (?i)^\s{0,4}(nonu|awtab|void|mgopt)\s 345 | name: keyword.mcnp 346 | 347 | MTn: 348 | # multiline possible, also has library identifiers 349 | begin: (?i)^\s{0,4}(mt)(\d+) 350 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 351 | beginCaptures: 352 | "1": 353 | name: keyword.mcnp 354 | "2": 355 | name: constant.numeric.mcnp 356 | patterns: 357 | - include: "#comment" 358 | - include: "#any.abx" 359 | 360 | MXn: 361 | # multiline likely, keywords + constants 362 | begin: (?i)^\s{0,4}(mx)(\d+) 363 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 364 | beginCaptures: 365 | "1": 366 | name: keyword.mcnp 367 | "2": 368 | name: constant.numeric.mcnp 369 | patterns: 370 | - include: "#comment" 371 | - include: "#zaid.abx" 372 | - match: (?i)model[\s\n] 373 | name: variable.mcnp 374 | 375 | OTFDB: 376 | # multiline likely, library extensions needed 377 | begin: (?i)^\s{0,4}(otfdb)\s 378 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 379 | beginCaptures: 380 | "1": 381 | name: keyword.mcnp 382 | patterns: 383 | - include: "#comment" 384 | - include: "#zaid.abx" 385 | 386 | TOTNU: 387 | match: (?i)^\s{0,4}(totnu)\s+(no)? 388 | captures: 389 | "1": 390 | name: keyword.mcnp 391 | "2": 392 | name: constant.language.mcnp 393 | 394 | XSn: 395 | # multiline likely, library identifiers 396 | begin: (?i)^\s{0,4}(xs)(\d+)\s 397 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 398 | beginCaptures: 399 | "1": 400 | name: keyword.mcnp 401 | "2": 402 | name: constant.numeric.mcnp 403 | patterns: 404 | - include: "#comment" 405 | - match: (?i)\d+(\.\d{1,2}[a-z])[\s\n] 406 | captures: 407 | "1": 408 | name: constant.language.mcnp 409 | 410 | DRXS: 411 | # multiline likely, library identifiers 412 | begin: (?i)^\s{0,4}(drxs)\s 413 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 414 | beginCaptures: 415 | "1": 416 | name: keyword.mcnp 417 | patterns: 418 | - include: "#comment" 419 | - match: (?i)\d+(\.\d{1,2}[a-z])[\s\n] 420 | captures: 421 | "1": 422 | name: constant.language.mcnp 423 | 424 | #* Chapter level for physics cards 425 | 5.7_physics: 426 | patterns: 427 | - include: "#physics_cardname" 428 | - include: "#physics_cardname_p" 429 | - include: "#PHYS" 430 | - include: "#MPHYS" 431 | - include: "#ACT" 432 | - include: "#DBRC" 433 | - include: "#FMULT" 434 | - include: "#TROPT" 435 | - include: "#BFLDn" 436 | - include: "#FIELD" 437 | 438 | physics_cardname: 439 | match: (?i)^\s{0,4}(mode|lca|lcb|lcc|lea|leb|cosyp|cosy|bflcl)\s 440 | name: keyword.mcnp 441 | 442 | physics_cardname_p: 443 | match: (?i)^\s{0,4}(phys|cut|elpt|tmp|thtme|unc)(?=\:) 444 | name: keyword.mcnp 445 | 446 | ACT: 447 | # multiline likely, keywords + constants 448 | begin: (?i)^\s{0,4}(act)\s 449 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 450 | beginCaptures: 451 | "1": 452 | name: keyword.mcnp 453 | patterns: 454 | - include: "#comment" 455 | - include: "#act_variables" 456 | - include: "#act_delayed_n" 457 | - include: "#act_delayed_g" 458 | - include: "#act_sample" 459 | - include: "#act_fission" 460 | 461 | act_variables: 462 | match: (?i)(thresh|dnbias|nap|d[ng]eb|pecut|hlcut)(?=[\=\s\n]) 463 | name: variable.mcnp 464 | 465 | act_delayed_n: 466 | match: (?i)(dn)[\s\=]*(model|library|both|prompt)?[\s\n] 467 | captures: 468 | "1": 469 | name: variable.mcnp 470 | "2": 471 | name: constant.language.mcnp 472 | 473 | act_delayed_g: 474 | match: (?i)(dg)[\s\=]*(lines|mg|none)?[\s\n] 475 | captures: 476 | "1": 477 | name: variable.mcnp 478 | "2": 479 | name: constant.language.mcnp 480 | 481 | act_sample: 482 | match: (?i)(sample)[\s\=]*(correlate|nonfiss_cor)?[\s\n] 483 | captures: 484 | "1": 485 | name: variable.mcnp 486 | "2": 487 | name: constant.language.mcnp 488 | 489 | act_fission: 490 | match: (?i)(nonfiss|fission)[\s\=]*(none|[npefa,\s]+)?[\s\n] 491 | captures: 492 | "1": 493 | name: variable.mcnp 494 | "2": 495 | name: constant.language.mcnp 496 | 497 | DBRC: 498 | # multiline likely, keywords + constants 499 | begin: (?i)^\s{0,4}(dbrc)\s 500 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 501 | beginCaptures: 502 | "1": 503 | name: keyword.mcnp 504 | patterns: 505 | - include: "#comment" 506 | # isos is zzzaaa but no suffix so no library syntax needed 507 | - match: (?i)(endf|emax|isos)(?=[\=\s\n]) 508 | name: variable.mcnp 509 | 510 | MPHYS: 511 | # single line 512 | match: (?i)^\s{0,4}(MPHYS)\s+(on|off)? 513 | captures: 514 | "1": 515 | name: keyword.mcnp 516 | "2": 517 | name: constant.language.mcnp 518 | 519 | FMULT: 520 | # multiline likely, just a set of keywords 521 | begin: (?i)^\s{0,4}(fmult)\s 522 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 523 | beginCaptures: 524 | "1": 525 | name: keyword.mcnp 526 | patterns: 527 | - include: "#comment" 528 | - match: (?i)(sfnu|width|sfyield|watt|method|data|shift)(?=[\=\s\n]) 529 | name: variable.mcnp 530 | 531 | TROPT: 532 | # multiline likely, keywords + constants 533 | begin: (?i)^\s{0,4}(tropt)\s 534 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 535 | beginCaptures: 536 | "1": 537 | name: keyword.mcnp 538 | patterns: 539 | - include: "#comment" 540 | - include: "#tropt_variables" 541 | - include: "#tropt_mcscat" 542 | - include: "#tropt_eloss" 543 | - include: "#tropt_nreact" 544 | - include: "#tropt_mescat" 545 | 546 | tropt_variables: 547 | match: (?i)(genxs)(?=[\=\s\n]) 548 | name: variable.mcnp 549 | 550 | tropt_mcscat: 551 | match: (?i)(mcscat)[\s\=]*(off|fnal[12]|gaussian)?[\s\n] 552 | captures: 553 | "1": 554 | name: variable.mcnp 555 | "2": 556 | name: constant.language.mcnp 557 | 558 | tropt_eloss: 559 | match: (?i)(eloss)[\s\=]*(off|strag1|csda)?[\s\n] 560 | captures: 561 | "1": 562 | name: variable.mcnp 563 | "2": 564 | name: constant.language.mcnp 565 | 566 | tropt_nreact: 567 | match: (?i)(nreact)[\s\=]*(off|on|atten|remove)?[\s\n] 568 | captures: 569 | "1": 570 | name: variable.mcnp 571 | "2": 572 | name: constant.language.mcnp 573 | 574 | tropt_mescat: 575 | match: (?i)(mescat|nescat)[\s\=]*(off|on)?[\s\n] 576 | captures: 577 | "1": 578 | name: variable.mcnp 579 | "2": 580 | name: constant.language.mcnp 581 | 582 | BFLDn: 583 | # multiline likely, keywords + constants 584 | begin: (?i)^\s{0,4}(bfld)(\d+)\s 585 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 586 | beginCaptures: 587 | "1": 588 | name: keyword.mcnp 589 | "2": 590 | name: constant.numeric.mcnp 591 | patterns: 592 | - include: "#comment" 593 | - match: (?i)(field|vec|axs|refpnt|mxdeflc|maxstep|ffedges)(?=[\=\s\n]) 594 | name: variable.mcnp 595 | - match: (?i)(type)[\s\=]*(const|quad|quadff)?[\s\n] 596 | captures: 597 | "1": 598 | name: variable.mcnp 599 | "2": 600 | name: constant.language.mcnp 601 | 602 | FIELD: 603 | # multiline possible, keywords only 604 | begin: (?i)^\s{0,4}(field)\s 605 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 606 | beginCaptures: 607 | "1": 608 | name: keyword.mcnp 609 | patterns: 610 | - include: "#comment" 611 | - match: (?i)(gcut|gpar|grad|gsur)(?=[\=\s\n]) 612 | name: variable.mcnp 613 | 614 | #* Chapter level for physics cards 615 | 5.8_source: 616 | patterns: 617 | - include: "#SDEF" 618 | - include: "#SIn" 619 | - include: "#SPn/SBn" 620 | - include: "#DSn" 621 | - include: "#SCn" 622 | - include: "#SSW" 623 | - include: "#SSR" 624 | - include: "#KCODE/KSRC/HSRC" 625 | - include: "#KOPTS" 626 | - include: "#BURN" 627 | 628 | SDEF: 629 | # multiline possible, keywords only 630 | begin: (?i)^\s{0,4}(sdef)\s 631 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 632 | beginCaptures: 633 | "1": 634 | name: keyword.mcnp 635 | patterns: 636 | - include: "#comment" 637 | - name: constant.language.mcnp 638 | match: (?i)(?<=[\=\s]+)(fcel|ftr|ferg)(?=[\=\s\n]) 639 | - name: variable.mcnp 640 | match: 641 | (?i)\s*(cel|sur|erg|ftme|tme|dir|vec|nrm|pos|rad|ext|axs|[xyz]|ccc| 642 | ara|wgt|tr|eff|par|dat|loc|bem|bap)(?=[\=\s\n]) 643 | 644 | SIn: 645 | match: (?i)^\s{0,4}(si)(\d+)\s+([hals])? 646 | captures: 647 | "1": 648 | name: keyword.mcnp 649 | "2": 650 | name: constant.numeric.mcnp 651 | "3": 652 | name: constant.language.mcnp 653 | 654 | SPn/SBn: 655 | match: (?i)^\s{0,4}(s[pb])(\d+)(\s+[dcvw])?(s+\-\d+\s)? 656 | captures: 657 | "1": 658 | name: keyword.mcnp 659 | "2": 660 | name: constant.numeric.mcnp 661 | "3": 662 | name: constant.language.mcnp 663 | 664 | DSn: 665 | match: (?i)^\s{0,4}(ds)(\d+)(\s+[hsltq])? 666 | captures: 667 | "1": 668 | name: keyword.mcnp 669 | "2": 670 | name: constant.numeric.mcnp 671 | "3": 672 | name: constant.language.mcnp 673 | 674 | SCn: 675 | match: (?i)^\s{0,4}(sc)(\d+)(\s.*$)? 676 | captures: 677 | "1": 678 | name: keyword.mcnp 679 | "2": 680 | name: constant.numeric.mcnp 681 | "3": 682 | name: string.mcnp 683 | 684 | SSW: 685 | # multiline probable, keywords only 686 | begin: (?i)^\s{0,4}(ssw)\s 687 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 688 | beginCaptures: 689 | "1": 690 | name: keyword.mcnp 691 | patterns: 692 | - include: "#comment" 693 | - name: variable.mcnp 694 | match: (?i)\s*(sym|pty|cel)(?=[\=\s\n]) 695 | 696 | SSR: 697 | # multiline probable, keywords only 698 | begin: (?i)^\s{0,4}(ssr)\s 699 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 700 | beginCaptures: 701 | "1": 702 | name: keyword.mcnp 703 | patterns: 704 | - include: "#comment" 705 | - name: variable.mcnp 706 | match: (?i)\s*(old|cel|new|pty|col|wgt|tr|psc|axs|ext|poa|bcw)(?=[\=\s\n]) 707 | 708 | KCODE/KSRC/HSRC: 709 | # single line 710 | match: (?i)^\s{0,4}(kcode|ksrc|hsrc)\s 711 | name: keyword.mcnp 712 | 713 | KOPTS: 714 | # multiline probable, keywords and constants 715 | begin: (?i)^\s{0,4}(kopts)\s 716 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 717 | beginCaptures: 718 | "1": 719 | name: keyword.mcnp 720 | patterns: 721 | - include: "#comment" 722 | # variables without predefined constants 723 | - name: variable.mcnp 724 | match: (?i)(BLOCKSIZE|FMATSKIP|FMATNCYC|FMATSPACE|FMATN[xyz])(?=[\=\s\n]) 725 | # variables with yes/no constants 726 | - match: (?i)(kinetics|precursor|FMATCONVRG|FMATACCEL|FMATSRC|fmat)[\s\=]*(yes|no)?[\s\n] 727 | captures: 728 | "1": 729 | name: variable.mcnp 730 | "2": 731 | name: constant.language.mcnp 732 | # variables for sensitivity 733 | - match: (?i)(ksental)[\s\=]*(mctal)?[\s\n] 734 | captures: 735 | "1": 736 | name: variable.mcnp 737 | "2": 738 | name: constant.language.mcnp 739 | 740 | BURN: 741 | # multiline probable, keywords and constants 742 | begin: (?i)^\s{0,4}(burn)\s 743 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 744 | beginCaptures: 745 | "1": 746 | name: keyword.mcnp 747 | patterns: 748 | - include: "#comment" 749 | # variables without predefined constants 750 | - name: variable.mcnp 751 | match: (?i)(time|pftrac|power|omit|afmin|bopt|swapb|matvol|matmod|mat|PFRAC)(?=[\=\s\n]) 752 | # flags 753 | - name: constant.language.mcnp 754 | match: (?i)(nostats) 755 | 756 | #* Chapter level for physics cards 757 | 5.9_tally: 758 | patterns: 759 | - include: "#Fn_plus" 760 | - include: "#F5_detector" 761 | - include: "#F5_array" 762 | - include: "#Fn" 763 | - include: "#FCn" 764 | - include: "#En" 765 | - include: "#Tn" 766 | - include: "#Cn" 767 | - include: "#FQn" 768 | - include: "#FMn/FSn/FUn" # just lists but end in 'C' or 'T' 769 | - include: "#DEn/DFn" 770 | - include: "#EMn/TMn/CFn/SFn/SDn/TFn" # all just lists, no kw, no cst 771 | - include: "#FTn" 772 | - include: "#NOTRN" 773 | 774 | # todo: could be single line really 775 | Fn: 776 | # most cell/surface '*Fn' and 'Fn' tallies 777 | begin: (?i)^\s{0,4}(\**f)(\d*[1247])(\:) 778 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 779 | beginCaptures: 780 | "1": 781 | name: keyword.mcnp 782 | "2": 783 | name: constant.numeric.mcnp 784 | patterns: 785 | - include: "#comment" 786 | # flags 787 | - name: constant.language.mcnp 788 | match: (?i)\sT[\s\n] 789 | # repeated structures 790 | - name: variable.mcnp 791 | match: (?i)(u)\s*(?=\=) 792 | 793 | Fn_plus: 794 | # the f6 and f8 tallies can also be preceeded by a '+' 795 | # kept separate from general case to hint at a problem 796 | begin: (?i)^\s{0,4}([\+\*]*f)(\d*[68])[\s:] 797 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 798 | beginCaptures: 799 | "1": 800 | name: keyword.mcnp 801 | "2": 802 | name: constant.numeric.mcnp 803 | patterns: 804 | - include: "#comment" 805 | # flags 806 | - name: constant.language.mcnp 807 | match: (?i)\sT[\s\n] 808 | # repeated structures 809 | - name: variable.mcnp 810 | match: (?i)(u)\s*(?=\=) 811 | 812 | F5_detector: 813 | # point/ring detector tallies have 'ND' to look for but no 'T' 814 | # ring also has 'Fna' where a is the axis of the ring 815 | begin: (?i)^\s{0,4}(\**f)(\d*5)([xyz]?)(\:) 816 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 817 | beginCaptures: 818 | "1": 819 | name: keyword.mcnp 820 | "2": 821 | name: constant.numeric.mcnp 822 | "3": 823 | name: keyword.mcnp 824 | patterns: 825 | - include: "#comment" 826 | # flags 827 | - name: constant.language.mcnp 828 | match: (?i)\snd[\s\n] 829 | 830 | F5_array: 831 | # radiography arrays of point detectors 832 | # sinple with nothing multiline to look for 833 | match: (?i)^\s{0,4}([\*]*fi[prc])(\d*5)(\:) 834 | captures: 835 | "1": 836 | name: keyword.mcnp 837 | "2": 838 | name: constant.numeric.mcnp 839 | 840 | FCn: 841 | match: (?i)^\s{0,4}(fc)(\d*[124-8])(\s.*$)? 842 | captures: 843 | "1": 844 | name: keyword.mcnp 845 | "2": 846 | name: constant.numeric.mcnp 847 | "3": 848 | name: string.mcnp 849 | 850 | En: 851 | # multiline probable, has constants 852 | begin: (?i)^\s{0,4}(E)(\d*[0124-8])\s 853 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 854 | beginCaptures: 855 | "1": 856 | name: keyword.mcnp 857 | "2": 858 | name: constant.numeric.mcnp 859 | patterns: 860 | - include: "#comment" 861 | # todo must be at end of the input line 862 | - name: constant.language.mcnp 863 | match: (?i)\s(nt|C)[\s\n] 864 | 865 | Tn: 866 | # multiline probable, has keywords and constants 867 | begin: (?i)^\s{0,4}(T)(\d*[124-8])\s 868 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 869 | beginCaptures: 870 | "1": 871 | name: keyword.mcnp 872 | "2": 873 | name: constant.numeric.mcnp 874 | patterns: 875 | - include: "#comment" 876 | # most keyword variables 877 | - name: variable.mcnp 878 | match: (?i)\s*(cbeg|cfrq|cofi|coni|csub|cend)(?=[\=\s\n]) 879 | # todo must be at end of the input line 880 | - name: constant.language.mcnp 881 | match: (?i)\s(nt|C)[\s\n] 882 | 883 | Cn: 884 | # can have a '*' modifier to use degrees instead of cosines 885 | # multiline probable, has keywords and constants 886 | begin: (?i)^\s{0,4}(\**C)(\d*[124-8])\s 887 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 888 | beginCaptures: 889 | "1": 890 | name: keyword.mcnp 891 | "2": 892 | name: constant.numeric.mcnp 893 | patterns: 894 | - include: "#comment" 895 | - name: constant.language.mcnp 896 | match: (?i)\s(t|C)$ 897 | 898 | FQn: 899 | # multiline probable, has a million keywords 900 | begin: (?i)^\s{0,4}(fq)(\d*[124-8])\s 901 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 902 | beginCaptures: 903 | "1": 904 | name: keyword.mcnp 905 | "2": 906 | name: constant.numeric.mcnp 907 | patterns: 908 | - include: "#comment" 909 | - match: (?i)\s*(f|d|u|s|m|c|e|t)[\s\n]+ 910 | name: constant.language.mcnp 911 | 912 | DEn/DFn: 913 | # multiline probable, has keywords 914 | begin: (?i)^\s{0,4}(d[ef])(\d*[0124-8])\s 915 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 916 | beginCaptures: 917 | "1": 918 | name: keyword.mcnp 919 | "2": 920 | name: constant.numeric.mcnp 921 | patterns: 922 | - include: "#comment" 923 | - name: variable.mcnp 924 | match: (?i)(ic|iu|fac)\s*(?=\={0,1}) 925 | - name: constant.language.mcnp 926 | match: (?i)(log|lin)\s 927 | 928 | EMn/TMn/CFn/SFn/SDn/TFn: 929 | # single line 930 | match: (?i)^\s{0,4}(em|tm|cf|sf|sd|tf)(\d*[0124-8])\s 931 | captures: 932 | "1": 933 | name: keyword.mcnp 934 | "2": 935 | name: constant.numeric.mcnp 936 | 937 | FMn/FSn/FUn: 938 | # multiline probable, has constants only at end 939 | begin: (?i)^\s{0,4}(fm|fs|fu)(\d*[124-8])\s 940 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 941 | beginCaptures: 942 | "1": 943 | name: keyword.mcnp 944 | "2": 945 | name: constant.numeric.mcnp 946 | patterns: 947 | - include: "#comment" 948 | - name: constant.language.mcnp 949 | match: (?i)\s(t|C)$ 950 | 951 | FTn: 952 | # multiline probable, has a million keywords 953 | begin: (?i)^\s{0,4}(ft)(\d*[124-8])\s 954 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 955 | beginCaptures: 956 | "1": 957 | name: keyword.mcnp 958 | "2": 959 | name: constant.numeric.mcnp 960 | patterns: 961 | - include: "#comment" 962 | - name: variable.mcnp 963 | match: (?i)(geb|frv|tmc|scx|elc|phl|cap|res|tag|roc|pds|fft|com|spm|mgc|fns|lcs)\s*(?=\={0,1}) 964 | - name: constant.language.mcnp 965 | match: (?i)(inc|icd|scd|ptt|let)[\s\n] 966 | 967 | NOTRN: 968 | # single line flag, no arguments 969 | match: (?i)^\s{0,4}(notrn)$ 970 | name: keyword.mcnp 971 | 972 | #* Chapter level for perturbation cards 973 | 5.10_perturbation: 974 | patterns: 975 | - include: "#PERTn" 976 | - include: "#KPERTn" 977 | - include: "#KSENn" 978 | 979 | PERTn: 980 | # multiline probable, some variables 981 | begin: (?i)^\s{0,4}(pert)(\d+)(\:) 982 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 983 | beginCaptures: 984 | "1": 985 | name: keyword.mcnp 986 | "2": 987 | name: constant.numeric.mcnp 988 | patterns: 989 | - include: "#comment" 990 | - name: variable.mcnp 991 | match: (?i)(cell|mat|rho|method|erg|rxn)\s*(?=\={0,1}) 992 | 993 | KPERTn: 994 | # multiline probable, some variables 995 | begin: (?i)^\s{0,4}(kpert)(\d+)\s 996 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 997 | beginCaptures: 998 | "1": 999 | name: keyword.mcnp 1000 | "2": 1001 | name: constant.numeric.mcnp 1002 | patterns: 1003 | - include: "#comment" 1004 | - name: variable.mcnp 1005 | match: (?i)(cell|mat|rho|iso|rxn|erg)\s*(?=\={0,1}) 1006 | - match: (?i)(linear)[\s\=]*(yes|no)?[\s\n] 1007 | captures: 1008 | "1": 1009 | name: variable.mcnp 1010 | "2": 1011 | name: constant.language.mcnp 1012 | 1013 | KSENn: 1014 | # multiline probable, some variables 1015 | begin: (?i)^\s{0,4}(ksen)(\d+)\s+(xs)\s 1016 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1017 | beginCaptures: 1018 | "1": 1019 | name: keyword.mcnp 1020 | "2": 1021 | name: constant.numeric.mcnp 1022 | "3": 1023 | name: constant.language.mcnp 1024 | patterns: 1025 | - include: "#comment" 1026 | - name: variable.mcnp 1027 | match: (?i)(iso|rxn|mt|erg|ein|legendre|cos)\s*(?=\={0,1}) 1028 | - match: (?i)(constrain)[\s\=]*(yes|no)?[\s\n] 1029 | captures: 1030 | "1": 1031 | name: variable.mcnp 1032 | "2": 1033 | name: constant.language.mcnp 1034 | 1035 | #* Chapter level for perturbation cards 1036 | 5.11_mesh_tally: 1037 | patterns: 1038 | - include: "#FMESHn" 1039 | - include: "#tmesh_markers" 1040 | - include: "#tmesh_numbered" 1041 | - include: "#MSHMFn" 1042 | - include: "#XMESH1" 1043 | - include: "#XMESH2" 1044 | - include: "#XMESH3" 1045 | - include: "#XMESH4" 1046 | - include: "#SPDTL" 1047 | 1048 | FMESHn: 1049 | begin: (?i)^\s{0,4}(\**fmesh)(\d*4|\d*01)(\:) 1050 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1051 | beginCaptures: 1052 | "1": 1053 | name: keyword.mcnp 1054 | "2": 1055 | name: constant.numeric.mcnp 1056 | patterns: 1057 | - include: "#comment" 1058 | - include: "#fmesh_variables" 1059 | - include: "#fmesh_yesno" 1060 | - include: "#fmesh_geometry" 1061 | - include: "#fmesh_output" 1062 | - include: "#fmesh_type" 1063 | - include: "#fmesh_cuv" 1064 | - include: "#fmesh_tally" 1065 | 1066 | fmesh_variables: 1067 | match: (?i)(origin|axs|vec|[ijket]mesh|[ijket]ints|factor|tr|inc|kclear)\s*(?=\={0,1}) 1068 | name: variable.mcnp 1069 | 1070 | fmesh_yesno: 1071 | match: (?i)([et]norm|voidoff|vtkout|prntcell)[\s\=]*(yes|no)?[\s\n] 1072 | captures: 1073 | "1": 1074 | name: variable.mcnp 1075 | "2": 1076 | name: constant.language.mcnp 1077 | 1078 | fmesh_geometry: 1079 | match: (?i)(geom)[\s\=]*(xyz|rzt|cyl|rec)[\s\n] 1080 | captures: 1081 | "1": 1082 | name: variable.mcnp 1083 | "2": 1084 | name: constant.language.mcnp 1085 | 1086 | fmesh_output: 1087 | match: (?i)(out)[\s\=]*(colsci|col|cfsci|cf|ij|ik|jk|none|xdmf)[\s\n] 1088 | captures: 1089 | "1": 1090 | name: variable.mcnp 1091 | "2": 1092 | name: constant.language.mcnp 1093 | 1094 | fmesh_type: 1095 | match: (?i)(type)[\s\=]*(flux|source)?[\s\n] 1096 | captures: 1097 | "1": 1098 | name: variable.mcnp 1099 | "2": 1100 | name: constant.language.mcnp 1101 | 1102 | fmesh_cuv: 1103 | match: (?i)(smpl_ty)[\s\=]*(syst|rand|regular)?[\s\n] 1104 | captures: 1105 | "1": 1106 | name: variable.mcnp 1107 | "2": 1108 | name: constant.language.mcnp 1109 | 1110 | fmesh_tally: 1111 | match: (?i)(tally)[\s\=]*(fast_hist|hist|rma_batch|batch)?[\s\n] 1112 | captures: 1113 | "1": 1114 | name: variable.mcnp 1115 | "2": 1116 | name: constant.language.mcnp 1117 | 1118 | tmesh_markers: 1119 | match: (?i)^\s{0,4}(TMESH|ENDMD)\s 1120 | name: keyword.mcnp 1121 | 1122 | tmesh_numbered: 1123 | match: (?i)^\s{0,4}(cor[abc]|ergsh)(\d*[1-4])\s 1124 | captures: 1125 | "1": 1126 | name: keyword.mcnp 1127 | "2": 1128 | name: constant.numeric.mcnp 1129 | 1130 | MSHMFn: 1131 | match: (?i)^\s{0,4}(mshmf)(\d+)\s 1132 | captures: 1133 | "1": 1134 | name: keyword.mcnp 1135 | "2": 1136 | name: constant.numeric.mcnp 1137 | 1138 | XMESH1: 1139 | # only applies to tally type 1 1140 | begin: (?i)^\s{0,4}([rcs]mesh)(\d*1)(\:) 1141 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1142 | beginCaptures: 1143 | "1": 1144 | name: keyword.mcnp 1145 | "2": 1146 | name: constant.numeric.mcnp 1147 | patterns: 1148 | - include: "#comment" 1149 | - match: (?i)(mfact|trans)\s*(?=\={0,1}) 1150 | name: variable.mcnp 1151 | - match: (?i)(traks|flux|popul|pedep)[\s\n] 1152 | name: constant.language.mcnp 1153 | 1154 | XMESH2: 1155 | # only applies to tally type 2 1156 | begin: (?i)^\s{0,4}([rcs]mesh)(\d*2)\s 1157 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1158 | beginCaptures: 1159 | "1": 1160 | name: keyword.mcnp 1161 | "2": 1162 | name: constant.numeric.mcnp 1163 | patterns: 1164 | - include: "#comment" 1165 | - match: (?i)(trans)\s*(?=\={0,1}) 1166 | name: variable.mcnp 1167 | 1168 | XMESH3: 1169 | # only applies to tally type 3 1170 | begin: (?i)^\s{0,4}([rcs]mesh)(\d*3)\s 1171 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1172 | beginCaptures: 1173 | "1": 1174 | name: keyword.mcnp 1175 | "2": 1176 | name: constant.numeric.mcnp 1177 | patterns: 1178 | - include: "#comment" 1179 | - match: (?i)(mfact|trans)\s*(?=\={0,1}) 1180 | name: variable.mcnp 1181 | - match: (?i)(total|de\/dx|recol|tlest|edlct)[\s\n] 1182 | name: constant.language.mcnp 1183 | 1184 | XMESH4: 1185 | # only applies to tally type 4 1186 | begin: (?i)^\s{0,4}([rcs]mesh)(\d*4)(\:) 1187 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1188 | beginCaptures: 1189 | "1": 1190 | name: keyword.mcnp 1191 | "2": 1192 | name: constant.numeric.mcnp 1193 | patterns: 1194 | - include: "#comment" 1195 | - match: (?i)(trans)\s*(?=\={0,1}) 1196 | name: variable.mcnp 1197 | 1198 | SPDTL: 1199 | match: (?i)(SPDTL)\s+(force|off)?\s? 1200 | captures: 1201 | "1": 1202 | name: variable.mcnp 1203 | "2": 1204 | name: constant.language.mcnp 1205 | 1206 | #* Chapter level for perturbation cards 1207 | 5.12_variance_reduction: 1208 | patterns: 1209 | - include: "#vr_cardname" 1210 | - include: "#vr_cardname_p" 1211 | - include: "#vr_cardname_n" 1212 | - include: "#vr_cardname_n_p" 1213 | - include: "#VAR" 1214 | - include: "#DDn" 1215 | - include: "#PDn" 1216 | - include: "#MESH" 1217 | 1218 | vr_cardname: 1219 | match: (?i)^\s{0,4}(wwg|pwt)\s 1220 | name: keyword.mcnp 1221 | 1222 | vr_cardname_p: 1223 | match: (?i)^\s{0,4}(imp|ww[etp]|wwg[et]|[et]splt|ext|vect|fcl|dxt|spabi)(?=\:) 1224 | name: keyword.mcnp 1225 | 1226 | vr_cardname_n: 1227 | match: (?i)^\s{0,4}(dxc|bbrem)(\d+)\s 1228 | captures: 1229 | "1": 1230 | name: keyword.mcnp 1231 | "2": 1232 | name: constant.numeric.mcnp 1233 | 1234 | vr_cardname_n_p: 1235 | match: (?i)^\s{0,4}(WWN\d+)(?=\:) 1236 | captures: 1237 | "1": 1238 | name: keyword.mcnp 1239 | "2": 1240 | name: constant.numeric.mcnp 1241 | 1242 | VAR: 1243 | match: (?i)^\s{0,4}(var)\s+(on|off)?\s 1244 | captures: 1245 | "1": 1246 | name: variable.mcnp 1247 | "2": 1248 | name: constant.language.mcnp 1249 | 1250 | DDn: 1251 | match: (?i)^\s{0,4}(dd)(\d*)\s 1252 | captures: 1253 | "1": 1254 | name: keyword.mcnp 1255 | "2": 1256 | name: constant.numeric.mcnp 1257 | 1258 | PDn: 1259 | match: (?i)^\s{0,4}(pd)(\d*[124-8])\s 1260 | captures: 1261 | "1": 1262 | name: keyword.mcnp 1263 | "2": 1264 | name: constant.numeric.mcnp 1265 | 1266 | MESH: 1267 | begin: (?i)^\s{0,4}(mesh)\s 1268 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1269 | beginCaptures: 1270 | "1": 1271 | name: keyword.mcnp 1272 | "2": 1273 | name: constant.numeric.mcnp 1274 | patterns: 1275 | - include: "#comment" 1276 | - include: "#mesh_geometry" 1277 | - include: "#mesh_variables" 1278 | 1279 | mesh_variables: 1280 | match: (?i)(ref|origin|axs|vec|[ijk]mesh|[ijk]ints)\s*(?=\={0,1}) 1281 | name: variable.mcnp 1282 | 1283 | mesh_geometry: 1284 | match: (?i)(geom)[\s\=]*(xyz|rzt|cyl|rec|rpt|sph)[\s\n] 1285 | captures: 1286 | "1": 1287 | name: variable.mcnp 1288 | "2": 1289 | name: constant.language.mcnp 1290 | 1291 | PIKMT: 1292 | begin: (?i)^\s{0,4}(pikmt)\s 1293 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1294 | beginCaptures: 1295 | "1": 1296 | name: keyword.mcnp 1297 | patterns: 1298 | - include: "#comment" 1299 | - include: "#zaid.abx" 1300 | 1301 | #* Chapter level for perturbation cards 1302 | 5.13_control: 1303 | patterns: 1304 | - include: "#ctrl_cardname" 1305 | - include: "#STOP" 1306 | - include: "#RAND" 1307 | - include: "#PTRAC" 1308 | - include: "#PIO" 1309 | - include: "#READ" 1310 | 1311 | ctrl_cardname: 1312 | match: (?i)^\s{0,4}(nps|ctme|print|talnp|prdmp|mcplot|histp|dbcn|lost|idum|rdum|files)\s 1313 | name: keyword.mcnp 1314 | 1315 | STOP: 1316 | # multiline probable, some variables 1317 | begin: (?i)^\s{0,4}(stop)\s 1318 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1319 | beginCaptures: 1320 | "1": 1321 | name: keyword.mcnp 1322 | patterns: 1323 | - include: "#comment" 1324 | - match: (?i)(nps|ctme)\s*(?=\={0,1}) 1325 | name: variable.mcnp 1326 | - match: (?i)(f)(\d+)\s*(?=\={0,1}) 1327 | captures: 1328 | "1": 1329 | name: keyword.mcnp 1330 | "2": 1331 | name: constant.numeric.mcnp 1332 | 1333 | RAND: 1334 | # multiline probable, some variables 1335 | begin: (?i)^\s{0,4}(rand)\s 1336 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1337 | beginCaptures: 1338 | "1": 1339 | name: keyword.mcnp 1340 | patterns: 1341 | - include: "#comment" 1342 | - match: (?i)(gen|seed|stride|hist)\s*(?=\={0,1}) 1343 | name: variable.mcnp 1344 | 1345 | PTRAC: 1346 | # multiline probable, some variables 1347 | begin: (?i)^\s{0,4}(ptrac)\s 1348 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1349 | beginCaptures: 1350 | "1": 1351 | name: keyword.mcnp 1352 | patterns: 1353 | - include: "#comment" 1354 | - include: "#ptrac_core" 1355 | - include: "#ptrac_file" 1356 | - include: "#ptrac_write" 1357 | - include: "#ptrac_coinc" 1358 | - include: "#ptrac_event" 1359 | 1360 | ptrac_core: 1361 | match: (?i)(buffer|flushnps|max|meph|filter|type|nps|cell|surface|tally|value)\s*(?=\={0,1}) 1362 | name: variable.mcnp 1363 | 1364 | ptrac_file: 1365 | match: (?i)(file)[\s\=]*(hdf5|asc|bin|aov|bov)[\s\n] 1366 | captures: 1367 | "1": 1368 | name: variable.mcnp 1369 | "2": 1370 | name: constant.language.mcnp 1371 | 1372 | ptrac_write: 1373 | match: (?i)(write)[\s\=]*(pos|all)?[\s\n] 1374 | captures: 1375 | "1": 1376 | name: variable.mcnp 1377 | "2": 1378 | name: constant.language.mcnp 1379 | 1380 | ptrac_coinc: 1381 | match: (?i)(coinc)[\s\=]*(col|lin)?[\s\n] 1382 | captures: 1383 | "1": 1384 | name: variable.mcnp 1385 | "2": 1386 | name: constant.language.mcnp 1387 | 1388 | ptrac_event: 1389 | match: (?i)(event)[\s\=]*(src|bnk|sur|col|ter|cap)?[\s\n] 1390 | captures: 1391 | "1": 1392 | name: variable.mcnp 1393 | "2": 1394 | name: constant.language.mcnp 1395 | 1396 | PIO: 1397 | match: (?i)(PIO)\s+(on|no)?[\s\n] 1398 | captures: 1399 | "1": 1400 | name: variable.mcnp 1401 | "2": 1402 | name: constant.language.mcnp 1403 | 1404 | READ: 1405 | begin: (?i)^\s{0,4}(read)\s 1406 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1407 | beginCaptures: 1408 | "1": 1409 | name: keyword.mcnp 1410 | patterns: 1411 | - include: "#comment" 1412 | - include: "#read_variables" 1413 | - include: "#read_flags" 1414 | 1415 | read_variables: 1416 | match: (?i)(file|decode|encode)(?=[\s\=\n]) 1417 | name: variable.mcnp 1418 | 1419 | read_flags: 1420 | match: (?i)(noecho|echo)\s 1421 | name: constant.language.mcnp 1422 | 1423 | DISABLE: 1424 | match: (?i)(disable)\s+(NUCLIDE\_ACTIVITY\_TABLE)? 1425 | captures: 1426 | "1": 1427 | name: variable.mcnp 1428 | "2": 1429 | name: constant.language.mcnp 1430 | 1431 | #* Miscellaneous for custom cards from MCNP mods 1432 | miscellaneous: 1433 | patterns: 1434 | - include: "#vertical_input" 1435 | - include: "#SDDR" 1436 | - include: "#DECMn" 1437 | - include: "#NACT" 1438 | - include: "#DECTRn" 1439 | - include: "#NCMn" 1440 | - include: "#NAMn" 1441 | 1442 | vertical_input: 1443 | match: (?i)^\s{0,4}(#)\s 1444 | name: keyword.mcnp 1445 | 1446 | # for Novel 1-Step routines 1447 | SDDR: 1448 | begin: (?i)^\s{0,4}(sddr)\s 1449 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1450 | beginCaptures: 1451 | "1": 1452 | name: keyword.mcnp 1453 | patterns: 1454 | - include: "#comment" 1455 | - include: "#srctme" 1456 | - include: "#contrib" 1457 | 1458 | contrib: 1459 | match: (?i)(contrib)[\s\=]*(zaid|cell|voxel)?[\s\n] 1460 | captures: 1461 | "1": 1462 | name: variable.mcnp 1463 | "2": 1464 | name: constant.language.mcnp 1465 | 1466 | srctme: 1467 | name: variable.mcnp 1468 | match: (?i)(srctme)(?=[\=\s\n]) 1469 | 1470 | # for Novel 1-Step routines 1471 | DECMn: 1472 | begin: (?i)^\s{0,4}(decm)(\d+)\s 1473 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1474 | beginCaptures: 1475 | "1": 1476 | name: keyword.mcnp 1477 | "2": 1478 | name: constant.numeric.mcnp 1479 | patterns: 1480 | - include: "#comment" 1481 | - match: (?i)(cells|mat|rho)\s*(?=\={0,1}) 1482 | name: variable.mcnp 1483 | 1484 | # for Novel 1-Step routines 1485 | NACT: 1486 | begin: (?i)^\s{0,4}(nact)\s 1487 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1488 | beginCaptures: 1489 | "1": 1490 | name: keyword.mcnp 1491 | patterns: 1492 | - include: "#comment" 1493 | - match: (?i)(cells|mat)\s*(?=\={0,1}) 1494 | name: variable.mcnp 1495 | 1496 | # for Novel 1-Step routines 1497 | DECTRn: 1498 | match: (?i)^\s{0,4}(dectr)(\d+)\s 1499 | captures: 1500 | "1": 1501 | name: keyword.mcnp 1502 | "2": 1503 | name: constant.numeric.mcnp 1504 | 1505 | # for Novel 1-Step routines 1506 | NCMn: 1507 | begin: (?i)^\s{0,4}(ncm)(\d+)\s 1508 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1509 | beginCaptures: 1510 | "1": 1511 | name: keyword.mcnp 1512 | "2": 1513 | name: constant.numeric.mcnp 1514 | patterns: 1515 | - include: "#comment" 1516 | - match: (?i)(tally|iso\_filter|[xyze]bounds)\s*(?=\={0,1}) 1517 | name: variable.mcnp 1518 | 1519 | # for Novel 1-Step routines 1520 | NAMn: 1521 | begin: (?i)^\s{0,4}(nam)(\d+)\s 1522 | end: ^\n|(?i)(?=^\s{0,4}(?![cC]\s)[\*\+]*\w+) 1523 | beginCaptures: 1524 | "1": 1525 | name: keyword.mcnp 1526 | "2": 1527 | name: constant.numeric.mcnp 1528 | patterns: 1529 | - include: "#comment" 1530 | - match: (?i)(norm|iso\_filter|[xyze]bounds)\s*(?=\={0,1}) 1531 | name: variable.mcnp 1532 | - match: (?i)(output)[\s\=]*(cdgs|spec|gpower|gpers|actual\_gpers)?\s 1533 | captures: 1534 | "1": 1535 | name: variable.mcnp 1536 | "2": 1537 | name: constant.language.mcnp 1538 | 1539 | #! name for this grammar scope 1540 | scopeName: source.mcnp 1541 | -------------------------------------------------------------------------------- /snippets/mcnp.tmSnippets.yaml: -------------------------------------------------------------------------------- 1 | Coordinate transformation: 2 | prefix: 3 | - TR 4 | body: 5 | - "tr${1:0} ${2:0 0 0} $ displacement vector" 6 | - " ${3:1 0 0} $ xx' yx' zx'" 7 | - " ${4:0 1 0} $ xy' yy' zy'" 8 | - " ${5:0 0 1} $ xz' yz' zz'" 9 | - " ${6:1} $ defined in main (1) or auxiliary system (-1)" 10 | description: Coordinate Transformation 11 | scope: mcnp 12 | 13 | Embedded geometry: 14 | prefix: 15 | - EMBED 16 | body: 17 | - "embed${1:0}" 18 | - " background = ${2:c} $ Cell number of the background pseudo-cell" 19 | - " matcell = ${3:m1 c1 m2 c2...} $ Integer material-cell pairs" 20 | - " mgeoin = ${4:filename} $ Input file containing the mesh description" 21 | - " overlap = ${5:filename} $ Model to treat overlapping parts [EXIT, ENTRY, AVERAGE]" 22 | - " meshgeo = ${6:hdf5} $ Mesh file format: [HDF5, LNK3DNT, ABAQUS, MCNPUM]" 23 | - " hdf5file = ${7:filename} $ (opt) Name for HDF5-based output file" 24 | - " filetype = ${8:ascii} $ (opt) Output file type [ASCII, BINARY]" 25 | - " calc_vols = ${9:no} $ (opt) Toggle volume calculation [YES, NO]" 26 | - " length = ${10:1} $ (opt) Conversion factor to cm" 27 | - " debug = ${11:echomesh} $ (opt) Write geometry to OUTP [ECHOMESH]" 28 | - " elementchk = ${12:yes} $ (opt) Toggle UM elemental calcs and reporting [YES, NO]" 29 | - " mgeout = ${13:filename} $ (opt, dep) EEOUT results file to write" 30 | - " meein = ${14:filename} $ (opt, dep) EEOUT results file to read" 31 | - " gmvfile = ${15:filename} $ (opt, dep) Name of the GMV output file" 32 | - " mcnpumfile = ${16:filename} $ (opt, dep) Name of the MCNPUM output file" 33 | description: Embedded geometry 34 | scope: mcnp 35 | 36 | Embedded elemental edits: 37 | prefix: 38 | - EMBEE 39 | body: 40 | - "embee${1:0}:n" 41 | - " embed = ${2:n} $ Embedded mesh universe number" 42 | - " factor = ${3:1.0} $ (opt) Multiplicative constant" 43 | - " energy = ${4:1.0} $ (opt) Conversion factor from MeV/g" 44 | - " time = ${5:1.0} $ (opt) Conversion factor from shakes" 45 | - " atom = ${6:no} $ (opt) Multiply by atom density [YES, NO]" 46 | - " mat = ${7:0} $ (opt) Material number, 0=use cell material" 47 | - " list = ${8:values} $ (opt) List of ENDF or special reaction numbers" 48 | - " mtype = ${9:flux} $ (opt) Multiplier type" 49 | - " errors = ${10:yes} $ (opt, dep) Record rel. err. [YES, NO]" 50 | - " comment = ${11:some text} $ (opt, dep) Comment in EEOUT file" 51 | description: embedded elemental edits 52 | scope: mcnp 53 | 54 | Multigroup adjoint transport options: 55 | prefix: 56 | - MGOPT 57 | body: 58 | - "mgopt ${1:F} $ Forward or adjoint problem [F, A]" 59 | - " ${2:n} $ Total number of energy groups" 60 | - " ${3:0} $ Weight window usage" 61 | - " ${4:0} $ Adjoint biasing for adjoint problems" 62 | - " ${5:0} $ Reference cell for generated weight windows" 63 | - " ${6:0} $ Normalization value for generated weight windows" 64 | - " ${7:1000} $ Compression limit for generated weight windows" 65 | 66 | description: multigroup adjoint transport options 67 | scope: mcnp 68 | 69 | Neutron particle physics: 70 | prefix: 71 | - PHYS:n 72 | body: 73 | - "phys:n ${1:100} $ Upper limit neutron energy [MeV]" 74 | - " ${2:0} $ Analog energy limit" 75 | - " ${3:0} $ Unresolved resonance range prob. table treatment" 76 | - " J J J $ Unused" 77 | - " ${4:0} $ Light/heavy ion recoil and n-capture algorithm" 78 | - " ${5:-1} $ Table-based physics cutoff and memory reduction" 79 | - " J J $ Unused" 80 | - " ${6:1} $ Secondary photon production" 81 | - " ${7:0} $ Treatment of nuclear interactions" 82 | - " ${8:0} $ Treatment of nuclear elastic scattering" 83 | description: neutron particle physics 84 | scope: mcnp 85 | 86 | Photon particle physics: 87 | prefix: 88 | - PHYS:p 89 | body: 90 | - "phys:p ${1:100} $ Upper limit photon energy [MeV]" 91 | - " ${2:0} $ Generation of e in MODE p,e, or bremsstrahlung in MODE p" 92 | - " ${3:0} $ Coherent (Thomson) scattering" 93 | - " ${4:0} $ Photonuclear particle production" 94 | - " ${5:0} $ Photon Doppler energy broadening" 95 | - " J $ Unused" 96 | - " ${6:0} $ Selection of photo-fission method" 97 | description: photon particle physics 98 | scope: mcnp 99 | 100 | Electron particle physics: 101 | prefix: 102 | - PHYS:e 103 | body: 104 | - "phys:e ${1:100} $ Upper limit electron energy [MeV]" 105 | - " ${2:0} $ Generation of photons in MODE e, or bremsstrahlung in MODE p" 106 | - " ${3:0} $ Production of photons by electrons" 107 | - " ${4:0} $ Bremsstrahlung angular distribution method" 108 | - " ${5:0} $ Continuous-energy slowing down (straggling)" 109 | 110 | - " ${6:1} $ Production of bremsstrahlung photons along substeps" 111 | - " ${7:1} $ Electron-induced x-rays produced" 112 | - " ${8:1} $ Knock-on electrons produced" 113 | - " ${9:1} $ Photon-induced secondary electrons" 114 | 115 | - " ${10:0} $ Bremsstrahlung production on each electron sub step" 116 | - " ${11:0} $ Choice of Coulomb scattering model" 117 | - " ${12:0} $ Choice of electron elastic cross section" 118 | - " J $ Unused" 119 | - " ${13:0.917} $ Stopping power energy spacing" 120 | - " ${14:0.001} $ Control start of single-event transport" 121 | - " ${15:0} $ Scale Cerenkov photon emission" 122 | description: electron particle physics 123 | scope: mcnp 124 | 125 | Proton particle physics: 126 | prefix: 127 | - PHYS:h 128 | body: 129 | - "phys:h ${1:100} $ Upper limit proton energy [MeV]" 130 | - " ${2:0} $ Analog energy limit [MeV]" 131 | - " ${3:-1} $ Table-based physics cutoff" 132 | - " J $ Unused" 133 | - " ${4:0} $ Controls charged-particle straggling" 134 | - " J $ Unused" 135 | - " ${5:0} $ Recoil production control for light-ion tabular physics" 136 | - " J J J $ Unused" 137 | - " ${6:0} $ Controls the choice of Coulomb scattering model" 138 | - " ${7:0} $ Controls treatment of nuclear interactions" 139 | - " ${8:0} $ Controls treatment of nuclear elastic scattering" 140 | - " ${9:0.917} $ Controls stopping power energy spacing" 141 | - " J $ Unused" 142 | - " ${10:0} $ Scale Cerenkov photon emission" 143 | - " ${11:0} $ Lower energy delta-ray cutoff [MeV]" 144 | description: proton particle physics 145 | scope: mcnp 146 | 147 | Activation control: 148 | prefix: 149 | - ACT 150 | body: 151 | - "act fission = ${1:n} $ Type of delayed particle(s) produced from fission" 152 | - " nonfiss = ${2:none} $ Type of delayed particle(s) produced from non-fission" 153 | - " dn = ${3:library} $ Delayed neutron data source" 154 | - " dg = ${4:none} $ Delayed gamma data source" 155 | - " thresh = ${5:10.95} $ Fraction of retained highest-amp. discrete delayed-gamma lines" 156 | - " dnbias = ${6:1} $ Delayed neutrons produced per interaction" 157 | - " nap = ${7:10} $ N of act. products with calculated cumul. dist. functions" 158 | - " dneb = ${8:w1,e1,w2,e2...} $ Delayed neutron energy biasing parameters" 159 | - " dgeb = ${9:w1,e1,w2,e2...} $ Delayed photon energy biasing parameters" 160 | - " pecut = ${10:0} $ Delayed-gamma energy cutof [MeV]" 161 | - " hlcut = ${11:0} $ Spontaneous-decay half-life threshold [s]" 162 | - " sample = ${12:correlate} $ Flag for correlated or uncorrelated [MeV]" 163 | description: activation control 164 | scope: mcnp 165 | 166 | Physics cutoffs: 167 | prefix: 168 | - CUT 169 | body: 170 | - "cut:${1:n} ${2:t} $ Time cutoff [shakes]" 171 | - " ${3:e} $ Lower energy cutof [MeV]" 172 | - " ${4:wc1,wc2} $ Weight cutoffs " 173 | - " ${5:swtm} $ Minimum source weight" 174 | description: physics cutoff cards 175 | scope: mcnp 176 | 177 | Doppler broadening resonance correction: 178 | prefix: 179 | - DBRC 180 | body: 181 | - "dbrc endf = ${1:nn} $ Library identifier for scattering data at 0K" 182 | - " emax = ${2:eee} $ Upper energy limit for applying DBRC [MeV]" 183 | - " isos = ${3:iso_list} $ List of ZZZAAA identifiers, no suffixes" 184 | description: doppler broadening resonance correction 185 | scope: mcnp 186 | 187 | LCA model options: 188 | prefix: 189 | - LCA 190 | body: 191 | - "lca ${1:2} $ Controls elastic scattering" 192 | - " ${2:ipreq} $ Controls pre-equilibrium model" 193 | - " ${3:iexisa} $ Controls model choice" 194 | - " ${4:ichoic} $ Control ISABEL intranuclear cascade model" 195 | - " ${5:1} $ Controls Coulomb barrier for incident charged particles" 196 | - " ${6:1} $ Subtract nuclear recoil energy to get excitation energy" 197 | - " ${7:0} $ Controls pion termination treatment" 198 | - " ${8:1} $ Particle transport options" 199 | - " ${9:1} $ Choose alternative physics model" 200 | - " ${10:0} $ Choose light ion and nucleon physics modules" 201 | - " ${11:nevtype} $ Choose number of evaporation particles modeled by GEM2" 202 | description: physics models options 203 | scope: mcnp 204 | 205 | LCB model options: 206 | prefix: 207 | - LCB 208 | body: 209 | - "lcb ${1:3500} $ Nucleons, CEM/Bertini/INCL INC used below [MeV]" 210 | - " ${2:3500} $ Nucleons, LAQGSM03.03 high-energy generator above [MeV]" 211 | - " ${3:2500} $ Pions, CEM/Bertini/INCL INC used below [MeV]" 212 | - " ${4:2500} $ Pions, LAQGSM03.03 high-energy generator above [MeV]" 213 | - " ${5:800} $ ISABEL INC model used below [MeV]" 214 | - " ${6:800} $ An appropriate model used above [MeV]" 215 | - " ${7:-1.0} $ Cutoff kinetic energy" 216 | - " ${8:-1.0} $ Max correction for mass-energy balancing in cascade" 217 | description: physics models options 218 | scope: mcnp 219 | 220 | LCC model options: 221 | prefix: 222 | - LCC 223 | body: 224 | - "lcc ${1:1.0} $ Rescaling factor of the cascade duration" 225 | - " ${2:45.0} $ Potential depth [MeV]" 226 | - " ${3:8.0} $ Maximum impact parameter for Pauli blocking" 227 | - " ${4:0} $ Controls the Pauli blocking parameter" 228 | - " ${5:-2} $ Diffuse nuclear surface based on Wood-Saxon density" 229 | - " J J $ Unused" 230 | - " ${6:0} $ Use Bertini model below this energy [MeV]" 231 | - " ${7:0} $ Write no INCL bank particles below this energy" 232 | - " ${8:0} $ Write no ABLA bank particles below this energy" 233 | description: physics models options 234 | scope: mcnp 235 | 236 | LEA model options: 237 | prefix: 238 | - LEA 239 | body: 240 | - "lea ${1:1} $ Control generation of de-excitation photons" 241 | - " ${2:4} $ Level of physics applied for LAHET-PHT photon physics" 242 | - " ${3:1} $ Mass-energy balancing in the cascade stage" 243 | - " ${4:0} $ Mass-energy balancing in evaporation stage" 244 | - " ${5:1} $ Fermi-breakup model nuclide range" 245 | - " ${6:0} $ Level-density model" 246 | - " ${7:-1} $ Evaporation and fission models" 247 | - " ${8:1} $ Allow or suppress fission" 248 | description: physics models options 249 | scope: mcnp 250 | 251 | LEB model options: 252 | prefix: 253 | - LEB 254 | body: 255 | - "leb ${1:1.5} $ Y0 parameter in level-density formula for Z ≤ 70" 256 | - " ${2:8.0} $ B0 parameter in level-density formula for Z ≤ 70" 257 | - " ${3:1.5} $ Y0 parameter in level-density formula for Z > 71" 258 | - " ${4:10.0} $ B0 parameter in level-density formula for Z > 71" 259 | description: physics models options 260 | scope: mcnp 261 | 262 | Fission multiplicity constants: 263 | prefix: 264 | - FMULT 265 | body: 266 | - "fmult ${1:zaid} $ Nuclide for which data are entered" 267 | - " sfnu = ${2:x} $ x can be single or a list, see manual" 268 | - " width = ${3:w} $ Gaussian width FWHM for sampling" 269 | - " sfyield = ${4:y} $ Spontaneous fission yield (n/s-g)" 270 | - " watt = ${5:a\ b} $ Watt energy spectrum parameters" 271 | - " method = ${6:0} $ Gaussian sampling algorithm/model physics option" 272 | - " data = ${7:0} $ Select data for isotope multiplicities" 273 | - " shift = ${8:0} $ Method to modify sampled multiplicity" 274 | description: fission multiplicity constants 275 | scope: mcnp 276 | 277 | Transport options: 278 | prefix: 279 | - TROPT 280 | body: 281 | - "tropt mcscat = ${1:fnal1} $ Multiple Coulomb scattering" 282 | - " eloss = ${2:strag1} $ Slowing down energy losses" 283 | - " nreact = ${3:on} $ Nuclear reactions" 284 | - " nescat = ${4:on} $ Nuclear elastic scattering" 285 | - " genxs = ${5:filename} $ If absent, standard transport occurs" 286 | description: transport options 287 | scope: mcnp 288 | 289 | Magnetic field transfer map parameters: 290 | prefix: 291 | - COSYP 292 | body: 293 | - "cosyp ${1:prefix} $ The COSY map file prefix number" 294 | - " ${2:1} $ Horizontal axis orientation" 295 | - " ${3:2} $ Vertical axis orientation" 296 | - " ${4:emapk} $ Operating beam energy of maps" 297 | description: Magnetic Field Transfer Map Parameters 298 | scope: mcnp 299 | 300 | Magnetic field definition: 301 | prefix: 302 | - BFLD 303 | body: 304 | - "bfld${1:0} type = ${2:t} $ Polarity [CONST|QUAD|QUADFF]" 305 | - " field = ${3:f} $ Field strength or gradient" 306 | - " vec = ${4:1\ 0\ 0} $ Direction of field/focusing quadropole" 307 | - " axs = ${5:0\ 0\ 1} $ Direction cosines of quadrupole beam axis" 308 | - " refpnt = ${6:0\ 0\ 0} $ Point anywhere on quadrupole beam axis" 309 | - " mxdeflc = ${7:10} $ Maximum deflection angle per step size (mrad)" 310 | - " maxstep = ${8:100} $ Maximum step size (cm)" 311 | - " ffedges = ${9:s1\ s2...} $ Surface numbers for fringe-field edge kicks" 312 | description: Magnetic field definition 313 | scope: mcnp 314 | 315 | Gravitational field: 316 | prefix: 317 | - FIELD 318 | body: 319 | - "field gcut = ${1:0.653} $ Gravitational binding energy (eV) threshold" 320 | - " gpar = ${2:1} $ Particle type (limited to neutrons)" 321 | - " grad = ${3:3671} $ Radius of planetary object (km)" 322 | - " gsur = ${4:s1\ s2...} $ List of one or more surface numbers" 323 | description: Gravitational field 324 | scope: mcnp 325 | 326 | General source definition: 327 | prefix: 328 | - SDEF 329 | body: 330 | - "sdef par = ${1:1} $ Source particle type(s) by symbol or number" 331 | - " erg = ${2:14.0} $ Kinetic energy (MeV)" 332 | - " pos = ${3:0\ 0\ 0} $ Reference point for position sampling" 333 | - " wgt = ${4:1.0} $ Particle weight" 334 | description: General source definition 335 | scope: mcnp 336 | 337 | Full general source definition: 338 | prefix: 339 | - SDEF (full) 340 | body: 341 | - "sdef par = ${1:1} $ Source particle type(s) by symbol or number" 342 | - " erg = ${2:14.0} $ Kinetic energy (MeV)" 343 | - " pos = ${3:0\ 0\ 0} $ Reference point for position sampling" 344 | - " x = ${4:0} $ X coordinate of position" 345 | - " y = ${5:0} $ Y coordinate of position" 346 | - " z = ${6:0} $ Z coordinate of position" 347 | - " vec = ${7:0\ 0\ 1} $ Reference vector for DIR in vector notation" 348 | - " rad = ${8:0} $ Radial distance of the position from POS or AXS" 349 | - " ext = ${9:0} $ Vol: dist. from POS along AXS. Sur: cosine from AXS" 350 | - " sur = ${10:0} $ Surface number" 351 | - " nrm = ${11:1} $ Sign of the surface normal" 352 | - " wgt = ${12:1.0} $ Particle weight" 353 | - " tme = ${13:0} $ Time (shakes)" 354 | - " eff = ${14:0.01} $ Rejection efficiency criterion for position sampling" 355 | - " dir = d $ Cosine of angle between VEC and direction of flight" 356 | - " ccc = n $ Cookie-cutter cell number" 357 | - " tr = n $ Source particle transformation number" 358 | - " axs = a $ Reference vector for EXT and RAD in vector notation" 359 | - " cel = c $ Cell number" 360 | - " ara = area $ Area of surface" 361 | - " loc = lat lng alt $ Location of cosmic particle source" 362 | - " dat = m d year $ Date as month - day - year" 363 | - " bem = exn eyn bml $ Beam emittance parameters" 364 | - " bap = ba1 ba2 u $ Beam aperture parameters" 365 | description: General source definition 366 | scope: mcnp 367 | 368 | Surface source write: 369 | prefix: 370 | - SSW 371 | body: 372 | - "ssw ${1:s1\ s2...} $ Problem surface numbers" 373 | - " ${2:c1\ c2...} $ Problem cell numbers" 374 | - " sym = ${3:0} $ Symmetry option flag" 375 | - " pty = ${4:p1\ p2...} $ Controls particle types to record" 376 | - " cel = ${5:cf1\ cf2...} $ KCODE fission source neutrons writte for these cells" 377 | description: Surface source write 378 | scope: mcnp 379 | 380 | Surface source read: 381 | prefix: 382 | - SSR 383 | body: 384 | - "ssr old = ${1:c1\ c2...} $ Use all surfaces in the original calculation if blank" 385 | - " cel = ${2:s1\ s2...} $ Use all cells in the original calculation if blank" 386 | - " new = ${3:sa1\ sa2...} $ Assign new surfaces, use OLD list if blank" 387 | - " pty = ${4:p1\ p2...} $ Particle types for which the tracks are to be read" 388 | - " col = ${5:0} $ Collision option flag" 389 | - " wgt = ${6:1.0} $ Multiply particle weights by the constant" 390 | - " tr = ${7:n} $ Transformation number/ distribution number" 391 | - " psc = ${8:c} $ Constant used in PSC evaluation" 392 | description: Surface source write 393 | scope: mcnp 394 | 395 | Criticality Source: 396 | prefix: 397 | - KCODE 398 | body: 399 | - "kcode ${1:1000} $ Number of source histories per cycle" 400 | - " ${2:1.0} $ Initial guess for k_eff" 401 | - " ${3:30} $ Number of cycles to be skipped before beginning tally accumulation" 402 | - " ${4:130} $ Total number of cycles to be done" 403 | - " ${5:4500} $ Number of source points for which to allocate storage" 404 | - " ${6:0} $ Controls normalization of tallies" 405 | - " ${7:6500} $ Maximum number of cycle values on MCTAL or RUNTPE files" 406 | - " ${8:1} $ Cycles over which summary and tally information are averaged" 407 | description: Criticality Source 408 | scope: mcnp 409 | 410 | Criticality Options: 411 | prefix: 412 | - KOPTS 413 | body: 414 | - "kopts blocksize = ${1:10} $ Number of cycles in every outer iteration" 415 | - " kinetics = ${2:no} $ Calculate point-kinetics parameters" 416 | - " precursor = ${3:no} $ Calculate detailed precursor information" 417 | - " ksental = ${4:mctal} $ Format of sensitivity profiles file, KSENTAL" 418 | - " fmat = ${5:no} $ Compute the fission matrix" 419 | - " fmatconvrg = ${6:no} $ Use fission matrix to determine convergence" 420 | - " fmataccel = ${7:no} $ Use fission matrix tfor importance weighting" 421 | - " fmatsrc = ${8:no} $ Sample source particles uniformly from fission matrix" 422 | - " fmatskip = ${9:1} $ Skips n batches before accumulating fission matrix tallies" 423 | - " fmatncyc = ${10:10} $ Batches between fission matrix solves" 424 | - " fmatspace = ${11:100000000} $ Initial number of nonzero elements to allocate" 425 | - " fmatnx = ${12:0} $ X-axis fission matrix mesh spacing" 426 | - " fmatny = ${13:0} $ Y-axis fission matrix mesh spacing" 427 | - " fmatnz = ${14:0} $ Z-axis fission matrix mesh spacing" 428 | description: Criticality Options 429 | scope: mcnp 430 | 431 | Shannon Entropy Mesh: 432 | prefix: 433 | - HSRC 434 | body: 435 | - "hsrc ${1:n_x} $ Number of mesh intervals in x direction" 436 | - " ${2:x_min} $ Minimum x value for mesh" 437 | - " ${3:x_max} $ Maximum x value for mesh" 438 | - " ${4:n_y} $ Number of mesh intervals in y direction" 439 | - " ${5:y_min} $ Minimum y value for mesh" 440 | - " ${6:y_max} $ Maximum y value for mesh" 441 | - " ${7:n_z} $ Number of mesh intervals in z direction" 442 | - " ${8:z_min} $ Minimum z value for mesh" 443 | - " ${9:z_max} $ Maximum z value for mesh" 444 | description: Shannon Entropy Mesh 445 | scope: mcnp 446 | 447 | Depletion/Burnup: 448 | prefix: 449 | - BURN 450 | body: 451 | - "burn time = ${1:t1\ t2...} $ Incremental time duration for burn steps" 452 | - " pftrac = ${2:f1\ f2...} $ Fraction total power applied to time steps" 453 | - " power = ${3:1} $ Total recoverable fission system power (MW)" 454 | - " mat = ${4:m1\ m2...} $ Materials participating in burnup calculation" 455 | - " omit = ${5:m1\ [n1\ n2...]} $ For material (m), omit ZAIDs (n) from calculation" 456 | - " afmin = ${6:1e-10\ 1e-10} $ Atom fraction controls" 457 | - " bopt = ${7:b1\ b2\ b3} $ Burnup options" 458 | - " matvol = ${8:v1\ v2...} $ Volume of all cells containing corresponding burn material" 459 | - " matmod = ${9:n\ ts1\ [m1\ m2...]} $ Change material concentrations with time" 460 | - " swapb = ${10:n\ ts1\ [u1\ u2...]} $ Swap universe content at the end of time steps" 461 | - " nostats $ Disable computation/output of statistical parameters" 462 | description: Depletion/Burnup 463 | scope: mcnp 464 | 465 | Print Hierarchy: 466 | prefix: 467 | - FQn 468 | body: 469 | - "fq${1:4} F $ Cell, surface, or detector bins" 470 | - " D $ Direct or flagged bins" 471 | - " U $ User bins" 472 | - " S $ Segment bins" 473 | - " M $ Multiplier bins" 474 | - " C $ Cosine bins" 475 | - " E $ Energy bins" 476 | - " T $ Time bins" 477 | description: Print Hierarchy 478 | scope: mcnp 479 | 480 | Tally Perturbations: 481 | prefix: 482 | - PERTn 483 | body: 484 | - "pert${1:4}:${2:n} cell = ${3:c1\ c2...} $ Cells to apply perturbation to" 485 | - " mat = ${4:m} $ Fills all cells with specified material" 486 | - " rho = ${5:r} $ Sets filled cell material density" 487 | - " method = ${6:1} $ Number of terms included in perturbation estimate" 488 | - " erg = ${7:e_l\ e_u} $ Lower and upper bounds energy range for perturbations" 489 | - " rxn = ${8:r1\ r2...} $ ENDF/B reaction number(s) for perturbed xs" 490 | description: Tally Perturbations via Differential Operator 491 | scope: mcnp 492 | 493 | Reactivity Perturbations: 494 | prefix: 495 | - KPERTn 496 | body: 497 | - "kpert${1:0} cell = ${2:c1\ c2...} $ Cells to apply perturbation to" 498 | - " mat = ${3:m1\ m2...} $ Fill cells with specified material(s)" 499 | - " rho = ${4:r1\ r2...} $ Sets filled cell material densities" 500 | - " iso = ${5:z1\ z2...} $ ZAIDs that the perturbation impacts" 501 | - " rxn = ${6:rx1\ rx2...} $ MT or special reaction numbers the perturbation impacts" 502 | - " erg = ${7:e1\ e2...} $ Energies (MeV) to apply perturbation over" 503 | - " linear = ${8:yes} $ Force an unperturbed fission source" 504 | description: Reactivity Perturbations via Adjoint Weighting 505 | scope: mcnp 506 | 507 | Sensitivity Coefficients: 508 | prefix: 509 | - KSENn 510 | body: 511 | - "ksen${1:0} ${2:xs} $ Type of sensitivity" 512 | - " iso = ${3:z1\ z2...} $ ZAIDs for which sensitivities are desired." 513 | - " rxn = ${4:rx1\ rx2...} $ Reaction MT numbers or special reaction numbers" 514 | - " mt = ${5:r1\ r2...} $ Same behavior as RXN" 515 | - " erg = ${6:e1\ e2...} $ Energy bin boundaries (MeV) to apply sensitivity over" 516 | - " ein = ${7:e1\ e2...} $ Range of inclident energy bins (MeV)" 517 | - " legendre = ${8:order} $ Order of Legendre moments to calculate sensitivities for" 518 | - " cos = ${9:min\ max} $ Range of direction-change cosines for scattering events" 519 | - " constrain = ${10:yes} $ Renormalize the energy (or cosine) sensitivity distribution" 520 | description: k_eff Sensitivity Coefficients via Adjoint Weighting 521 | scope: mcnp 522 | 523 | Track-averaged TMESH Mesh Tally: 524 | prefix: 525 | - RMESH1 526 | - CMESH1 527 | - SMESH1 528 | body: 529 | - "c Track-averaged TMESH Mesh Tally" 530 | - "${1:r}mesh${2:1}:${3:n}" 531 | - " ${4:traks} $ tally the number of tracks through each mesh volume" 532 | - " ${5:flux} $ Fluence is particle weight * track length / volume" 533 | - " ${6:popul} $ Score tally population in each volume" 534 | - " ${7:pedep} $ Score average energy deposition per unit volume" 535 | - " mfact = ${8:n\ c...} $ Response function given on MSHMF followed by constant multiplier" 536 | - " trans = ${9:n} $ TRn card number used to translate entire mesh" 537 | - "c" 538 | - "cora${2:3} ${10:ca1\ ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)" 539 | - "corb${2:3} ${11:cb1\ cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)" 540 | - "corc${2:3} ${12:cc1\ cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)" 541 | - "c" 542 | - "ergsh${2:3} ${13:low\ high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally" 543 | - "mshmf${14:0} ${15:[e1\ f1]...} $ Pairs of energy and response functions" 544 | - "c" 545 | description: Track-averaged TMESH Mesh Tally 546 | scope: mcnp 547 | 548 | Source TMESH Mesh Tally: 549 | prefix: 550 | - RMESH2 551 | - CMESH2 552 | - SMESH2 553 | body: 554 | - "c Source TMESH Mesh Tally" 555 | - "${1:r}mesh${2:2} ${3:p1\ p2...} $ Particle designators" 556 | - " trans = ${4:n} $ TRn card number used to translate entire mesh" 557 | - "c" 558 | - "cora${2:3} ${5:ca1\ ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)" 559 | - "corb${2:3} ${6:cb1\ cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)" 560 | - "corc${2:3} ${7:cc1\ cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)" 561 | - "c" 562 | - "ergsh${2:3} ${8:low\ high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally" 563 | - "mshmf${9:0} ${10:[e1\ f1]...} $ Pairs of energy and response functions" 564 | - "c" 565 | description: Source TMESH Mesh Tally 566 | scope: mcnp 567 | 568 | Energy Deposition TMESH Mesh Tally: 569 | prefix: 570 | - RMESH3 571 | - CMESH3 572 | - SMESH3 573 | body: 574 | - "c Energy Deposition TMESH Mesh Tally" 575 | - "${1:r}mesh${2:3} ${3:total} $ Score energy deposited from any source" 576 | - " ${4:de/dx} $ Score ionization from charged particles" 577 | - " ${5:recol} $ Score energy transferred to recoil nuclei" 578 | - " ${6:tlest} $ Score track length folded with tabular heating numbers" 579 | - " ${7:edlct} $ Score non-tracked particles assumed to deposit energy locally" 580 | - " mfact = ${8:n\ c...} $ Response function given on MSHMF followed by constant multiplier" 581 | - " trans = ${9:n} $ TRn card number used to translate entire mesh" 582 | - "c" 583 | - "cora${2:3} ${10:ca1\ ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)" 584 | - "corb${2:3} ${11:cb1\ cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)" 585 | - "corc${2:3} ${12:cc1\ cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)" 586 | - "c" 587 | - "ergsh${2:3} ${13:low\ high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally" 588 | - "mshmf${14:0} ${15:[e1\ f1]...} $ Pairs of energy and response functions" 589 | - "c" 590 | description: Energy Deposition TMESH Mesh Tally 591 | scope: mcnp 592 | 593 | DXTRAN TMESH Mesh Tally: 594 | prefix: 595 | - RMESH4 596 | - CMESH4 597 | - SMESH4 598 | body: 599 | - "c DXTRAN TMESH Mesh Tally" 600 | - "${1:r}mesh${2:4}:${3:n}" 601 | - " trans = ${3:n} $ TRn card number used to translate entire mesh" 602 | - "c" 603 | - "cora${2:3} ${10:ca1\ ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)" 604 | - "corb${2:3} ${11:cb1\ cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)" 605 | - "corc${2:3} ${12:cc1\ cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)" 606 | - "c" 607 | - "ergsh${2:3} ${13:low\ high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally" 608 | - "mshmf${14:0} ${15:[e1\ f1]...} $ Pairs of energy and response functions" 609 | - "c" 610 | description: DXTRAN TMESH Mesh Tally 611 | scope: mcnp 612 | 613 | TMESH Mesh Tally Markers: 614 | prefix: 615 | - TMESH 616 | body: 617 | - "tmesh $ ------ TMESH tallies start ------" 618 | - "c" 619 | - "${1:c RMESH/CMESH/SMESH tallies here}" 620 | - "c" 621 | - "endmd $ ------ TMESH tallies end ------" 622 | description: TMESH Mesh Tally Markers 623 | scope: mcnp 624 | 625 | Rectangular Superimposed Mesh Tally B: 626 | prefix: 627 | - FMESHn (rec) 628 | body: 629 | - "fc4 Rectangular mesh tally" 630 | - "fmesh4:${1:n}" 631 | - " origin= ${2:0.0\ 0.0\ 0.0} $ Coordinates (x,y,z) of mesh origin" 632 | - " geom = ${3:xyz} $ Mesh geometry" 633 | - " out = ${4:xdmf} $ Output format" 634 | - " imesh = ${5:10} iints = ${6:5} $ Coarse mesh points in X" 635 | - " jmesh = ${7:10} jints = ${8:5} $ Coarse mesh points in Y" 636 | - " kmesh = ${9:10} kints = ${10:5} $ Coarse mesh points in Z" 637 | - " emesh = ${11:1.0e36} $ Energy bin upper edges (MeV)" 638 | description: Superimposed Mesh Tally B 639 | scope: mcnp 640 | 641 | Cylindrical Superimposed Mesh Tally B: 642 | prefix: 643 | - FMESHn (cyl) 644 | body: 645 | - "fc4 Cylindrical mesh tally" 646 | - "fmesh4:${1:n}" 647 | - " origin= ${2:0.0\ 0.0\ 0.0} $ Coordinates (x,y,z) of mesh origin" 648 | - " axs = ${3:0.0\ 0.0\ 1.0} $ Direction of the cylinder axis" 649 | - " vec = ${4:1.0\ 0.0\ 0.0} $ Vector defining plane for theta=0" 650 | - " geom = ${5:rzt} $ Mesh geometry" 651 | - " out = ${6:xdmf} $ Output format" 652 | - " imesh = ${7:10} iints = ${8:5} $ Coarse mesh points in R" 653 | - " jmesh = ${9:10} jints = ${10:5} $ Coarse mesh points in Z" 654 | - " kmesh = ${11:10} kints = ${12:5} $ Coarse mesh points in T" 655 | - " emesh = ${13:1.0e36} $ Energy bin upper edges (MeV)" 656 | description: Superimposed Mesh Tally B 657 | scope: mcnp 658 | 659 | Full Superimposed Mesh Tally B: 660 | prefix: 661 | - FMESHn (full) 662 | body: 663 | - "fc4 Full mesh tally with all keywords" 664 | - "fmesh4:${1:n}" 665 | - " origin= ${2:0.0\ 0.0\ 0.0} $ Coordinates (x,y,z) of mesh origin" 666 | - " axs = ${3:0.0\ 0.0\ 1.0} $ Direction of the cylinder axis" 667 | - " vec = ${4:1.0\ 0.0\ 0.0} $ Vector defining plane for theta=0" 668 | - " geom = ${5:rzt} $ Mesh geometry" 669 | - " out = ${6:xdmf} $ Output format" 670 | - " imesh = ${7:10} iints = ${8:5} $ Coarse mesh points in X/R" 671 | - " jmesh = ${9:10} jints = ${10:5} $ Coarse mesh points in Y/Z" 672 | - " kmesh = ${11:10} kints = ${12:5} $ Coarse mesh points in Z/T" 673 | - " tmesh = ${13:1.0e36} $ Time bin upper edges (shakes)" 674 | - " tnorm = ${14:1.0} $ Time normalisation" 675 | - " emesh = ${15:1.0e36} $ Energy bin upper edges (MeV)" 676 | - " enorm = ${16:1.0} $ Energy normalisation" 677 | - " factor= ${17:1.0} $ Multiplicative factor for each mesh" 678 | - " tr = ${18:n} $ Number of the transformation to apply" 679 | - " inc = ${19:low\ high} $ Range of collisions that will contribute (MeV)" 680 | - " type = ${20:flux} $ Specify the quantity being tallied" 681 | - " kclear= ${21:0} $ Generate visualization of cycle quantities" 682 | - " tally = ${22:fast_hist} $ Tallying algorithm" 683 | description: Superimposed Mesh Tally B 684 | scope: mcnp 685 | 686 | Weight-window Parameters: 687 | prefix: 688 | - WWP 689 | body: 690 | - "wwp:${1:n} ${2:5} $ Multiplier defining weight window upper limit" 691 | - " ${3:3} $ Multiplier defining max Russian roulette survival weight" 692 | - " ${4:5} $ Max number of integer splits" 693 | - " ${5:0} $ Control where to check a particle's weight" 694 | - " ${6:0} $ Control where to get lower weight window bounds" 695 | - " ${7:0} $ Controls treatment of WWE card" 696 | - " ${8:1} $ Weight-window normalization factor" 697 | - " ${9:0} $ Energy- and time-splitting control" 698 | - " ${10:0} $ Limit max lower weight bound for any particle/energy/time" 699 | - " ${11:1} $ Number of mean-free paths before checking mesh-based weights" 700 | description: Weight-window Parameters 701 | scope: mcnp 702 | 703 | Weight-window Generation: 704 | prefix: 705 | - WWG 706 | body: 707 | - "wwg ${1:n} $ Problem tally number to optimise for" 708 | - " ${2:t} $ Invokes cell (>0) or mesh-based (=0) generator" 709 | - " ${3:w} $ Value of generated lower weight-window bound" 710 | - " 4j $ Unused" 711 | - " ${4:i} $ Toggle energy (=0) or time (=1) dependent weight windows" 712 | description: Weight-window Generation 713 | scope: mcnp 714 | 715 | Importance Mesh for Mesh-Based Weight-Window Generator: 716 | prefix: 717 | - MESH 718 | body: 719 | - "mesh geom = ${1:rzt} $ Mesh geometry" 720 | - " ref = ${2:0.0\ 0.0\ 0.0} $ X, Y, and Z coordinates of the reference point" 721 | - " origin= ${3:0.0\ 0.0\ 0.0} $ Coordinates (x,y,z) of mesh origin" 722 | - " axs = ${4:0.0\ 0.0\ 1.0} $ Direction of the cylinder axis" 723 | - " vec = ${5:1.0\ 0.0\ 0.0} $ Vector defining plane for theta=0" 724 | - " imesh = ${6:10} iints = ${7:5} $ Coarse mesh points in X/R" 725 | - " jmesh = ${8:10} jints = ${9:5} $ Coarse mesh points in Y/Z" 726 | - " kmesh = ${10:10} kints = ${11:5} $ Coarse mesh points in Z/T" 727 | description: Importance Mesh for Mesh-Based Weight-Window Generator 728 | scope: mcnp 729 | 730 | DXTRAN Sphere: 731 | prefix: 732 | - DXT 733 | body: 734 | - "dxt:${1:n} ${2:xk\ yk\ zk} $ Coordinates of center of the kth pair of spheres" 735 | - " ${3:rik} $ Radius of the kth inner sphere (cm)" 736 | - " ${4:rok} $ Radius of the kth outer sphere (cm)" 737 | - " ${5:0.0} $ Upper weight cutoff for DXTRAN weight-cutoff" 738 | - " ${6:0.0} $ Lower weight cutoff for DXTRAN weight-cutoff" 739 | - " ${7:0.0} $ Minimum photon weight" 740 | description: Importance Mesh for Mesh-Based Weight-Window Generator 741 | scope: mcnp 742 | 743 | History Cutoff: 744 | prefix: 745 | - NPS 746 | body: 747 | - "nps ${1:npp} $ The total number of histories to be run in the problem" 748 | - " ${2:npsmg} $ Direct source contributions to pixels of FIR radiography grid" 749 | - " ${3:n_per_batch} $ Number of histories used per batch for tallies with batch statistics" 750 | description: History Cutoff 751 | scope: mcnp 752 | 753 | Precision Cutoff: 754 | prefix: 755 | - STOP 756 | body: 757 | - "stop nps = ${1:npp} $ Stop calculation after npp particle histories" 758 | - " ctme = ${2:tme} $ Stop calculation after tme minutes of computer time" 759 | - " F${3:0} = ${4:e} $ Stop calculation when rel. err. of tally k is 0) or ellipsoid center (r<0)" 929 | - " ${4:v2x} ${5:v2y} ${6:v2z} $ Coordinates of second focus (r>0) or major axis vector (r<0)" 930 | - " ${7:r} $ major (r>0) or minor (r<0) radius length" 931 | description: ELL macrobody 932 | scope: mcnp 933 | 934 | WED macrobody: 935 | prefix: 936 | - WED 937 | body: 938 | - "WED $ Macrobody: Wedge" 939 | - " ${1:x} ${2:y} ${3:z} $ (x,y,z) coordinates of wedge vertex" 940 | - " ${4:v1x} ${5:v1y} ${6:v1z} $ Vector of first side of triangular base" 941 | - " ${7:v2x} ${8:v2y} ${9:v2z} $ Vector of second side of triangular base" 942 | - " ${10:v3x} ${11:v3y} ${12:v3z} $ Height vector" 943 | description: WED macrobody 944 | scope: mcnp 945 | 946 | ARB: Arbitrary Polyhedron 947 | 948 | ARB macrobody: 949 | prefix: 950 | - ARB 951 | body: 952 | - "ARB $ Macrobody: Arbitrary Polyhedron" 953 | - " x1 y2 z3 $ (x,y,z) coordinates of first corner of the polyhedron" 954 | - " x1 y2 z3 $ (x,y,z) coordinates of second corner of the polyhedron" 955 | - " x1 y2 z3 $ (x,y,z) coordinates of third corner of the polyhedron" 956 | - " x1 y2 z3 $ (x,y,z) coordinates of fourth corner of the polyhedron" 957 | - " x1 y2 z3 $ (x,y,z) coordinates of fifth corner of the polyhedron" 958 | - " x1 y2 z3 $ (x,y,z) coordinates of sixth corner of the polyhedron" 959 | - " x1 y2 z3 $ (x,y,z) coordinates of seventh corner of the polyhedron" 960 | - " x1 y2 z3 $ (x,y,z) coordinates of eighth corner of the polyhedron" 961 | - " ni $ Four-digit numbers describing a side of the polyhedron by corresponding corners" 962 | description: ARB macrobody 963 | scope: mcnp 964 | -------------------------------------------------------------------------------- /snippets/mcnp.tmSnippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Coordinate transformation": { 3 | "prefix": [ 4 | "TR" 5 | ], 6 | "body": [ 7 | "tr${1:0} ${2:0 0 0} $ displacement vector", 8 | " ${3:1 0 0} $ xx' yx' zx'", 9 | " ${4:0 1 0} $ xy' yy' zy'", 10 | " ${5:0 0 1} $ xz' yz' zz'", 11 | " ${6:1} $ defined in main (1) or auxiliary system (-1)" 12 | ], 13 | "description": "Coordinate Transformation", 14 | "scope": "mcnp" 15 | }, 16 | "Embedded geometry": { 17 | "prefix": [ 18 | "EMBED" 19 | ], 20 | "body": [ 21 | "embed${1:0}", 22 | " background = ${2:c} $ Cell number of the background pseudo-cell", 23 | " matcell = ${3:m1 c1 m2 c2...} $ Integer material-cell pairs", 24 | " mgeoin = ${4:filename} $ Input file containing the mesh description", 25 | " overlap = ${5:filename} $ Model to treat overlapping parts [EXIT, ENTRY, AVERAGE]", 26 | " meshgeo = ${6:hdf5} $ Mesh file format: [HDF5, LNK3DNT, ABAQUS, MCNPUM]", 27 | " hdf5file = ${7:filename} $ (opt) Name for HDF5-based output file", 28 | " filetype = ${8:ascii} $ (opt) Output file type [ASCII, BINARY]", 29 | " calc_vols = ${9:no} $ (opt) Toggle volume calculation [YES, NO]", 30 | " length = ${10:1} $ (opt) Conversion factor to cm", 31 | " debug = ${11:echomesh} $ (opt) Write geometry to OUTP [ECHOMESH]", 32 | " elementchk = ${12:yes} $ (opt) Toggle UM elemental calcs and reporting [YES, NO]", 33 | " mgeout = ${13:filename} $ (opt, dep) EEOUT results file to write", 34 | " meein = ${14:filename} $ (opt, dep) EEOUT results file to read", 35 | " gmvfile = ${15:filename} $ (opt, dep) Name of the GMV output file", 36 | " mcnpumfile = ${16:filename} $ (opt, dep) Name of the MCNPUM output file" 37 | ], 38 | "description": "Embedded geometry", 39 | "scope": "mcnp" 40 | }, 41 | "Embedded elemental edits": { 42 | "prefix": [ 43 | "EMBEE" 44 | ], 45 | "body": [ 46 | "embee${1:0}:n", 47 | " embed = ${2:n} $ Embedded mesh universe number", 48 | " factor = ${3:1.0} $ (opt) Multiplicative constant", 49 | " energy = ${4:1.0} $ (opt) Conversion factor from MeV/g", 50 | " time = ${5:1.0} $ (opt) Conversion factor from shakes", 51 | " atom = ${6:no} $ (opt) Multiply by atom density [YES, NO]", 52 | " mat = ${7:0} $ (opt) Material number, 0=use cell material", 53 | " list = ${8:values} $ (opt) List of ENDF or special reaction numbers", 54 | " mtype = ${9:flux} $ (opt) Multiplier type", 55 | " errors = ${10:yes} $ (opt, dep) Record rel. err. [YES, NO]", 56 | " comment = ${11:some text} $ (opt, dep) Comment in EEOUT file" 57 | ], 58 | "description": "embedded elemental edits", 59 | "scope": "mcnp" 60 | }, 61 | "Multigroup adjoint transport options": { 62 | "prefix": [ 63 | "MGOPT" 64 | ], 65 | "body": [ 66 | "mgopt ${1:F} $ Forward or adjoint problem [F, A]", 67 | " ${2:n} $ Total number of energy groups", 68 | " ${3:0} $ Weight window usage", 69 | " ${4:0} $ Adjoint biasing for adjoint problems", 70 | " ${5:0} $ Reference cell for generated weight windows", 71 | " ${6:0} $ Normalization value for generated weight windows", 72 | " ${7:1000} $ Compression limit for generated weight windows" 73 | ], 74 | "description": "multigroup adjoint transport options", 75 | "scope": "mcnp" 76 | }, 77 | "Neutron particle physics": { 78 | "prefix": [ 79 | "PHYS:n" 80 | ], 81 | "body": [ 82 | "phys:n ${1:100} $ Upper limit neutron energy [MeV]", 83 | " ${2:0} $ Analog energy limit", 84 | " ${3:0} $ Unresolved resonance range prob. table treatment", 85 | " J J J $ Unused", 86 | " ${4:0} $ Light/heavy ion recoil and n-capture algorithm", 87 | " ${5:-1} $ Table-based physics cutoff and memory reduction", 88 | " J J $ Unused", 89 | " ${6:1} $ Secondary photon production", 90 | " ${7:0} $ Treatment of nuclear interactions", 91 | " ${8:0} $ Treatment of nuclear elastic scattering" 92 | ], 93 | "description": "neutron particle physics", 94 | "scope": "mcnp" 95 | }, 96 | "Photon particle physics": { 97 | "prefix": [ 98 | "PHYS:p" 99 | ], 100 | "body": [ 101 | "phys:p ${1:100} $ Upper limit photon energy [MeV]", 102 | " ${2:0} $ Generation of e in MODE p,e, or bremsstrahlung in MODE p", 103 | " ${3:0} $ Coherent (Thomson) scattering", 104 | " ${4:0} $ Photonuclear particle production", 105 | " ${5:0} $ Photon Doppler energy broadening", 106 | " J $ Unused", 107 | " ${6:0} $ Selection of photo-fission method" 108 | ], 109 | "description": "photon particle physics", 110 | "scope": "mcnp" 111 | }, 112 | "Electron particle physics": { 113 | "prefix": [ 114 | "PHYS:e" 115 | ], 116 | "body": [ 117 | "phys:e ${1:100} $ Upper limit electron energy [MeV]", 118 | " ${2:0} $ Generation of photons in MODE e, or bremsstrahlung in MODE p", 119 | " ${3:0} $ Production of photons by electrons", 120 | " ${4:0} $ Bremsstrahlung angular distribution method", 121 | " ${5:0} $ Continuous-energy slowing down (straggling)", 122 | " ${6:1} $ Production of bremsstrahlung photons along substeps", 123 | " ${7:1} $ Electron-induced x-rays produced", 124 | " ${8:1} $ Knock-on electrons produced", 125 | " ${9:1} $ Photon-induced secondary electrons", 126 | " ${10:0} $ Bremsstrahlung production on each electron sub step", 127 | " ${11:0} $ Choice of Coulomb scattering model", 128 | " ${12:0} $ Choice of electron elastic cross section", 129 | " J $ Unused", 130 | " ${13:0.917} $ Stopping power energy spacing", 131 | " ${14:0.001} $ Control start of single-event transport", 132 | " ${15:0} $ Scale Cerenkov photon emission" 133 | ], 134 | "description": "electron particle physics", 135 | "scope": "mcnp" 136 | }, 137 | "Proton particle physics": { 138 | "prefix": [ 139 | "PHYS:h" 140 | ], 141 | "body": [ 142 | "phys:h ${1:100} $ Upper limit proton energy [MeV]", 143 | " ${2:0} $ Analog energy limit [MeV]", 144 | " ${3:-1} $ Table-based physics cutoff", 145 | " J $ Unused", 146 | " ${4:0} $ Controls charged-particle straggling", 147 | " J $ Unused", 148 | " ${5:0} $ Recoil production control for light-ion tabular physics", 149 | " J J J $ Unused", 150 | " ${6:0} $ Controls the choice of Coulomb scattering model", 151 | " ${7:0} $ Controls treatment of nuclear interactions", 152 | " ${8:0} $ Controls treatment of nuclear elastic scattering", 153 | " ${9:0.917} $ Controls stopping power energy spacing", 154 | " J $ Unused", 155 | " ${10:0} $ Scale Cerenkov photon emission", 156 | " ${11:0} $ Lower energy delta-ray cutoff [MeV]" 157 | ], 158 | "description": "proton particle physics", 159 | "scope": "mcnp" 160 | }, 161 | "Activation control": { 162 | "prefix": [ 163 | "ACT" 164 | ], 165 | "body": [ 166 | "act fission = ${1:n} $ Type of delayed particle(s) produced from fission", 167 | " nonfiss = ${2:none} $ Type of delayed particle(s) produced from non-fission", 168 | " dn = ${3:library} $ Delayed neutron data source", 169 | " dg = ${4:none} $ Delayed gamma data source", 170 | " thresh = ${5:10.95} $ Fraction of retained highest-amp. discrete delayed-gamma lines", 171 | " dnbias = ${6:1} $ Delayed neutrons produced per interaction", 172 | " nap = ${7:10} $ N of act. products with calculated cumul. dist. functions", 173 | " dneb = ${8:w1,e1,w2,e2...} $ Delayed neutron energy biasing parameters", 174 | " dgeb = ${9:w1,e1,w2,e2...} $ Delayed photon energy biasing parameters", 175 | " pecut = ${10:0} $ Delayed-gamma energy cutof [MeV]", 176 | " hlcut = ${11:0} $ Spontaneous-decay half-life threshold [s]", 177 | " sample = ${12:correlate} $ Flag for correlated or uncorrelated [MeV]" 178 | ], 179 | "description": "activation control", 180 | "scope": "mcnp" 181 | }, 182 | "Physics cutoffs": { 183 | "prefix": [ 184 | "CUT" 185 | ], 186 | "body": [ 187 | "cut:${1:n} ${2:t} $ Time cutoff [shakes]", 188 | " ${3:e} $ Lower energy cutof [MeV]", 189 | " ${4:wc1,wc2} $ Weight cutoffs ", 190 | " ${5:swtm} $ Minimum source weight" 191 | ], 192 | "description": "physics cutoff cards", 193 | "scope": "mcnp" 194 | }, 195 | "Doppler broadening resonance correction": { 196 | "prefix": [ 197 | "DBRC" 198 | ], 199 | "body": [ 200 | "dbrc endf = ${1:nn} $ Library identifier for scattering data at 0K", 201 | " emax = ${2:eee} $ Upper energy limit for applying DBRC [MeV]", 202 | " isos = ${3:iso_list} $ List of ZZZAAA identifiers, no suffixes" 203 | ], 204 | "description": "doppler broadening resonance correction", 205 | "scope": "mcnp" 206 | }, 207 | "LCA model options": { 208 | "prefix": [ 209 | "LCA" 210 | ], 211 | "body": [ 212 | "lca ${1:2} $ Controls elastic scattering", 213 | " ${2:ipreq} $ Controls pre-equilibrium model", 214 | " ${3:iexisa} $ Controls model choice", 215 | " ${4:ichoic} $ Control ISABEL intranuclear cascade model", 216 | " ${5:1} $ Controls Coulomb barrier for incident charged particles", 217 | " ${6:1} $ Subtract nuclear recoil energy to get excitation energy", 218 | " ${7:0} $ Controls pion termination treatment", 219 | " ${8:1} $ Particle transport options", 220 | " ${9:1} $ Choose alternative physics model", 221 | " ${10:0} $ Choose light ion and nucleon physics modules", 222 | " ${11:nevtype} $ Choose number of evaporation particles modeled by GEM2" 223 | ], 224 | "description": "physics models options", 225 | "scope": "mcnp" 226 | }, 227 | "LCB model options": { 228 | "prefix": [ 229 | "LCB" 230 | ], 231 | "body": [ 232 | "lcb ${1:3500} $ Nucleons, CEM/Bertini/INCL INC used below [MeV]", 233 | " ${2:3500} $ Nucleons, LAQGSM03.03 high-energy generator above [MeV]", 234 | " ${3:2500} $ Pions, CEM/Bertini/INCL INC used below [MeV]", 235 | " ${4:2500} $ Pions, LAQGSM03.03 high-energy generator above [MeV]", 236 | " ${5:800} $ ISABEL INC model used below [MeV]", 237 | " ${6:800} $ An appropriate model used above [MeV]", 238 | " ${7:-1.0} $ Cutoff kinetic energy", 239 | " ${8:-1.0} $ Max correction for mass-energy balancing in cascade" 240 | ], 241 | "description": "physics models options", 242 | "scope": "mcnp" 243 | }, 244 | "LCC model options": { 245 | "prefix": [ 246 | "LCC" 247 | ], 248 | "body": [ 249 | "lcc ${1:1.0} $ Rescaling factor of the cascade duration", 250 | " ${2:45.0} $ Potential depth [MeV]", 251 | " ${3:8.0} $ Maximum impact parameter for Pauli blocking", 252 | " ${4:0} $ Controls the Pauli blocking parameter", 253 | " ${5:-2} $ Diffuse nuclear surface based on Wood-Saxon density", 254 | " J J $ Unused", 255 | " ${6:0} $ Use Bertini model below this energy [MeV]", 256 | " ${7:0} $ Write no INCL bank particles below this energy", 257 | " ${8:0} $ Write no ABLA bank particles below this energy" 258 | ], 259 | "description": "physics models options", 260 | "scope": "mcnp" 261 | }, 262 | "LEA model options": { 263 | "prefix": [ 264 | "LEA" 265 | ], 266 | "body": [ 267 | "lea ${1:1} $ Control generation of de-excitation photons", 268 | " ${2:4} $ Level of physics applied for LAHET-PHT photon physics", 269 | " ${3:1} $ Mass-energy balancing in the cascade stage", 270 | " ${4:0} $ Mass-energy balancing in evaporation stage", 271 | " ${5:1} $ Fermi-breakup model nuclide range", 272 | " ${6:0} $ Level-density model", 273 | " ${7:-1} $ Evaporation and fission models", 274 | " ${8:1} $ Allow or suppress fission" 275 | ], 276 | "description": "physics models options", 277 | "scope": "mcnp" 278 | }, 279 | "LEB model options": { 280 | "prefix": [ 281 | "LEB" 282 | ], 283 | "body": [ 284 | "leb ${1:1.5} $ Y0 parameter in level-density formula for Z ≤ 70", 285 | " ${2:8.0} $ B0 parameter in level-density formula for Z ≤ 70", 286 | " ${3:1.5} $ Y0 parameter in level-density formula for Z > 71", 287 | " ${4:10.0} $ B0 parameter in level-density formula for Z > 71" 288 | ], 289 | "description": "physics models options", 290 | "scope": "mcnp" 291 | }, 292 | "Fission multiplicity constants": { 293 | "prefix": [ 294 | "FMULT" 295 | ], 296 | "body": [ 297 | "fmult ${1:zaid} $ Nuclide for which data are entered", 298 | " sfnu = ${2:x} $ x can be single or a list, see manual", 299 | " width = ${3:w} $ Gaussian width FWHM for sampling", 300 | " sfyield = ${4:y} $ Spontaneous fission yield (n/s-g)", 301 | " watt = ${5:a b} $ Watt energy spectrum parameters", 302 | " method = ${6:0} $ Gaussian sampling algorithm/model physics option", 303 | " data = ${7:0} $ Select data for isotope multiplicities", 304 | " shift = ${8:0} $ Method to modify sampled multiplicity" 305 | ], 306 | "description": "fission multiplicity constants", 307 | "scope": "mcnp" 308 | }, 309 | "Transport options": { 310 | "prefix": [ 311 | "TROPT" 312 | ], 313 | "body": [ 314 | "tropt mcscat = ${1:fnal1} $ Multiple Coulomb scattering", 315 | " eloss = ${2:strag1} $ Slowing down energy losses", 316 | " nreact = ${3:on} $ Nuclear reactions", 317 | " nescat = ${4:on} $ Nuclear elastic scattering", 318 | " genxs = ${5:filename} $ If absent, standard transport occurs" 319 | ], 320 | "description": "transport options", 321 | "scope": "mcnp" 322 | }, 323 | "Magnetic field transfer map parameters": { 324 | "prefix": [ 325 | "COSYP" 326 | ], 327 | "body": [ 328 | "cosyp ${1:prefix} $ The COSY map file prefix number", 329 | " ${2:1} $ Horizontal axis orientation", 330 | " ${3:2} $ Vertical axis orientation", 331 | " ${4:emapk} $ Operating beam energy of maps" 332 | ], 333 | "description": "Magnetic Field Transfer Map Parameters", 334 | "scope": "mcnp" 335 | }, 336 | "Magnetic field definition": { 337 | "prefix": [ 338 | "BFLD" 339 | ], 340 | "body": [ 341 | "bfld${1:0} type = ${2:t} $ Polarity [CONST|QUAD|QUADFF]", 342 | " field = ${3:f} $ Field strength or gradient", 343 | " vec = ${4:1 0 0} $ Direction of field/focusing quadropole", 344 | " axs = ${5:0 0 1} $ Direction cosines of quadrupole beam axis", 345 | " refpnt = ${6:0 0 0} $ Point anywhere on quadrupole beam axis", 346 | " mxdeflc = ${7:10} $ Maximum deflection angle per step size (mrad)", 347 | " maxstep = ${8:100} $ Maximum step size (cm)", 348 | " ffedges = ${9:s1 s2...} $ Surface numbers for fringe-field edge kicks" 349 | ], 350 | "description": "Magnetic field definition", 351 | "scope": "mcnp" 352 | }, 353 | "Gravitational field": { 354 | "prefix": [ 355 | "FIELD" 356 | ], 357 | "body": [ 358 | "field gcut = ${1:0.653} $ Gravitational binding energy (eV) threshold", 359 | " gpar = ${2:1} $ Particle type (limited to neutrons)", 360 | " grad = ${3:3671} $ Radius of planetary object (km)", 361 | " gsur = ${4:s1 s2...} $ List of one or more surface numbers" 362 | ], 363 | "description": "Gravitational field", 364 | "scope": "mcnp" 365 | }, 366 | "General source definition": { 367 | "prefix": [ 368 | "SDEF" 369 | ], 370 | "body": [ 371 | "sdef par = ${1:1} $ Source particle type(s) by symbol or number", 372 | " erg = ${2:14.0} $ Kinetic energy (MeV)", 373 | " pos = ${3:0 0 0} $ Reference point for position sampling", 374 | " wgt = ${4:1.0} $ Particle weight" 375 | ], 376 | "description": "General source definition", 377 | "scope": "mcnp" 378 | }, 379 | "Full general source definition": { 380 | "prefix": [ 381 | "SDEF (full)" 382 | ], 383 | "body": [ 384 | "sdef par = ${1:1} $ Source particle type(s) by symbol or number", 385 | " erg = ${2:14.0} $ Kinetic energy (MeV)", 386 | " pos = ${3:0 0 0} $ Reference point for position sampling", 387 | " x = ${4:0} $ X coordinate of position", 388 | " y = ${5:0} $ Y coordinate of position", 389 | " z = ${6:0} $ Z coordinate of position", 390 | " vec = ${7:0 0 1} $ Reference vector for DIR in vector notation", 391 | " rad = ${8:0} $ Radial distance of the position from POS or AXS", 392 | " ext = ${9:0} $ Vol: dist. from POS along AXS. Sur: cosine from AXS", 393 | " sur = ${10:0} $ Surface number", 394 | " nrm = ${11:1} $ Sign of the surface normal", 395 | " wgt = ${12:1.0} $ Particle weight", 396 | " tme = ${13:0} $ Time (shakes)", 397 | " eff = ${14:0.01} $ Rejection efficiency criterion for position sampling", 398 | " dir = d $ Cosine of angle between VEC and direction of flight", 399 | " ccc = n $ Cookie-cutter cell number", 400 | " tr = n $ Source particle transformation number", 401 | " axs = a $ Reference vector for EXT and RAD in vector notation", 402 | " cel = c $ Cell number", 403 | " ara = area $ Area of surface", 404 | " loc = lat lng alt $ Location of cosmic particle source", 405 | " dat = m d year $ Date as month - day - year", 406 | " bem = exn eyn bml $ Beam emittance parameters", 407 | " bap = ba1 ba2 u $ Beam aperture parameters" 408 | ], 409 | "description": "General source definition", 410 | "scope": "mcnp" 411 | }, 412 | "Surface source write": { 413 | "prefix": [ 414 | "SSW" 415 | ], 416 | "body": [ 417 | "ssw ${1:s1 s2...} $ Problem surface numbers", 418 | " ${2:c1 c2...} $ Problem cell numbers", 419 | " sym = ${3:0} $ Symmetry option flag", 420 | " pty = ${4:p1 p2...} $ Controls particle types to record", 421 | " cel = ${5:cf1 cf2...} $ KCODE fission source neutrons writte for these cells" 422 | ], 423 | "description": "Surface source write", 424 | "scope": "mcnp" 425 | }, 426 | "Surface source read": { 427 | "prefix": [ 428 | "SSR" 429 | ], 430 | "body": [ 431 | "ssr old = ${1:c1 c2...} $ Use all surfaces in the original calculation if blank", 432 | " cel = ${2:s1 s2...} $ Use all cells in the original calculation if blank", 433 | " new = ${3:sa1 sa2...} $ Assign new surfaces, use OLD list if blank", 434 | " pty = ${4:p1 p2...} $ Particle types for which the tracks are to be read", 435 | " col = ${5:0} $ Collision option flag", 436 | " wgt = ${6:1.0} $ Multiply particle weights by the constant", 437 | " tr = ${7:n} $ Transformation number/ distribution number", 438 | " psc = ${8:c} $ Constant used in PSC evaluation" 439 | ], 440 | "description": "Surface source write", 441 | "scope": "mcnp" 442 | }, 443 | "Criticality Source": { 444 | "prefix": [ 445 | "KCODE" 446 | ], 447 | "body": [ 448 | "kcode ${1:1000} $ Number of source histories per cycle", 449 | " ${2:1.0} $ Initial guess for k_eff", 450 | " ${3:30} $ Number of cycles to be skipped before beginning tally accumulation", 451 | " ${4:130} $ Total number of cycles to be done", 452 | " ${5:4500} $ Number of source points for which to allocate storage", 453 | " ${6:0} $ Controls normalization of tallies", 454 | " ${7:6500} $ Maximum number of cycle values on MCTAL or RUNTPE files", 455 | " ${8:1} $ Cycles over which summary and tally information are averaged" 456 | ], 457 | "description": "Criticality Source", 458 | "scope": "mcnp" 459 | }, 460 | "Criticality Options": { 461 | "prefix": [ 462 | "KOPTS" 463 | ], 464 | "body": [ 465 | "kopts blocksize = ${1:10} $ Number of cycles in every outer iteration", 466 | " kinetics = ${2:no} $ Calculate point-kinetics parameters", 467 | " precursor = ${3:no} $ Calculate detailed precursor information", 468 | " ksental = ${4:mctal} $ Format of sensitivity profiles file, KSENTAL", 469 | " fmat = ${5:no} $ Compute the fission matrix", 470 | " fmatconvrg = ${6:no} $ Use fission matrix to determine convergence", 471 | " fmataccel = ${7:no} $ Use fission matrix tfor importance weighting", 472 | " fmatsrc = ${8:no} $ Sample source particles uniformly from fission matrix", 473 | " fmatskip = ${9:1} $ Skips n batches before accumulating fission matrix tallies", 474 | " fmatncyc = ${10:10} $ Batches between fission matrix solves", 475 | " fmatspace = ${11:100000000} $ Initial number of nonzero elements to allocate", 476 | " fmatnx = ${12:0} $ X-axis fission matrix mesh spacing", 477 | " fmatny = ${13:0} $ Y-axis fission matrix mesh spacing", 478 | " fmatnz = ${14:0} $ Z-axis fission matrix mesh spacing" 479 | ], 480 | "description": "Criticality Options", 481 | "scope": "mcnp" 482 | }, 483 | "Shannon Entropy Mesh": { 484 | "prefix": [ 485 | "HSRC" 486 | ], 487 | "body": [ 488 | "hsrc ${1:n_x} $ Number of mesh intervals in x direction", 489 | " ${2:x_min} $ Minimum x value for mesh", 490 | " ${3:x_max} $ Maximum x value for mesh", 491 | " ${4:n_y} $ Number of mesh intervals in y direction", 492 | " ${5:y_min} $ Minimum y value for mesh", 493 | " ${6:y_max} $ Maximum y value for mesh", 494 | " ${7:n_z} $ Number of mesh intervals in z direction", 495 | " ${8:z_min} $ Minimum z value for mesh", 496 | " ${9:z_max} $ Maximum z value for mesh" 497 | ], 498 | "description": "Shannon Entropy Mesh", 499 | "scope": "mcnp" 500 | }, 501 | "Depletion/Burnup": { 502 | "prefix": [ 503 | "BURN" 504 | ], 505 | "body": [ 506 | "burn time = ${1:t1 t2...} $ Incremental time duration for burn steps", 507 | " pftrac = ${2:f1 f2...} $ Fraction total power applied to time steps", 508 | " power = ${3:1} $ Total recoverable fission system power (MW)", 509 | " mat = ${4:m1 m2...} $ Materials participating in burnup calculation", 510 | " omit = ${5:m1 [n1 n2...]} $ For material (m), omit ZAIDs (n) from calculation", 511 | " afmin = ${6:1e-10 1e-10} $ Atom fraction controls", 512 | " bopt = ${7:b1 b2 b3} $ Burnup options", 513 | " matvol = ${8:v1 v2...} $ Volume of all cells containing corresponding burn material", 514 | " matmod = ${9:n ts1 [m1 m2...]} $ Change material concentrations with time", 515 | " swapb = ${10:n ts1 [u1 u2...]} $ Swap universe content at the end of time steps", 516 | " nostats $ Disable computation/output of statistical parameters" 517 | ], 518 | "description": "Depletion/Burnup", 519 | "scope": "mcnp" 520 | }, 521 | "Print Hierarchy": { 522 | "prefix": [ 523 | "FQn" 524 | ], 525 | "body": [ 526 | "fq${1:4} F $ Cell, surface, or detector bins", 527 | " D $ Direct or flagged bins", 528 | " U $ User bins", 529 | " S $ Segment bins", 530 | " M $ Multiplier bins", 531 | " C $ Cosine bins", 532 | " E $ Energy bins", 533 | " T $ Time bins" 534 | ], 535 | "description": "Print Hierarchy", 536 | "scope": "mcnp" 537 | }, 538 | "Tally Perturbations": { 539 | "prefix": [ 540 | "PERTn" 541 | ], 542 | "body": [ 543 | "pert${1:4}:${2:n} cell = ${3:c1 c2...} $ Cells to apply perturbation to", 544 | " mat = ${4:m} $ Fills all cells with specified material", 545 | " rho = ${5:r} $ Sets filled cell material density", 546 | " method = ${6:1} $ Number of terms included in perturbation estimate", 547 | " erg = ${7:e_l e_u} $ Lower and upper bounds energy range for perturbations", 548 | " rxn = ${8:r1 r2...} $ ENDF/B reaction number(s) for perturbed xs" 549 | ], 550 | "description": "Tally Perturbations via Differential Operator", 551 | "scope": "mcnp" 552 | }, 553 | "Reactivity Perturbations": { 554 | "prefix": [ 555 | "KPERTn" 556 | ], 557 | "body": [ 558 | "kpert${1:0} cell = ${2:c1 c2...} $ Cells to apply perturbation to", 559 | " mat = ${3:m1 m2...} $ Fill cells with specified material(s)", 560 | " rho = ${4:r1 r2...} $ Sets filled cell material densities", 561 | " iso = ${5:z1 z2...} $ ZAIDs that the perturbation impacts", 562 | " rxn = ${6:rx1 rx2...} $ MT or special reaction numbers the perturbation impacts", 563 | " erg = ${7:e1 e2...} $ Energies (MeV) to apply perturbation over", 564 | " linear = ${8:yes} $ Force an unperturbed fission source" 565 | ], 566 | "description": "Reactivity Perturbations via Adjoint Weighting", 567 | "scope": "mcnp" 568 | }, 569 | "Sensitivity Coefficients": { 570 | "prefix": [ 571 | "KSENn" 572 | ], 573 | "body": [ 574 | "ksen${1:0} ${2:xs} $ Type of sensitivity", 575 | " iso = ${3:z1 z2...} $ ZAIDs for which sensitivities are desired.", 576 | " rxn = ${4:rx1 rx2...} $ Reaction MT numbers or special reaction numbers", 577 | " mt = ${5:r1 r2...} $ Same behavior as RXN", 578 | " erg = ${6:e1 e2...} $ Energy bin boundaries (MeV) to apply sensitivity over", 579 | " ein = ${7:e1 e2...} $ Range of inclident energy bins (MeV)", 580 | " legendre = ${8:order} $ Order of Legendre moments to calculate sensitivities for", 581 | " cos = ${9:min max} $ Range of direction-change cosines for scattering events", 582 | " constrain = ${10:yes} $ Renormalize the energy (or cosine) sensitivity distribution" 583 | ], 584 | "description": "k_eff Sensitivity Coefficients via Adjoint Weighting", 585 | "scope": "mcnp" 586 | }, 587 | "Track-averaged TMESH Mesh Tally": { 588 | "prefix": [ 589 | "RMESH1", 590 | "CMESH1", 591 | "SMESH1" 592 | ], 593 | "body": [ 594 | "c Track-averaged TMESH Mesh Tally", 595 | "${1:r}mesh${2:1}:${3:n}", 596 | " ${4:traks} $ tally the number of tracks through each mesh volume", 597 | " ${5:flux} $ Fluence is particle weight * track length / volume", 598 | " ${6:popul} $ Score tally population in each volume", 599 | " ${7:pedep} $ Score average energy deposition per unit volume", 600 | " mfact = ${8:n c...} $ Response function given on MSHMF followed by constant multiplier", 601 | " trans = ${9:n} $ TRn card number used to translate entire mesh", 602 | "c", 603 | "cora${2:3} ${10:ca1 ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)", 604 | "corb${2:3} ${11:cb1 cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)", 605 | "corc${2:3} ${12:cc1 cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)", 606 | "c", 607 | "ergsh${2:3} ${13:low high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally", 608 | "mshmf${14:0} ${15:[e1 f1]...} $ Pairs of energy and response functions", 609 | "c" 610 | ], 611 | "description": "Track-averaged TMESH Mesh Tally", 612 | "scope": "mcnp" 613 | }, 614 | "Source TMESH Mesh Tally": { 615 | "prefix": [ 616 | "RMESH2", 617 | "CMESH2", 618 | "SMESH2" 619 | ], 620 | "body": [ 621 | "c Source TMESH Mesh Tally", 622 | "${1:r}mesh${2:2} ${3:p1 p2...} $ Particle designators", 623 | " trans = ${4:n} $ TRn card number used to translate entire mesh", 624 | "c", 625 | "cora${2:3} ${5:ca1 ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)", 626 | "corb${2:3} ${6:cb1 cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)", 627 | "corc${2:3} ${7:cc1 cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)", 628 | "c", 629 | "ergsh${2:3} ${8:low high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally", 630 | "mshmf${9:0} ${10:[e1 f1]...} $ Pairs of energy and response functions", 631 | "c" 632 | ], 633 | "description": "Source TMESH Mesh Tally", 634 | "scope": "mcnp" 635 | }, 636 | "Energy Deposition TMESH Mesh Tally": { 637 | "prefix": [ 638 | "RMESH3", 639 | "CMESH3", 640 | "SMESH3" 641 | ], 642 | "body": [ 643 | "c Energy Deposition TMESH Mesh Tally", 644 | "${1:r}mesh${2:3} ${3:total} $ Score energy deposited from any source", 645 | " ${4:de/dx} $ Score ionization from charged particles", 646 | " ${5:recol} $ Score energy transferred to recoil nuclei", 647 | " ${6:tlest} $ Score track length folded with tabular heating numbers", 648 | " ${7:edlct} $ Score non-tracked particles assumed to deposit energy locally", 649 | " mfact = ${8:n c...} $ Response function given on MSHMF followed by constant multiplier", 650 | " trans = ${9:n} $ TRn card number used to translate entire mesh", 651 | "c", 652 | "cora${2:3} ${10:ca1 ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)", 653 | "corb${2:3} ${11:cb1 cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)", 654 | "corc${2:3} ${12:cc1 cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)", 655 | "c", 656 | "ergsh${2:3} ${13:low high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally", 657 | "mshmf${14:0} ${15:[e1 f1]...} $ Pairs of energy and response functions", 658 | "c" 659 | ], 660 | "description": "Energy Deposition TMESH Mesh Tally", 661 | "scope": "mcnp" 662 | }, 663 | "DXTRAN TMESH Mesh Tally": { 664 | "prefix": [ 665 | "RMESH4", 666 | "CMESH4", 667 | "SMESH4" 668 | ], 669 | "body": [ 670 | "c DXTRAN TMESH Mesh Tally", 671 | "${1:r}mesh${2:4}:${3:n}", 672 | " trans = ${3:n} $ TRn card number used to translate entire mesh", 673 | "c", 674 | "cora${2:3} ${10:ca1 ca2...} $ Mesh bounds in X (rec) or R (cyl/sph)", 675 | "corb${2:3} ${11:cb1 cb2...} $ Mesh bounds in Y (rec), Z (cyl), or Phi (sph)", 676 | "corc${2:3} ${12:cc1 cc2...} $ Mesh bounds in Z (rec) or Theta (cyl/sph)", 677 | "c", 678 | "ergsh${2:3} ${13:low high} $ Lower/upper energy(+ve) or time(-ve) limits for stroring to tally", 679 | "mshmf${14:0} ${15:[e1 f1]...} $ Pairs of energy and response functions", 680 | "c" 681 | ], 682 | "description": "DXTRAN TMESH Mesh Tally", 683 | "scope": "mcnp" 684 | }, 685 | "TMESH Mesh Tally Markers": { 686 | "prefix": [ 687 | "TMESH" 688 | ], 689 | "body": [ 690 | "tmesh $ ------ TMESH tallies start ------", 691 | "c", 692 | "${1:c RMESH/CMESH/SMESH tallies here}", 693 | "c", 694 | "endmd $ ------ TMESH tallies end ------" 695 | ], 696 | "description": "TMESH Mesh Tally Markers", 697 | "scope": "mcnp" 698 | }, 699 | "Rectangular Superimposed Mesh Tally B": { 700 | "prefix": [ 701 | "FMESHn (rec)" 702 | ], 703 | "body": [ 704 | "fc4 Rectangular mesh tally", 705 | "fmesh4:${1:n}", 706 | " origin= ${2:0.0 0.0 0.0} $ Coordinates (x,y,z) of mesh origin", 707 | " geom = ${3:xyz} $ Mesh geometry", 708 | " out = ${4:xdmf} $ Output format", 709 | " imesh = ${5:10} iints = ${6:5} $ Coarse mesh points in X", 710 | " jmesh = ${7:10} jints = ${8:5} $ Coarse mesh points in Y", 711 | " kmesh = ${9:10} kints = ${10:5} $ Coarse mesh points in Z", 712 | " emesh = ${11:1.0e36} $ Energy bin upper edges (MeV)" 713 | ], 714 | "description": "Superimposed Mesh Tally B", 715 | "scope": "mcnp" 716 | }, 717 | "Cylindrical Superimposed Mesh Tally B": { 718 | "prefix": [ 719 | "FMESHn (cyl)" 720 | ], 721 | "body": [ 722 | "fc4 Cylindrical mesh tally", 723 | "fmesh4:${1:n}", 724 | " origin= ${2:0.0 0.0 0.0} $ Coordinates (x,y,z) of mesh origin", 725 | " axs = ${3:0.0 0.0 1.0} $ Direction of the cylinder axis", 726 | " vec = ${4:1.0 0.0 0.0} $ Vector defining plane for theta=0", 727 | " geom = ${5:rzt} $ Mesh geometry", 728 | " out = ${6:xdmf} $ Output format", 729 | " imesh = ${7:10} iints = ${8:5} $ Coarse mesh points in R", 730 | " jmesh = ${9:10} jints = ${10:5} $ Coarse mesh points in Z", 731 | " kmesh = ${11:10} kints = ${12:5} $ Coarse mesh points in T", 732 | " emesh = ${13:1.0e36} $ Energy bin upper edges (MeV)" 733 | ], 734 | "description": "Superimposed Mesh Tally B", 735 | "scope": "mcnp" 736 | }, 737 | "Full Superimposed Mesh Tally B": { 738 | "prefix": [ 739 | "FMESHn (full)" 740 | ], 741 | "body": [ 742 | "fc4 Full mesh tally with all keywords", 743 | "fmesh4:${1:n}", 744 | " origin= ${2:0.0 0.0 0.0} $ Coordinates (x,y,z) of mesh origin", 745 | " axs = ${3:0.0 0.0 1.0} $ Direction of the cylinder axis", 746 | " vec = ${4:1.0 0.0 0.0} $ Vector defining plane for theta=0", 747 | " geom = ${5:rzt} $ Mesh geometry", 748 | " out = ${6:xdmf} $ Output format", 749 | " imesh = ${7:10} iints = ${8:5} $ Coarse mesh points in X/R", 750 | " jmesh = ${9:10} jints = ${10:5} $ Coarse mesh points in Y/Z", 751 | " kmesh = ${11:10} kints = ${12:5} $ Coarse mesh points in Z/T", 752 | " tmesh = ${13:1.0e36} $ Time bin upper edges (shakes)", 753 | " tnorm = ${14:1.0} $ Time normalisation", 754 | " emesh = ${15:1.0e36} $ Energy bin upper edges (MeV)", 755 | " enorm = ${16:1.0} $ Energy normalisation", 756 | " factor= ${17:1.0} $ Multiplicative factor for each mesh", 757 | " tr = ${18:n} $ Number of the transformation to apply", 758 | " inc = ${19:low high} $ Range of collisions that will contribute (MeV)", 759 | " type = ${20:flux} $ Specify the quantity being tallied", 760 | " kclear= ${21:0} $ Generate visualization of cycle quantities", 761 | " tally = ${22:fast_hist} $ Tallying algorithm" 762 | ], 763 | "description": "Superimposed Mesh Tally B", 764 | "scope": "mcnp" 765 | }, 766 | "Weight-window Parameters": { 767 | "prefix": [ 768 | "WWP" 769 | ], 770 | "body": [ 771 | "wwp:${1:n} ${2:5} $ Multiplier defining weight window upper limit", 772 | " ${3:3} $ Multiplier defining max Russian roulette survival weight", 773 | " ${4:5} $ Max number of integer splits", 774 | " ${5:0} $ Control where to check a particle's weight", 775 | " ${6:0} $ Control where to get lower weight window bounds", 776 | " ${7:0} $ Controls treatment of WWE card", 777 | " ${8:1} $ Weight-window normalization factor", 778 | " ${9:0} $ Energy- and time-splitting control", 779 | " ${10:0} $ Limit max lower weight bound for any particle/energy/time", 780 | " ${11:1} $ Number of mean-free paths before checking mesh-based weights" 781 | ], 782 | "description": "Weight-window Parameters", 783 | "scope": "mcnp" 784 | }, 785 | "Weight-window Generation": { 786 | "prefix": [ 787 | "WWG" 788 | ], 789 | "body": [ 790 | "wwg ${1:n} $ Problem tally number to optimise for", 791 | " ${2:t} $ Invokes cell (>0) or mesh-based (=0) generator", 792 | " ${3:w} $ Value of generated lower weight-window bound", 793 | " 4j $ Unused", 794 | " ${4:i} $ Toggle energy (=0) or time (=1) dependent weight windows" 795 | ], 796 | "description": "Weight-window Generation", 797 | "scope": "mcnp" 798 | }, 799 | "Importance Mesh for Mesh-Based Weight-Window Generator": { 800 | "prefix": [ 801 | "MESH" 802 | ], 803 | "body": [ 804 | "mesh geom = ${1:rzt} $ Mesh geometry", 805 | " ref = ${2:0.0 0.0 0.0} $ X, Y, and Z coordinates of the reference point", 806 | " origin= ${3:0.0 0.0 0.0} $ Coordinates (x,y,z) of mesh origin", 807 | " axs = ${4:0.0 0.0 1.0} $ Direction of the cylinder axis", 808 | " vec = ${5:1.0 0.0 0.0} $ Vector defining plane for theta=0", 809 | " imesh = ${6:10} iints = ${7:5} $ Coarse mesh points in X/R", 810 | " jmesh = ${8:10} jints = ${9:5} $ Coarse mesh points in Y/Z", 811 | " kmesh = ${10:10} kints = ${11:5} $ Coarse mesh points in Z/T" 812 | ], 813 | "description": "Importance Mesh for Mesh-Based Weight-Window Generator", 814 | "scope": "mcnp" 815 | }, 816 | "DXTRAN Sphere": { 817 | "prefix": [ 818 | "DXT" 819 | ], 820 | "body": [ 821 | "dxt:${1:n} ${2:xk yk zk} $ Coordinates of center of the kth pair of spheres", 822 | " ${3:rik} $ Radius of the kth inner sphere (cm)", 823 | " ${4:rok} $ Radius of the kth outer sphere (cm)", 824 | " ${5:0.0} $ Upper weight cutoff for DXTRAN weight-cutoff", 825 | " ${6:0.0} $ Lower weight cutoff for DXTRAN weight-cutoff", 826 | " ${7:0.0} $ Minimum photon weight" 827 | ], 828 | "description": "Importance Mesh for Mesh-Based Weight-Window Generator", 829 | "scope": "mcnp" 830 | }, 831 | "History Cutoff": { 832 | "prefix": [ 833 | "NPS" 834 | ], 835 | "body": [ 836 | "nps ${1:npp} $ The total number of histories to be run in the problem", 837 | " ${2:npsmg} $ Direct source contributions to pixels of FIR radiography grid", 838 | " ${3:n_per_batch} $ Number of histories used per batch for tallies with batch statistics" 839 | ], 840 | "description": "History Cutoff", 841 | "scope": "mcnp" 842 | }, 843 | "Precision Cutoff": { 844 | "prefix": [ 845 | "STOP" 846 | ], 847 | "body": [ 848 | "stop nps = ${1:npp} $ Stop calculation after npp particle histories", 849 | " ctme = ${2:tme} $ Stop calculation after tme minutes of computer time", 850 | " F${3:0} = ${4:e} $ Stop calculation when rel. err. of tally k is 0) or ellipsoid center (r<0)", 1048 | " ${4:v2x} ${5:v2y} ${6:v2z} $ Coordinates of second focus (r>0) or major axis vector (r<0)", 1049 | " ${7:r} $ major (r>0) or minor (r<0) radius length" 1050 | ], 1051 | "description": "ELL macrobody", 1052 | "scope": "mcnp" 1053 | }, 1054 | "WED macrobody": { 1055 | "prefix": [ 1056 | "WED" 1057 | ], 1058 | "body": [ 1059 | "WED $ Macrobody: Wedge", 1060 | " ${1:x} ${2:y} ${3:z} $ (x,y,z) coordinates of wedge vertex", 1061 | " ${4:v1x} ${5:v1y} ${6:v1z} $ Vector of first side of triangular base", 1062 | " ${7:v2x} ${8:v2y} ${9:v2z} $ Vector of second side of triangular base", 1063 | " ${10:v3x} ${11:v3y} ${12:v3z} $ Height vector" 1064 | ], 1065 | "description": "WED macrobody", 1066 | "scope": "mcnp" 1067 | }, 1068 | "ARB": "Arbitrary Polyhedron", 1069 | "ARB macrobody": { 1070 | "prefix": [ 1071 | "ARB" 1072 | ], 1073 | "body": [ 1074 | "ARB $ Macrobody: Arbitrary Polyhedron", 1075 | " x1 y2 z3 $ (x,y,z) coordinates of first corner of the polyhedron", 1076 | " x1 y2 z3 $ (x,y,z) coordinates of second corner of the polyhedron", 1077 | " x1 y2 z3 $ (x,y,z) coordinates of third corner of the polyhedron", 1078 | " x1 y2 z3 $ (x,y,z) coordinates of fourth corner of the polyhedron", 1079 | " x1 y2 z3 $ (x,y,z) coordinates of fifth corner of the polyhedron", 1080 | " x1 y2 z3 $ (x,y,z) coordinates of sixth corner of the polyhedron", 1081 | " x1 y2 z3 $ (x,y,z) coordinates of seventh corner of the polyhedron", 1082 | " x1 y2 z3 $ (x,y,z) coordinates of eighth corner of the polyhedron", 1083 | " ni $ Four-digit numbers describing a side of the polyhedron by corresponding corners" 1084 | ], 1085 | "description": "ARB macrobody", 1086 | "scope": "mcnp" 1087 | } 1088 | } 1089 | --------------------------------------------------------------------------------