Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermal Scattering Law does not require suffix #631

Open
tjlaboss opened this issue Jan 10, 2025 · 3 comments
Open

Thermal Scattering Law does not require suffix #631

tjlaboss opened this issue Jan 10, 2025 · 3 comments
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". good first issue Good for newcomers parsers are hard Examples of where MCNP syntax is complicated and should be simplified.

Comments

@tjlaboss
Copy link
Collaborator

Describe the bug

MCNP allows the user to specify nuclides and thermal scattering laws without including a cross-section suffix. MontePy allows this for nuclides and elements, but not TSLs. Although it is not good practice, this syntax should be supported by MontePy as well.

To Reproduce

A short code snippet of what you have ran. Please change or remove any specific values or anything that can't be public. For example:

montepy.data_inputs.ThermalScatteringLaw("MT2 lwtr")

Error Message (if any)

If an error message was printed please include the entire stacktrace. If it includes any specific values please change or remove them. For example:

montepy.errors.ParsingError:     , line 0

    >    0| MT2 lwtr
          |     ^^^^ not expected here.
There was an error parsing "lwtr".
sly: Syntax error at line 1, token=TEXT


Error came from THERMAL SCATTER: [] from an unknown file.

MCNP input file snippet

Rather than including an entire file:

MT2  lwtr

Version

  • develop

Additional context

MCNP 6.3 Manual § 5.6.2: nowhere does it require sabidk to include a data suffix.

image

@tjlaboss tjlaboss added good first issue Good for newcomers bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". labels Jan 10, 2025
@MicahGale
Copy link
Collaborator

version: 0.5.3.post2.dev24+gcf733bcc

@MicahGale
Copy link
Collaborator

🤦‍♂️

@MicahGale MicahGale added the parsers are hard Examples of where MCNP syntax is complicated and should be simplified. label Jan 11, 2025
@MicahGale
Copy link
Collaborator

Do you want to learn parsers @tjlaboss?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". good first issue Good for newcomers parsers are hard Examples of where MCNP syntax is complicated and should be simplified.
Projects
None yet
Development

No branches or pull requests

2 participants