-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve ab initio DataCard __init__ #88
Comments
Probably make a factory so we don't break the existing signature. |
Support for |
My two cents: MCCAFE shouldn't be making data cards from scratch for release 1.0. I think we need to support everything MCCAFE needs mainly #15. |
In GitLab by @tjlaboss on Dec 21, 2023, 15:05 Bare minimum:
https://experiment_analysis_all.pages.hpc.inl.gov/software/MCCAFE/um/output/decks.html#data-cards |
Thinking about this more I think this feature should be implemented for all objects. I'm thinking: class MCNP_Object:
@staticmethod
def create_from_str(cls, strs):
# make input
# invoke init I'm split though if it should take |
In GitLab by @tjlaboss on Jan 5, 2024, 10:51 haha you're First thought is that if I'm a new user and want to create a card from a string, I expect just to give it a valid line of text and for it to work, including handling the line wrapping. This is probably more important than catering to an advanced user with pedantic formatting tastes (i.e. @tjlaboss). |
and pedants can always do |
I'm thinking what if we added Like you could do: cell = montepy.parse("1 0 -1 imp:n =1")
surf = montepy.parse(" 1 pz 10")
mat = montepy.parse("m1 1001.80c 1.0") I think for this it would have to try: data -> surface -> cell due to easiest to hardest parsers. Thoughts @tjlaboss? |
I'm thinking it would be fine to allow |
Users would like a stop gap measure to add special DataCards like
nps 2e9
without needing full support for thenps
card yet.Right now to do this the user would have to make a string for the card put in a list, generate a new
Card
, and then use thatCard
to generate a newDataCard
.The text was updated successfully, but these errors were encountered: