CYCLUS
pyne.cc
Go to the documentation of this file.
1 // This file is composed of the following original files:
2 
3 // license.txt
4 // src/utils.cpp
5 // src/state_map.cpp
6 // src/nucname.cpp
7 // src/rxname.cpp
8 // src/_atomic_data.cpp
9 // src/data.cpp
10 // src/jsoncpp.cpp
11 // src/jsoncustomwriter.cpp
12 // src/material.cpp
13 // src/enrichment_cascade.cpp
14 // src/enrichment.cpp
15 // src/enrichment_symbolic20.cpp
16 // src/_decay.cpp
17 
18 // PyNE amalgated source http://pyne.io/
19 #include "pyne.h"
20 
21 //
22 // start of license.txt
23 //
24 // Copyright 2011-2015, the PyNE Development Team. All rights reserved.
25 //
26 // Redistribution and use in source and binary forms, with or without modification, are
27 // permitted provided that the following conditions are met:
28 //
29 // 1. Redistributions of source code must retain the above copyright notice, this list of
30 // conditions and the following disclaimer.
31 //
32 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
33 // of conditions and the following disclaimer in the documentation and/or other materials
34 // provided with the distribution.
35 //
36 // THIS SOFTWARE IS PROVIDED BY THE PYNE DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESS OR IMPLIED
37 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
38 // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
39 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
41 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
42 // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
43 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
44 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 //
46 // The views and conclusions contained in the software and documentation are those of the
47 // authors and should not be interpreted as representing official policies, either expressed
48 // or implied, of the stakeholders of the PyNE project or the employers of PyNE developers.
49 //
50 // -------------------------------------------------------------------------------
51 // The files cpp/measure.cpp and cpp/measure.hpp are covered by:
52 //
53 // Copyright 2004 Sandia Corporation. Under the terms of Contract
54 // DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
55 // retains certain rights in this software.
56 //
57 // http://trac.mcs.anl.gov/projects/ITAPS/wiki/MOAB
58 // //
59 // end of license.txt
60 //
61 
62 
63 //
64 // start of src/utils.cpp
65 //
66 // General Library
67 #ifndef PYNE_IS_AMALGAMATED
68 extern "C" double endftod_(char *str, int len);
69 #endif
70 
71 #ifndef PYNE_IS_AMALGAMATED
72 #include "utils.h"
73 #endif
74 
75 
76 // PyNE Globals
77 
78 std::string pyne::PYNE_DATA = "";
79 std::string pyne::NUC_DATA_PATH = "";
80 
82 #if defined __WIN_MSVC__
83  char * tmpPYNE_DATA;
84  size_t lenPYNE_DATA;
85  errno_t errPYNE_DATA = _dupenv_s(&tmpPYNE_DATA, &lenPYNE_DATA, "PYNE_DATA");
86  if (errPYNE_DATA)
87  tmpPYNE_DATA = (char *) "<NOT_FOUND>";
88  PYNE_DATA = (std::string) tmpPYNE_DATA;
89 
90  char * tmpNUC_DATA_PATH;
91  size_t lenNUC_DATA_PATH;
92  errno_t errNUC_DATA_PATH = _dupenv_s(&tmpNUC_DATA_PATH, &lenNUC_DATA_PATH, "NUC_DATA_PATH");
93  if (errPYNE_DATA)
94  tmpNUC_DATA_PATH = (char *) "<NOT_FOUND>";
95  NUC_DATA_PATH = (std::string) tmpNUC_DATA_PATH;
96 #else
97  char * tmppath;
98  tmppath = getenv("PYNE_DATA");
99  if (tmppath == NULL)
100  tmppath = (char *) "<NOT_FOUND>";
101  PYNE_DATA = std::string(tmppath);
102 
103  tmppath = getenv("NUC_DATA_PATH");
104  if (tmppath == NULL)
105  tmppath = (char *) "<NOT_FOUND>";
106  NUC_DATA_PATH = std::string(tmppath);
107 #endif
108  return;
109 }
110 
111 
112 
113 // String Transformations
114 std::string pyne::to_str(int t) {
115  std::stringstream ss;
116  ss << t;
117  return ss.str();
118 }
119 
120 std::string pyne::to_str(unsigned int t) {
121  std::stringstream ss;
122  ss << t;
123  return ss.str();
124 }
125 
126 std::string pyne::to_str(double t) {
127  std::stringstream ss;
128  ss << t;
129  return ss.str();
130 }
131 
132 std::string pyne::to_str(bool t) {
133  std::stringstream ss;
134  ss << t;
135  return ss.str();
136 }
137 
138 
139 int pyne::to_int(std::string s) {
140  return atoi( s.c_str() );
141 }
142 
143 double pyne::to_dbl(std::string s) {
144  return strtod( s.c_str(), NULL );
145 }
146 
147 double pyne::endftod_cpp(char * s) {
148  // Converts string from ENDF only handles "E-less" format but is 5x faster
149  int pos, mant, exp;
150  double v, dbl_exp;
151 
152  mant = exp = 0;
153  if (s[2] == '.') {
154  // Convert an ENDF float
155  if (s[9] == '+' or s[9] == '-') {
156  // All these factors of ten are from place values.
157  mant = s[8] + 10 * s[7] + 100 * s[6] + 1000 * s[5] + 10000 * s[4] + \
158  100000 * s[3] + 1000000 * s[1] - 1111111 * '0';
159  exp = s[10] - '0';
160  // Make the right power of 10.
161  dbl_exp = exp & 01? 10.: 1;
162  dbl_exp *= (exp >>= 1) & 01? 100.: 1;
163  dbl_exp *= (exp >>= 1) & 01? 1.0e4: 1;
164  dbl_exp *= (exp >>= 1) & 01? 1.0e8: 1;
165  // Adjust for powers of ten from treating mantissa as an integer.
166  dbl_exp = (s[9] == '-'? 1/dbl_exp: dbl_exp) * 1.0e-6;
167  // Get mantissa sign, apply exponent.
168  v = mant * (s[0] == '-'? -1: 1) * dbl_exp;
169  }
170  else {
171  mant = s[7] + 10 * s[6] + 100 * s[5] + 1000 * s[4] + 10000 * s[3] + \
172  100000 * s[1] - 111111 * '0';
173  exp = s[10] + 10 * s[9] - 11 * '0';
174  dbl_exp = exp & 01? 10.: 1;
175  dbl_exp *= (exp >>= 1) & 01? 100.: 1;
176  dbl_exp *= (exp >>= 1) & 01? 1.0e4: 1;
177  dbl_exp *= (exp >>= 1) & 01? 1.0e8: 1;
178  dbl_exp *= (exp >>= 1) & 01? 1.0e16: 1;
179  dbl_exp *= (exp >>= 1) & 01? 1.0e32: 1;
180  dbl_exp *= (exp >>= 1) & 01? 1.0e64: 1;
181  dbl_exp = (s[8] == '-'? 1/dbl_exp: dbl_exp) * 1.0e-5;
182  v = mant * (s[0] == '-'? -1: 1) * dbl_exp;
183  }
184  }
185 
186  // Convert an ENDF int to float; we start from the last char in the field and
187  // move forward until we hit a non-digit.
188  else {
189  v = 0;
190  mant = 1; // Here we use mant for the place value about to be read in.
191  pos = 10;
192  while (s[pos] != '-' and s[pos] != '+' and s[pos] != ' ' and pos > 0) {
193  v += mant * (s[pos] - '0');
194  mant *= 10;
195  pos--;
196  }
197  v *= (s[pos] == '-'? -1: 1);
198  }
199  return v;
200 }
201 
202 double pyne::endftod_f(char * s) {
203 #ifdef PYNE_IS_AMALGAMATED
204  return endftod_cpp(s);
205 #else
206  return endftod_(s, 12);
207 #endif
208 }
209 
210 double (*pyne::endftod)(char * s) = &pyne::endftod_f;
211 
214 }
215 
216 std::string pyne::to_upper(std::string s) {
217  // change each element of the string to upper case.
218  for(unsigned int i = 0; i < s.length(); i++)
219  s[i] = toupper(s[i]);
220  return s;
221 }
222 
223 std::string pyne::to_lower(std::string s) {
224  // change each element of the string to lower case
225  for(unsigned int i = 0; i < s.length(); i++)
226  s[i] = tolower(s[i]);
227  return s;
228 }
229 
230 
231 std::string pyne::capitalize(std::string s) {
232  unsigned int slen = s.length();
233  if (slen == 0)
234  return s;
235  // uppercase the first character
236  s[0] = toupper(s[0]);
237  // change each subsequent element of the string to lower case
238  for(unsigned int i = 1; i < slen; i++)
239  s[i] = tolower(s[i]);
240  return s;
241 }
242 
243 
244 std::string pyne::get_flag(char line[], int max_l) {
245  char tempflag [10];
246  for (int i = 0; i < max_l; i++)
247  {
248  if (line[i] == '\t' || line[i] == '\n' || line[i] == ' ' || line[i] == '\0')
249  {
250  tempflag[i] = '\0';
251  break;
252  }
253  else
254  tempflag[i] = line[i];
255  }
256  return std::string (tempflag);
257 }
258 
259 
260 
261 std::string pyne::remove_substring(std::string s, std::string substr) {
262  // Removes a substring from the string s
263  int n_found = s.find(substr);
264  while ( 0 <= n_found ) {
265  s.erase( n_found , substr.length() );
266  n_found = s.find(substr);
267  }
268  return s;
269 }
270 
271 
272 std::string pyne::remove_characters(std::string s, std::string chars) {
273  // Removes all characters in the string chars from the string s
274  for (int i = 0; i < chars.length(); i++ ) {
275  s = remove_substring(s, chars.substr(i, 1) );
276  }
277  return s;
278 }
279 
280 
281 std::string pyne::replace_all_substrings(std::string s, std::string substr, std::string repstr) {
282  // Replaces all instance of substr in s with the string repstr
283  int n_found = s.find(substr);
284  while ( 0 <= n_found ) {
285  s.replace( n_found , substr.length(), repstr );
286  n_found = s.find(substr);
287  }
288  return s;
289 }
290 
291 
292 
293 std::string pyne::last_char(std::string s) {
294  // Returns the last character in a string.
295  return s.substr(s.length()-1, 1);
296 }
297 
298 
299 std::string pyne::slice_from_end(std::string s, int n, int l) {
300  // Returns the slice of a string using negative indices.
301  return s.substr(s.length()+n, l);
302 }
303 
304 
305 bool pyne::ternary_ge(int a, int b, int c) {
306  // Returns true id a <= b <= c and flase otherwise.
307  return (a <= b && b <= c);
308 }
309 
310 
311 bool pyne::contains_substring(std::string s, std::string substr) {
312  // Returns a boolean based on if the sub is in s.
313  int n = s.find(substr);
314  return ( 0 <= n && n < s.length() );
315 }
316 
317 
318 std::string pyne::natural_naming(std::string name) {
319  // Calculates a version on the string name that is a valid
320  // variable name, ie it uses only word characters.
321  std::string nat_name (name);
322 
323  // Replace Whitespace characters with underscores
324  nat_name = pyne::replace_all_substrings(nat_name, " ", "_");
325  nat_name = pyne::replace_all_substrings(nat_name, "\t", "_");
326  nat_name = pyne::replace_all_substrings(nat_name, "\n", "_");
327 
328  // Remove non-word characters
329  int n = 0;
330  while ( n < nat_name.length() ) {
331  if ( pyne::words.find(nat_name[n]) == std::string::npos )
332  nat_name.erase(n, 1);
333  else
334  n++;
335  }
336 
337  // Make sure that the name in non-empty before continuing
338  if (nat_name.length() == 0)
339  return nat_name;
340 
341  // Make sure that the name doesn't begin with a number.
342  if ( pyne::digits.find(nat_name[0]) != std::string::npos)
343  nat_name.insert(0, "_");
344 
345  return nat_name;
346 }
347 
348 
349 //
350 // Math Helpers
351 //
352 
353 double pyne::slope(double x2, double y2, double x1, double y1) {
354  // Finds the slope of a line.
355  return (y2 - y1) / (x2 - x1);
356 }
357 
358 
359 double pyne::solve_line(double x, double x2, double y2, double x1, double y1) {
360  return (slope(x2,y2,x1,y1) * (x - x2)) + y2;
361 }
362 
363 
364 double pyne::tanh(double x) {
365  return std::tanh(x);
366 }
367 
368 double pyne::coth(double x) {
369  return 1.0 / std::tanh(x);
370 }
371 
372 
373 
374 // File Helpers
375 
376 bool pyne::file_exists(std::string strfilename) {
377  // Thank you intarwebz for this function!
378  // Sepcifically: http://www.techbytes.ca/techbyte103.html
379  struct stat stFileInfo;
380  bool blnReturn;
381  int intStat;
382 
383  // Attempt to get the file attributes
384  intStat = stat(strfilename.c_str(), &stFileInfo);
385 
386  if(intStat == 0) {
387  // We were able to get the file attributes
388  // so the file obviously exists.
389  blnReturn = true;
390  }
391  else {
392  // We were not able to get the file attributes.
393  // This may mean that we don't have permission to
394  // access the folder which contains this file. If you
395  // need to do that level of checking, lookup the
396  // return values of stat which will give you
397  // more details on why stat failed.
398  blnReturn = false;
399  }
400 
401  return(blnReturn);
402 }
403 
404 // Message Helpers
405 
406 bool pyne::USE_WARNINGS = true;
407 
410  return USE_WARNINGS;
411 }
412 
413 void pyne::warning(std::string s){
414  // Prints a warning message
415  if (USE_WARNINGS){
416  std::cout << "\033[1;33m WARNING: \033[0m" << s << "\n";
417  }
418 }
419 
420 
421 
422 
423 //
424 // end of src/utils.cpp
425 //
426 
427 
428 //
429 // start of src/state_map.cpp
430 //
431 //Mapping file for state ids to nuc ids
432 //This File was autogenerated!!
433 #ifndef PYNE_4HFU6PUEQJB3ZJ4UIFLVU4SPCM
434 #define PYNE_4HFU6PUEQJB3ZJ4UIFLVU4SPCM
435 namespace pyne {
436 namespace nucname {
437 #define TOTAL_STATE_MAPS 922
438 std::map<int, int> state_id_map;
439 int map_nuc_ids [TOTAL_STATE_MAPS] = {110240001,
440 130240001,
441 130260001,
442 130320002,
443 170340001,
444 170380001,
445 190380001,
446 190380015,
447 210420002,
448 210430001,
449 210440004,
450 230440001,
451 210450001,
452 210460002,
453 230460001,
454 210500001,
455 250500001,
456 250520001,
457 260520041,
458 260530022,
459 270540001,
460 210560001,
461 210560004,
462 250580001,
463 270580001,
464 270580002,
465 230600000,
466 230600001,
467 250600001,
468 270600001,
469 250620001,
470 270620001,
471 230640001,
472 250640002,
473 260650003,
474 260670002,
475 290670023,
476 280690001,
477 280690008,
478 300690001,
479 340690004,
480 290700001,
481 290700003,
482 350700006,
483 280710002,
484 300710001,
485 320710002,
486 300730001,
487 300730002,
488 320730002,
489 340730001,
490 360730004,
491 310740002,
492 350740002,
493 290750001,
494 290750002,
495 300750001,
496 320750002,
497 330750004,
498 280760004,
499 290760001,
500 350760002,
501 300770002,
502 320770001,
503 330770004,
504 340770001,
505 350770001,
506 300780004,
507 310780004,
508 350780004,
509 370780003,
510 390780001,
511 320790001,
512 330790007,
513 340790001,
514 350790001,
515 360790001,
516 310800001,
517 350800002,
518 390800001,
519 390800003,
520 320810001,
521 340810001,
522 360810002,
523 370810001,
524 330820001,
525 340820015,
526 350820001,
527 370820001,
528 410820003,
529 340830001,
530 360830002,
531 380830002,
532 390830001,
533 310840001,
534 350840001,
535 360840019,
536 360840061,
537 370840002,
538 390840002,
539 410840007,
540 360850001,
541 370850003,
542 380850002,
543 390850001,
544 400850002,
545 410850003,
546 410850005,
547 370860002,
548 390860002,
549 410860001,
550 410860002,
551 380870001,
552 390870001,
553 400870002,
554 350880003,
555 410880001,
556 430880000,
557 430880001,
558 390890001,
559 400890001,
560 410890001,
561 420890002,
562 430890001,
563 370900001,
564 390900002,
565 400900003,
566 410900002,
567 410900007,
568 430900001,
569 430900006,
570 390910001,
571 400910040,
572 410910001,
573 420910001,
574 430910001,
575 440910001,
576 450910001,
577 410920001,
578 450920001,
579 390930002,
580 410930001,
581 420930016,
582 430930001,
583 440930001,
584 470940001,
585 470940002,
586 390970001,
587 390970029,
588 410970001,
589 430970001,
590 450970001,
591 370980001,
592 390980005,
593 410980001,
594 450980001,
595 410990001,
596 430990002,
597 450990001,
598 470990002,
599 371000001,
600 391000004,
601 411000001,
602 411000009,
603 411000012,
604 431000002,
605 431000004,
606 451000004,
607 471000001,
608 471010002,
609 411020001,
610 431020001,
611 451020005,
612 471020001,
613 441030005,
614 451030001,
615 471030002,
616 491030001,
617 411040004,
618 451040003,
619 471040001,
620 491040003,
621 451050001,
622 471050001,
623 491050001,
624 451060001,
625 471060001,
626 491060001,
627 431070000,
628 461070002,
629 471070001,
630 491070001,
631 401080003,
632 461090002,
633 471090001,
634 491090001,
635 491090021,
636 451100000,
637 451100001,
638 471100002,
639 491100001,
640 461110002,
641 471110001,
642 491110001,
643 451120000,
644 451120001,
645 491120001,
646 491120004,
647 491120010,
648 471130001,
649 481130001,
650 491130001,
651 501130001,
652 451140005,
653 491140001,
654 491140005,
655 531140005,
656 461150001,
657 471150001,
658 481150001,
659 491150001,
660 521150001,
661 451160001,
662 471160001,
663 471160004,
664 511160003,
665 551160001,
666 471180004,
667 491180001,
668 491180003,
669 511180007,
670 531180002,
671 551180001,
672 471190000,
673 471190001,
674 481190002,
675 491190001,
676 501190002,
677 511190072,
678 521190002,
679 551190001,
680 451200002,
681 471200002,
682 491200001,
683 491200002,
684 511200001,
685 531200013,
686 551200001,
687 571200000,
688 461210001,
689 481210002,
690 491210001,
691 501210001,
692 521210002,
693 551210001,
694 451220002,
695 471220001,
696 471220002,
697 491220001,
698 491220005,
699 511220005,
700 511220006,
701 551220007,
702 551220008,
703 481230003,
704 491230001,
705 501230001,
706 521230002,
707 551230005,
708 461240004,
709 491240002,
710 501240016,
711 511240001,
712 511240002,
713 551240025,
714 481250001,
715 491250001,
716 501250001,
717 521250002,
718 541250002,
719 571250005,
720 461260003,
721 461260004,
722 491260001,
723 511260001,
724 511260002,
725 481270006,
726 491270001,
727 491270009,
728 501270001,
729 521270002,
730 541270002,
731 561270002,
732 571270001,
733 581270001,
734 461280004,
735 491280003,
736 501280003,
737 511280001,
738 571280001,
739 471290001,
740 481290001,
741 491290001,
742 491290010,
743 491290012,
744 491290013,
745 501290001,
746 501290017,
747 501290018,
748 501290025,
749 511290011,
750 511290012,
751 511290023,
752 521290001,
753 541290002,
754 551290010,
755 561290001,
756 571290002,
757 601290001,
758 601290003,
759 491300001,
760 491300002,
761 491300003,
762 501300002,
763 511300001,
764 531300001,
765 551300004,
766 561300030,
767 591300002,
768 491310001,
769 491310004,
770 501310001,
771 521310001,
772 521310033,
773 541310002,
774 561310002,
775 571310006,
776 581310001,
777 591310002,
778 501320006,
779 511320001,
780 521320006,
781 521320022,
782 531320003,
783 541320030,
784 571320004,
785 581320030,
786 491330001,
787 521330002,
788 531330016,
789 531330059,
790 531330065,
791 541330001,
792 561330002,
793 581330001,
794 591330003,
795 601330001,
796 611330005,
797 621330000,
798 511340002,
799 521340003,
800 531340005,
801 541340007,
802 601340017,
803 611340000,
804 611340001,
805 521350010,
806 541350002,
807 551350010,
808 561350002,
809 581350004,
810 591350004,
811 601350001,
812 611350000,
813 611350003,
814 501360003,
815 531360006,
816 551360001,
817 561360005,
818 611360000,
819 611360001,
820 631360001,
821 561370002,
822 581370002,
823 601370004,
824 501380003,
825 551380003,
826 581380005,
827 591380005,
828 581390002,
829 601390002,
830 611390001,
831 621390004,
832 641390001,
833 591400003,
834 591400015,
835 601400009,
836 611400008,
837 631400004,
838 601410002,
839 621410002,
840 631410001,
841 641410004,
842 651410001,
843 591420001,
844 591420024,
845 601420004,
846 611420012,
847 631420031,
848 641420019,
849 641420020,
850 651420003,
851 621430002,
852 621430043,
853 641430002,
854 651430001,
855 661430003,
856 551440004,
857 591440001,
858 651440004,
859 651440006,
860 651440007,
861 671440003,
862 641450002,
863 651450004,
864 661450002,
865 681450002,
866 571460001,
867 631460013,
868 651460022,
869 651460026,
870 661460008,
871 651470001,
872 661470002,
873 681470002,
874 691470001,
875 591480000,
876 591480001,
877 611480003,
878 651480001,
879 671480001,
880 671480012,
881 681480008,
882 651490001,
883 661490027,
884 671490001,
885 681490002,
886 631500001,
887 651500002,
888 671500001,
889 691500005,
890 581510001,
891 621510012,
892 631510002,
893 651510003,
894 671510001,
895 681510021,
896 691510001,
897 691510012,
898 701510001,
899 701510005,
900 701510010,
901 611520004,
902 611520014,
903 631520001,
904 631520016,
905 651520006,
906 671520001,
907 691520006,
908 691520018,
909 691520019,
910 701520006,
911 621530006,
912 641530003,
913 641530008,
914 651530003,
915 671530001,
916 691530001,
917 601540003,
918 611540000,
919 611540001,
920 631540013,
921 651540001,
922 651540002,
923 711540015,
924 721540006,
925 641550006,
926 661550009,
927 671550002,
928 691550001,
929 711550001,
930 711550004,
931 611560002,
932 651560002,
933 651560004,
934 671560001,
935 671560012,
936 711560001,
937 721560004,
938 641570012,
939 661570005,
940 651580003,
941 651580019,
942 671580001,
943 671580007,
944 711580000,
945 621590006,
946 641590002,
947 661590009,
948 671590003,
949 671600001,
950 671600006,
951 691600002,
952 711600001,
953 671610002,
954 681610014,
955 691610001,
956 711610004,
957 671620003,
958 691620020,
959 711620008,
960 711620009,
961 751620001,
962 671630003,
963 751630001,
964 671640003,
965 691640001,
966 771640001,
967 661650002,
968 751650001,
969 771650001,
970 671660001,
971 691660006,
972 711660001,
973 711660002,
974 681670003,
975 711670001,
976 751670001,
977 671680001,
978 711680013,
979 771680001,
980 701690001,
981 711690001,
982 751690001,
983 771690001,
984 671700001,
985 711700008,
986 771700001,
987 711710001,
988 721710001,
989 771710001,
990 781710002,
991 711720001,
992 711720005,
993 751720001,
994 771720002,
995 791720001,
996 771730000,
997 771730029,
998 791730001,
999 711740003,
1000 771740001,
1001 701750007,
1002 711750053,
1003 791750001,
1004 701760005,
1005 711760001,
1006 731760012,
1007 731760090,
1008 791760001,
1009 791760002,
1010 691770000,
1011 701770006,
1012 711770029,
1013 711770203,
1014 721770048,
1015 721770107,
1016 791770002,
1017 711780003,
1018 721780005,
1019 721780109,
1020 731780000,
1021 731780059,
1022 731780094,
1023 731780139,
1024 711790006,
1025 721790005,
1026 721790046,
1027 731790117,
1028 741790002,
1029 751790137,
1030 791790007,
1031 811790001,
1032 711800010,
1033 721800007,
1034 731800002,
1035 721810025,
1036 721810078,
1037 761810001,
1038 811810002,
1039 721820009,
1040 721820026,
1041 731820001,
1042 731820029,
1043 751820001,
1044 761820029,
1045 741830007,
1046 751830058,
1047 761830002,
1048 781830001,
1049 811830002,
1050 721840005,
1051 751840005,
1052 771840007,
1053 781840034,
1054 791840003,
1055 741850006,
1056 781850002,
1057 791850001,
1058 801850004,
1059 811850003,
1060 751860004,
1061 771860001,
1062 811860000,
1063 811860005,
1064 831860001,
1065 791870002,
1066 801870001,
1067 811870002,
1068 821870001,
1069 831870002,
1070 751880007,
1071 811880001,
1072 761890001,
1073 771890006,
1074 771890084,
1075 791890003,
1076 801890002,
1077 811890001,
1078 821890001,
1079 831890002,
1080 831890003,
1081 731900002,
1082 741900006,
1083 751900003,
1084 761900032,
1085 771900002,
1086 771900037,
1087 791900014,
1088 811900000,
1089 811900001,
1090 811900006,
1091 831900000,
1092 831900001,
1093 761910001,
1094 771910003,
1095 771910071,
1096 791910004,
1097 801910035,
1098 811910002,
1099 821910002,
1100 831910002,
1101 751920002,
1102 751920003,
1103 761920047,
1104 761920112,
1105 771920003,
1106 771920015,
1107 791920004,
1108 791920015,
1109 811920002,
1110 811920008,
1111 821920011,
1112 821920014,
1113 821920017,
1114 821920020,
1115 821920021,
1116 831920001,
1117 841920006,
1118 851920000,
1119 851920001,
1120 771930002,
1121 781930005,
1122 791930004,
1123 801930003,
1124 811930002,
1125 821930001,
1126 831930001,
1127 851930001,
1128 851930002,
1129 751940001,
1130 751940002,
1131 751940003,
1132 771940007,
1133 771940012,
1134 791940003,
1135 791940008,
1136 811940001,
1137 831940001,
1138 831940002,
1139 851940000,
1140 851940001,
1141 761950002,
1142 761950004,
1143 771950002,
1144 781950007,
1145 791950004,
1146 791950055,
1147 801950003,
1148 811950002,
1149 821950002,
1150 831950001,
1151 841950002,
1152 851950001,
1153 861950001,
1154 751960001,
1155 771960004,
1156 791960003,
1157 791960054,
1158 811960006,
1159 831960002,
1160 831960003,
1161 841960015,
1162 761970001,
1163 771970002,
1164 781970009,
1165 791970004,
1166 801970004,
1167 811970002,
1168 821970002,
1169 831970001,
1170 841970002,
1171 851970001,
1172 861970001,
1173 761980006,
1174 761980010,
1175 771980001,
1176 791980050,
1177 811980007,
1178 811980012,
1179 831980001,
1180 831980003,
1181 851980001,
1182 871980001,
1183 781990008,
1184 791990006,
1185 801990007,
1186 811990003,
1187 821990003,
1188 831990001,
1189 841990002,
1190 861990001,
1191 812000010,
1192 832000001,
1193 832000003,
1194 852000001,
1195 852000003,
1196 802010013,
1197 812010003,
1198 822010004,
1199 832010001,
1200 842010003,
1201 862010001,
1202 872010001,
1203 882010000,
1204 782020003,
1205 822020014,
1206 852020001,
1207 852020002,
1208 872020001,
1209 822030006,
1210 822030053,
1211 832030006,
1212 842030005,
1213 862030001,
1214 882030001,
1215 812040029,
1216 822040021,
1217 832040008,
1218 832040038,
1219 852040001,
1220 872040001,
1221 872040002,
1222 802050008,
1223 822050009,
1224 842050010,
1225 842050017,
1226 882050001,
1227 812060045,
1228 832060016,
1229 872060001,
1230 872060002,
1231 892060001,
1232 812070002,
1233 822070003,
1234 832070036,
1235 842070014,
1236 862070007,
1237 882070001,
1238 802080004,
1239 832080018,
1240 802100002,
1241 802100005,
1242 832100002,
1243 822110014,
1244 832110021,
1245 842110015,
1246 852110076,
1247 872110013,
1248 872110019,
1249 832120005,
1250 832120012,
1251 842120030,
1252 852120004,
1253 882130005,
1254 852140006,
1255 862140004,
1256 862140005,
1257 872140001,
1258 902140004,
1259 832150009,
1260 862150013,
1261 902150003,
1262 872160001,
1263 832170005,
1264 892170010,
1265 902170001,
1266 912170001,
1267 872180002,
1268 922180001,
1269 892220001,
1270 912340002,
1271 922350001,
1272 932360001,
1273 952360001,
1274 942370003,
1275 922380101,
1276 932380128,
1277 942380041,
1278 942380044,
1279 952380001,
1280 942390090,
1281 942390094,
1282 952390011,
1283 932400001,
1284 942400102,
1285 952400057,
1286 962400002,
1287 962400003,
1288 942410106,
1289 942410107,
1290 952410075,
1291 962410007,
1292 932420007,
1293 942420044,
1294 942420045,
1295 952420002,
1296 952420141,
1297 962420004,
1298 962420005,
1299 972420002,
1300 972420003,
1301 942440032,
1302 952440001,
1303 952440112,
1304 952440113,
1305 962440009,
1306 962440013,
1307 962440014,
1308 972440004,
1309 982440002,
1310 942450024,
1311 952450021,
1312 962450061,
1313 972450003,
1314 1012450001,
1315 952460001,
1316 952460008,
1317 972460000,
1318 982460002,
1319 992460000,
1320 1012460000,
1321 1012460001,
1322 1002470001,
1323 1002470002,
1324 972480001,
1325 992500001,
1326 1002500001,
1327 1002500002,
1328 1022500001,
1329 1022510002,
1330 1002530008,
1331 1022530003,
1332 1022530030,
1333 1022530031,
1334 1022530032,
1335 1032530000,
1336 1032530001,
1337 992540002,
1338 1012540000,
1339 1012540001,
1340 1022540011,
1341 1032550001,
1342 1032550027,
1343 992560001,
1344 1002560022,
1345 1042560007,
1346 1042560009,
1347 1042560012,
1348 1042570002,
1349 1052570002,
1350 1012580001,
1351 1052580001,
1352 1042610001,
1353 1072620001,
1354 1062630003,
1355 1062650001,
1356 1082650001,
1357 1082670002,
1358 1102700001,
1359 1102710001,
1360 1082770001,
1362 1,
1363 1,
1364 1,
1365 1,
1366 1,
1367 1,
1368 2,
1369 1,
1370 1,
1371 1,
1372 1,
1373 1,
1374 1,
1375 1,
1376 1,
1377 1,
1378 1,
1379 1,
1380 1,
1381 1,
1382 1,
1383 2,
1384 1,
1385 1,
1386 2,
1387 1,
1388 2,
1389 1,
1390 1,
1391 1,
1392 1,
1393 1,
1394 1,
1395 1,
1396 1,
1397 1,
1398 1,
1399 2,
1400 1,
1401 1,
1402 1,
1403 2,
1404 1,
1405 1,
1406 1,
1407 1,
1408 1,
1409 2,
1410 1,
1411 1,
1412 1,
1413 1,
1414 1,
1415 1,
1416 2,
1417 1,
1418 1,
1419 1,
1420 1,
1421 1,
1422 1,
1423 1,
1424 1,
1425 1,
1426 1,
1427 1,
1428 1,
1429 1,
1430 1,
1431 1,
1432 1,
1433 1,
1434 1,
1435 1,
1436 1,
1437 1,
1438 1,
1439 1,
1440 1,
1441 2,
1442 1,
1443 1,
1444 1,
1445 1,
1446 1,
1447 1,
1448 1,
1449 1,
1450 1,
1451 1,
1452 1,
1453 1,
1454 1,
1455 1,
1456 1,
1457 1,
1458 2,
1459 1,
1460 1,
1461 1,
1462 1,
1463 1,
1464 1,
1465 1,
1466 1,
1467 1,
1468 2,
1469 1,
1470 1,
1471 1,
1472 1,
1473 1,
1474 1,
1475 1,
1476 1,
1477 1,
1478 1,
1479 2,
1480 1,
1481 1,
1482 1,
1483 1,
1484 1,
1485 1,
1486 1,
1487 1,
1488 2,
1489 3,
1490 1,
1491 2,
1492 1,
1493 1,
1494 1,
1495 1,
1496 1,
1497 1,
1498 1,
1499 1,
1500 1,
1501 1,
1502 1,
1503 1,
1504 1,
1505 1,
1506 1,
1507 2,
1508 1,
1509 2,
1510 1,
1511 1,
1512 1,
1513 1,
1514 1,
1515 1,
1516 1,
1517 1,
1518 1,
1519 1,
1520 1,
1521 1,
1522 1,
1523 1,
1524 2,
1525 3,
1526 1,
1527 2,
1528 1,
1529 1,
1530 1,
1531 1,
1532 1,
1533 1,
1534 1,
1535 1,
1536 1,
1537 1,
1538 1,
1539 1,
1540 1,
1541 1,
1542 1,
1543 1,
1544 1,
1545 1,
1546 1,
1547 1,
1548 1,
1549 1,
1550 1,
1551 1,
1552 1,
1553 1,
1554 1,
1555 1,
1556 1,
1557 2,
1558 1,
1559 2,
1560 1,
1561 1,
1562 1,
1563 1,
1564 1,
1565 1,
1566 2,
1567 1,
1568 2,
1569 3,
1570 1,
1571 1,
1572 1,
1573 1,
1574 1,
1575 1,
1576 2,
1577 1,
1578 1,
1579 1,
1580 1,
1581 1,
1582 1,
1583 1,
1584 1,
1585 2,
1586 1,
1587 1,
1588 1,
1589 1,
1590 2,
1591 1,
1592 1,
1593 1,
1594 1,
1595 2,
1596 1,
1597 1,
1598 1,
1599 1,
1600 1,
1601 1,
1602 1,
1603 1,
1604 1,
1605 2,
1606 1,
1607 1,
1608 1,
1609 1,
1610 1,
1611 1,
1612 1,
1613 1,
1614 1,
1615 1,
1616 1,
1617 1,
1618 2,
1619 1,
1620 2,
1621 1,
1622 2,
1623 1,
1624 2,
1625 1,
1626 1,
1627 1,
1628 1,
1629 1,
1630 1,
1631 1,
1632 1,
1633 1,
1634 2,
1635 1,
1636 1,
1637 1,
1638 1,
1639 1,
1640 1,
1641 1,
1642 1,
1643 2,
1644 1,
1645 1,
1646 2,
1647 1,
1648 1,
1649 1,
1650 1,
1651 1,
1652 1,
1653 1,
1654 1,
1655 1,
1656 1,
1657 1,
1658 1,
1659 1,
1660 1,
1661 1,
1662 1,
1663 1,
1664 2,
1665 3,
1666 4,
1667 1,
1668 2,
1669 3,
1670 4,
1671 1,
1672 2,
1673 3,
1674 1,
1675 1,
1676 1,
1677 1,
1678 1,
1679 1,
1680 2,
1681 1,
1682 2,
1683 3,
1684 1,
1685 1,
1686 1,
1687 1,
1688 1,
1689 1,
1690 1,
1691 2,
1692 1,
1693 1,
1694 2,
1695 1,
1696 1,
1697 1,
1698 1,
1699 1,
1700 1,
1701 1,
1702 1,
1703 2,
1704 1,
1705 1,
1706 1,
1707 1,
1708 1,
1709 1,
1710 1,
1711 2,
1712 3,
1713 1,
1714 1,
1715 1,
1716 1,
1717 1,
1718 1,
1719 1,
1720 1,
1721 1,
1722 1,
1723 1,
1724 1,
1725 2,
1726 1,
1727 1,
1728 1,
1729 1,
1730 1,
1731 1,
1732 1,
1733 1,
1734 1,
1735 2,
1736 1,
1737 1,
1738 1,
1739 1,
1740 1,
1741 2,
1742 1,
1743 1,
1744 1,
1745 1,
1746 1,
1747 1,
1748 1,
1749 1,
1750 1,
1751 1,
1752 1,
1753 1,
1754 1,
1755 1,
1756 2,
1757 1,
1758 1,
1759 1,
1760 1,
1761 1,
1762 1,
1763 1,
1764 1,
1765 1,
1766 2,
1767 1,
1768 1,
1769 1,
1770 1,
1771 2,
1772 1,
1773 1,
1774 2,
1775 1,
1776 1,
1777 1,
1778 1,
1779 1,
1780 1,
1781 1,
1782 1,
1783 1,
1784 1,
1785 1,
1786 1,
1787 1,
1788 1,
1789 1,
1790 1,
1791 1,
1792 1,
1793 1,
1794 1,
1795 1,
1796 1,
1797 1,
1798 2,
1799 2,
1800 1,
1801 1,
1802 2,
1803 1,
1804 1,
1805 1,
1806 1,
1807 1,
1808 1,
1809 1,
1810 1,
1811 1,
1812 1,
1813 1,
1814 1,
1815 1,
1816 1,
1817 1,
1818 1,
1819 2,
1820 1,
1821 2,
1822 3,
1823 1,
1824 2,
1825 1,
1826 2,
1827 1,
1828 1,
1829 1,
1830 2,
1831 3,
1832 1,
1833 1,
1834 1,
1835 2,
1836 1,
1837 1,
1838 1,
1839 1,
1840 1,
1841 1,
1842 1,
1843 1,
1844 2,
1845 1,
1846 1,
1847 1,
1848 1,
1849 1,
1850 1,
1851 1,
1852 2,
1853 1,
1854 1,
1855 2,
1856 1,
1857 2,
1858 1,
1859 1,
1860 2,
1861 1,
1862 1,
1863 2,
1864 1,
1865 2,
1866 1,
1867 1,
1868 1,
1869 1,
1870 1,
1871 1,
1872 2,
1873 1,
1874 1,
1875 1,
1876 1,
1877 1,
1878 1,
1879 1,
1880 1,
1881 1,
1882 1,
1883 1,
1884 1,
1885 1,
1886 1,
1887 1,
1888 1,
1889 1,
1890 1,
1891 1,
1892 1,
1893 1,
1894 1,
1895 2,
1896 1,
1897 1,
1898 1,
1899 1,
1900 1,
1901 1,
1902 1,
1903 1,
1904 1,
1905 1,
1906 1,
1907 1,
1908 1,
1909 1,
1910 1,
1911 1,
1912 1,
1913 1,
1914 2,
1915 1,
1916 1,
1917 1,
1918 1,
1919 2,
1920 1,
1921 1,
1922 1,
1923 1,
1924 1,
1925 1,
1926 1,
1927 1,
1928 1,
1929 1,
1930 1,
1931 2,
1932 1,
1933 1,
1934 1,
1935 1,
1936 1,
1937 2,
1938 1,
1939 1,
1940 1,
1941 2,
1942 1,
1943 2,
1944 3,
1945 4,
1946 1,
1947 1,
1948 2,
1949 1,
1950 1,
1951 1,
1952 1,
1953 1,
1954 1,
1955 1,
1956 1,
1957 2,
1958 3,
1959 1,
1960 1,
1961 1,
1962 2,
1963 1,
1964 2,
1965 1,
1966 1,
1967 1,
1968 1,
1969 1,
1970 1,
1971 1,
1972 1,
1973 1,
1974 1,
1975 1,
1976 1,
1977 1,
1978 1,
1979 1,
1980 1,
1981 1,
1982 1,
1983 1,
1984 1,
1985 2,
1986 1,
1987 1,
1988 1,
1989 1,
1990 1,
1991 1,
1992 1,
1993 1,
1994 1,
1995 1,
1996 2,
1997 1,
1998 1,
1999 1,
2000 1,
2001 1,
2002 2,
2003 1,
2004 1,
2005 1,
2006 1,
2007 1,
2008 2,
2009 1,
2010 1,
2011 2,
2012 3,
2013 1,
2014 2,
2015 1,
2016 1,
2017 2,
2018 1,
2019 1,
2020 1,
2021 1,
2022 1,
2023 1,
2024 2,
2025 1,
2026 2,
2027 1,
2028 2,
2029 1,
2030 2,
2031 1,
2032 2,
2033 1,
2034 2,
2035 3,
2036 4,
2037 5,
2038 1,
2039 1,
2040 1,
2041 2,
2042 1,
2043 1,
2044 1,
2045 1,
2046 1,
2047 1,
2048 1,
2049 1,
2050 2,
2051 1,
2052 2,
2053 3,
2054 1,
2055 2,
2056 1,
2057 2,
2058 1,
2059 1,
2060 2,
2061 1,
2062 2,
2063 1,
2064 2,
2065 1,
2066 1,
2067 1,
2068 2,
2069 1,
2070 1,
2071 1,
2072 1,
2073 1,
2074 1,
2075 1,
2076 1,
2077 1,
2078 1,
2079 2,
2080 1,
2081 1,
2082 2,
2083 1,
2084 1,
2085 1,
2086 1,
2087 1,
2088 1,
2089 1,
2090 1,
2091 1,
2092 1,
2093 1,
2094 1,
2095 1,
2096 2,
2097 1,
2098 1,
2099 1,
2100 2,
2101 1,
2102 2,
2103 1,
2104 1,
2105 1,
2106 1,
2107 1,
2108 1,
2109 1,
2110 1,
2111 1,
2112 1,
2113 1,
2114 1,
2115 2,
2116 1,
2117 2,
2118 1,
2119 1,
2120 1,
2121 1,
2122 1,
2123 1,
2124 1,
2125 1,
2126 1,
2127 1,
2128 1,
2129 2,
2130 1,
2131 1,
2132 2,
2133 1,
2134 1,
2135 1,
2136 1,
2137 1,
2138 1,
2139 1,
2140 2,
2141 1,
2142 1,
2143 2,
2144 1,
2145 1,
2146 1,
2147 2,
2148 1,
2149 1,
2150 1,
2151 1,
2152 2,
2153 1,
2154 1,
2155 1,
2156 1,
2157 1,
2158 1,
2159 1,
2160 1,
2161 1,
2162 1,
2163 2,
2164 1,
2165 1,
2166 1,
2167 1,
2168 1,
2169 1,
2170 2,
2171 1,
2172 2,
2173 2,
2174 1,
2175 1,
2176 1,
2177 1,
2178 2,
2179 1,
2180 1,
2181 1,
2182 1,
2183 1,
2184 1,
2185 1,
2186 1,
2187 1,
2188 1,
2189 1,
2190 1,
2191 1,
2192 1,
2193 1,
2194 1,
2195 1,
2196 1,
2197 1,
2198 1,
2199 1,
2200 2,
2201 1,
2202 1,
2203 1,
2204 1,
2205 1,
2206 1,
2207 1,
2208 1,
2209 2,
2210 1,
2211 2,
2212 1,
2213 1,
2214 2,
2215 1,
2216 2,
2217 1,
2218 2,
2219 1,
2220 2,
2221 1,
2222 2,
2223 1,
2224 1,
2225 2,
2226 3,
2227 1,
2228 2,
2229 3,
2230 1,
2231 1,
2232 1,
2233 1,
2234 1,
2235 1,
2236 1,
2237 1,
2238 2,
2239 1,
2240 1,
2241 1,
2242 1,
2243 2,
2244 2,
2245 1,
2246 1,
2247 1,
2248 1,
2249 2,
2250 1,
2251 1,
2252 1,
2253 1,
2254 2,
2255 3,
2256 4,
2257 1,
2258 1,
2259 1,
2260 1,
2261 2,
2262 1,
2263 1,
2264 2,
2265 1,
2266 1,
2267 1,
2268 2,
2269 3,
2270 1,
2271 1,
2272 1,
2273 1,
2274 1,
2275 1,
2276 1,
2277 1,
2278 1,
2279 1,
2280 1,
2281 1,
2282 1,
2283 };
2284 }
2285 }
2286 #endif//
2287 // end of src/state_map.cpp
2288 //
2289 
2290 
2291 //
2292 // start of src/nucname.cpp
2293 //
2294 // Converts between naming conventions for nuclides.
2295 // zzaaam is for numerals only (923350).
2296 // name is for letters as well (U-235).
2297 // MCNP is for numerals without the meta-stable flag (92235), as used in MCNP.
2298 
2299 #ifndef PYNE_IS_AMALGAMATED
2300 #include "nucname.h"
2301 #include "state_map.cpp"
2302 #endif
2303 
2304 
2305 /*** Constructs the LL to zz Dictionary ***/
2308 
2309  lzd["Be"] = 04;
2310  lzd["Ba"] = 56;
2311  lzd["Bh"] = 107;
2312  lzd["Bi"] = 83;
2313  lzd["Bk"] = 97;
2314  lzd["Br"] = 35;
2315  lzd["Ru"] = 44;
2316  lzd["Re"] = 75;
2317  lzd["Rf"] = 104;
2318  lzd["Rg"] = 111;
2319  lzd["Ra"] = 88;
2320  lzd["Rb"] = 37;
2321  lzd["Rn"] = 86;
2322  lzd["Rh"] = 45;
2323  lzd["Tm"] = 69;
2324  lzd["H"] = 01;
2325  lzd["P"] = 15;
2326  lzd["Ge"] = 32;
2327  lzd["Gd"] = 64;
2328  lzd["Ga"] = 31;
2329  lzd["Os"] = 76;
2330  lzd["Hs"] = 108;
2331  lzd["Zn"] = 30;
2332  lzd["Ho"] = 67;
2333  lzd["Hf"] = 72;
2334  lzd["Hg"] = 80;
2335  lzd["He"] = 02;
2336  lzd["Pr"] = 59;
2337  lzd["Pt"] = 78;
2338  lzd["Pu"] = 94;
2339  lzd["Pb"] = 82;
2340  lzd["Pa"] = 91;
2341  lzd["Pd"] = 46;
2342  lzd["Po"] = 84;
2343  lzd["Pm"] = 61;
2344  lzd["C"] = 6;
2345  lzd["K"] = 19;
2346  lzd["O"] = 8;
2347  lzd["S"] = 16;
2348  lzd["W"] = 74;
2349  lzd["Eu"] = 63;
2350  lzd["Es"] = 99;
2351  lzd["Er"] = 68;
2352  lzd["Md"] = 101;
2353  lzd["Mg"] = 12;
2354  lzd["Mo"] = 42;
2355  lzd["Mn"] = 25;
2356  lzd["Mt"] = 109;
2357  lzd["U"] = 92;
2358  lzd["Fr"] = 87;
2359  lzd["Fe"] = 26;
2360  lzd["Fm"] = 100;
2361  lzd["Ni"] = 28;
2362  lzd["No"] = 102;
2363  lzd["Na"] = 11;
2364  lzd["Nb"] = 41;
2365  lzd["Nd"] = 60;
2366  lzd["Ne"] = 10;
2367  lzd["Zr"] = 40;
2368  lzd["Np"] = 93;
2369  lzd["B"] = 05;
2370  lzd["Co"] = 27;
2371  lzd["Cm"] = 96;
2372  lzd["F"] = 9;
2373  lzd["Ca"] = 20;
2374  lzd["Cf"] = 98;
2375  lzd["Ce"] = 58;
2376  lzd["Cd"] = 48;
2377  lzd["V"] = 23;
2378  lzd["Cs"] = 55;
2379  lzd["Cr"] = 24;
2380  lzd["Cu"] = 29;
2381  lzd["Sr"] = 38;
2382  lzd["Kr"] = 36;
2383  lzd["Si"] = 14;
2384  lzd["Sn"] = 50;
2385  lzd["Sm"] = 62;
2386  lzd["Sc"] = 21;
2387  lzd["Sb"] = 51;
2388  lzd["Sg"] = 106;
2389  lzd["Se"] = 34;
2390  lzd["Yb"] = 70;
2391  lzd["Db"] = 105;
2392  lzd["Dy"] = 66;
2393  lzd["Ds"] = 110;
2394  lzd["La"] = 57;
2395  lzd["Cl"] = 17;
2396  lzd["Li"] = 03;
2397  lzd["Tl"] = 81;
2398  lzd["Lu"] = 71;
2399  lzd["Lr"] = 103;
2400  lzd["Th"] = 90;
2401  lzd["Ti"] = 22;
2402  lzd["Te"] = 52;
2403  lzd["Tb"] = 65;
2404  lzd["Tc"] = 43;
2405  lzd["Ta"] = 73;
2406  lzd["Ac"] = 89;
2407  lzd["Ag"] = 47;
2408  lzd["I"] = 53;
2409  lzd["Ir"] = 77;
2410  lzd["Am"] = 95;
2411  lzd["Al"] = 13;
2412  lzd["As"] = 33;
2413  lzd["Ar"] = 18;
2414  lzd["Au"] = 79;
2415  lzd["At"] = 85;
2416  lzd["In"] = 49;
2417  lzd["Y"] = 39;
2418  lzd["N"] = 07;
2419  lzd["Xe"] = 54;
2420  lzd["Cn"] = 112;
2421  lzd["Fl"] = 114;
2422  lzd["Lv"] = 116;
2423 
2424  return lzd;
2425 }
2427 
2428 
2429 /*** Constructs zz to LL dictionary **/
2431 {
2432  zzname_t zld;
2433  for (name_zz_iter i = name_zz.begin(); i != name_zz.end(); i++)
2434  {
2435  zld[i->second] = i->first;
2436  }
2437  return zld;
2438 }
2440 
2441 
2442 
2443 /*** Constructs the fluka to zz Dictionary ***/
2446 
2447  fzd["BERYLLIU"] = 40000000;
2448  fzd["BARIUM"] = 560000000;
2449  fzd["BOHRIUM"] = 1070000000; // No fluka
2450  fzd["BISMUTH"] = 830000000;
2451  fzd["BERKELIU"] = 970000000; // No fluka
2452  fzd["BROMINE"] = 350000000;
2453  fzd["RUTHENIU"] = 440000000; // No fluka
2454  fzd["RHENIUM"] = 750000000;
2455  fzd["RUTHERFO"] = 1040000000;
2456  fzd["ROENTGEN"] = 1110000000;
2457  fzd["RADIUM"] = 880000000; // No fluka
2458  fzd["RUBIDIUM"] = 370000000; // No fluka
2459  fzd["RADON"] = 860000000; // no fluka
2460  fzd["RHODIUM"] = 450000000; // no fluka
2461  fzd["THULIUM"] = 690000000; // no fluka
2462  fzd["HYDROGEN"] = 10000000;
2463  fzd["PHOSPHO"] = 150000000;
2464  fzd["GERMANIU"] = 320000000;
2465  fzd["GADOLINI"] = 640000000;
2466  fzd["GALLIUM"] = 310000000;
2467  fzd["OSMIUM"] = 760000000; // no fluka
2468  fzd["HASSIUM"] = 1080000000;
2469  fzd["ZINC"] = 300000000;
2470  fzd["HOLMIUM"] = 670000000; // no fluka
2471  fzd["HAFNIUM"] = 720000000;
2472  fzd["MERCURY"] = 800000000;
2473  fzd["HELIUM"] = 20000000;
2474  fzd["PRASEODY"] = 590000000; // no fluka
2475  fzd["PLATINUM"] = 780000000;
2476  fzd["239-PU"] = 940000000; // "239-PU"
2477  fzd["LEAD"] = 820000000;
2478  fzd["PROTACTI"] = 910000000; // no fluka
2479  fzd["PALLADIU"] = 460000000; // no fluka
2480  fzd["POLONIUM"] = 840000000; // no fluka
2481  fzd["PROMETHI"] = 610000000; // no fluka
2482  fzd["CARBON"] = 60000000;
2483  fzd["POTASSIU"] = 190000000;
2484  fzd["OXYGEN"] = 80000000;
2485  fzd["SULFUR"] = 160000000;
2486  fzd["TUNGSTEN"] = 740000000;
2487  fzd["EUROPIUM"] = 630000000;
2488  fzd["EINSTEIN"] = 990000000; // no fluka
2489  fzd["ERBIUM"] = 680000000; // no fluka
2490  fzd["MENDELEV"] = 1010000000; // no fluka
2491  fzd["MAGNESIU"] = 120000000;
2492  fzd["MOLYBDEN"] = 420000000;
2493  fzd["MANGANES"] = 250000000;
2494  fzd["MEITNERI"] = 1090000000; // no fluka
2495  fzd["URANIUM"] = 920000000;
2496  fzd["FRANCIUM"] = 870000000; // no fluka
2497  fzd["IRON"] = 260000000;
2498  fzd["FERMIUM"] = 1000000000; // no fluka
2499  fzd["NICKEL"] = 280000000;
2500  fzd["NITROGEN"] = 70000000;
2501  fzd["NOBELIUM"] = 1020000000; // no fluka
2502  fzd["SODIUM"] = 110000000;
2503  fzd["NIOBIUM"] = 410000000;
2504  fzd["NEODYMIU"] = 600000000;
2505  fzd["NEON"] = 100000000;
2506  fzd["ZIRCONIU"] = 400000000;
2507  fzd["NEPTUNIU"] = 930000000; // no fluka
2508  fzd["BORON"] = 50000000;
2509  fzd["COBALT"] = 270000000;
2510  fzd["CURIUM"] = 960000000; // no fluka
2511  fzd["FLUORINE"] = 90000000;
2512  fzd["CALCIUM"] = 200000000;
2513  fzd["CALIFORN"] = 980000000; // no fluka
2514  fzd["CERIUM"] = 580000000;
2515  fzd["CADMIUM"] = 480000000;
2516  fzd["VANADIUM"] = 230000000;
2517  fzd["CESIUM"] = 550000000;
2518  fzd["CHROMIUM"] = 240000000;
2519  fzd["COPPER"] = 290000000;
2520  fzd["STRONTIU"] = 380000000;
2521  fzd["KRYPTON"] = 360000000;
2522  fzd["SILICON"] = 140000000;
2523  fzd["TIN"] = 500000000;
2524  fzd["SAMARIUM"] = 620000000;
2525  fzd["SCANDIUM"] = 210000000;
2526  fzd["ANTIMONY"] = 510000000;
2527  fzd["SEABORGI"] = 1060000000; // no fluka
2528  fzd["SELENIUM"] = 340000000; // no fluka
2529  fzd["YTTERBIU"] = 700000000; // no fluka
2530  fzd["DUBNIUM"] = 1050000000; // no fluka
2531  fzd["DYSPROSI"] = 660000000; // no fluka
2532  fzd["DARMSTAD"] = 1100000000; // no fluka
2533  fzd["LANTHANU"] = 570000000;
2534  fzd["CHLORINE"] = 170000000;
2535  fzd["LITHIUM"] = 030000000;
2536  fzd["THALLIUM"] = 810000000; // no fluka
2537  fzd["LUTETIUM"] = 710000000; // no fluka
2538  fzd["LAWRENCI"] = 1030000000; // no fluka
2539  fzd["THORIUM"] = 900000000; // no fluka
2540  fzd["TITANIUM"] = 220000000;
2541  fzd["TELLURIU"] = 520000000; // no fluka
2542  fzd["TERBIUM"] = 650000000;
2543  fzd["99-TC"] = 430000000; // "99-TC"
2544  fzd["TANTALUM"] = 730000000;
2545  fzd["ACTINIUM"] = 890000000; // no fluka
2546  fzd["SILVER"] = 470000000;
2547  fzd["IODINE"] = 530000000;
2548  fzd["IRIDIUM"] = 770000000;
2549  fzd["241-AM"] = 950000000; // "241-AM"
2550  fzd["ALUMINUM"] = 130000000;
2551  fzd["ARSENIC"] = 330000000;
2552  fzd["ARGON"] = 180000000;
2553  fzd["GOLD"] = 790000000;
2554  fzd["ASTATINE"] = 850000000; // no fluka
2555  fzd["INDIUM"] = 490000000;
2556  fzd["YTTRIUM"] = 390000000;
2557  fzd["XENON"] = 540000000;
2558  fzd["COPERNIC"] = 1120000000; // no fluka
2559  fzd["UNUNQUAD"] = 1140000000; // no fluka: UNUNQUADIUM, "Flerovium"
2560  fzd["UNUNHEXI"] = 1160000000; // no fluka: UNUNHEXIUM , "Livermorium"
2561  fzd["HYDROG-1"] = 10010000;
2562  fzd["DEUTERIU"] = 10020000;
2563  fzd["TRITIUM"] = 10040000;
2564  fzd["HELIUM-3"] = 20030000;
2565  fzd["HELIUM-4"] = 20040000;
2566  fzd["LITHIU-6"] = 30060000;
2567  fzd["LITHIU-7"] = 30070000;
2568  fzd["BORON-10"] = 50100000;
2569  fzd["BORON-11"] = 50110000;
2570  fzd["90-SR"] = 380900000; // fluka "90-SR"
2571  fzd["129-I"] = 531290000; // fluka "129-I"
2572  fzd["124-XE"] = 541240000; // fluka "124-XE"
2573  fzd["126-XE"] = 541260000; // fluka "126-XE"
2574  fzd["128-XE"] = 541280000; // fluka "128-XE"
2575  fzd["130-XE"] = 541300000; // fluka "130-XE"
2576  fzd["131-XE"] = 541310000; // fluka "131-XE"
2577  fzd["132-XE"] = 541320000; // fluka "132-XE"
2578  fzd["134-XE"] = 541340000; // fluka "134-XE"
2579  fzd["135-XE"] = 541350000; // fluka "135-XE"
2580  fzd["136-XE"] = 541360000; // fluka "136-XE"
2581  fzd["135-CS"] = 551350000; // fluka "135-CS"
2582  fzd["137-CS"] = 551370000; // fluka "137-CS"
2583  fzd["230-TH"] = 902300000; // fluka "230-TH"
2584  fzd["232-TH"] = 902320000; // fluka "232-TH"
2585  fzd["233-U"] = 922330000; // fluka "233-U"
2586  fzd["234-U"] = 922340000; // fluka "234-U"
2587  fzd["235-U"] = 922350000; // fluka "235-U"
2588  fzd["238-U"] = 922380000; // fluka "238-U"
2589 
2590  return fzd;
2591 }
2593 
2594 
2595 /*** Constructs zz to fluka dictionary **/
2597 {
2598  zzname_t zfd;
2599  for (name_zz_iter i = fluka_zz.begin(); i != fluka_zz.end(); i++)
2600  {
2601  zfd[i->second] = i->first;
2602  }
2603  return zfd;
2604 }
2606 
2607 
2608 
2609 /******************************************/
2610 /*** Define useful elemental group sets ***/
2611 /******************************************/
2612 
2614 {
2615  zz_group zg;
2616  for (name_group_iter i = eg.begin(); i != eg.end(); i++)
2617  zg.insert(name_zz[*i]);
2618  return zg;
2619 }
2620 
2621 // Lanthanides
2622 pyne::nucname::name_t pyne::nucname::LAN_array[15] = {"La", "Ce", "Pr", "Nd",
2623  "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu"};
2628 
2629 // Actinides
2630 pyne::nucname::name_t pyne::nucname::ACT_array[15] = {"Ac", "Th", "Pa", "U",
2631  "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr"};
2634 
2635 // Transuarnics
2636 pyne::nucname::name_t pyne::nucname::TRU_array[22] = {"Np", "Pu", "Am", "Cm",
2637  "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt",
2638  "Ds", "Rg", "Cn", "Fl", "Lv"};
2643 
2644 //Minor Actinides
2645 pyne::nucname::name_t pyne::nucname::MA_array[10] = {"Np", "Am", "Cm", "Bk",
2646  "Cf", "Es", "Fm", "Md", "No", "Lr"};
2651 
2652 //Fission Products
2653 pyne::nucname::name_t pyne::nucname::FP_array[88] = {"Ag", "Al", "Ar", "As",
2654  "At", "Au", "B", "Ba", "Be", "Bi", "Br", "C", "Ca", "Cd", "Ce", "Cl", "Co",
2655  "Cr", "Cs", "Cu", "Dy", "Er", "Eu", "F", "Fe", "Fr", "Ga", "Gd", "Ge", "H",
2656  "He", "Hf", "Hg", "Ho", "I", "In", "Ir", "K", "Kr", "La", "Li", "Lu", "Mg",
2657  "Mn", "Mo", "N", "Na", "Nb", "Nd", "Ne", "Ni", "O", "Os", "P", "Pb", "Pd",
2658  "Pm", "Po", "Pr", "Pt", "Ra", "Rb", "Re", "Rh", "Rn", "Ru", "S", "Sb", "Sc",
2659  "Se", "Si", "Sm", "Sn", "Sr", "Ta", "Tb", "Tc", "Te", "Ti", "Tl", "Tm", "V",
2660  "W", "Xe", "Y", "Yb", "Zn", "Zr"};
2665 
2666 
2667 /***************************/
2668 /*** isnuclide functions ***/
2669 /***************************/
2670 
2671 bool pyne::nucname::isnuclide(std::string nuc) {
2672  int n;
2673  try {
2674  n = id(nuc);
2675  }
2676  catch(NotANuclide) {
2677  return false;
2678  }
2679  catch(IndeterminateNuclideForm) {
2680  return false;
2681  }
2682  return isnuclide(n);
2683 }
2684 
2685 bool pyne::nucname::isnuclide(const char * nuc) {
2686  return isnuclide(std::string(nuc));
2687 }
2688 
2690  int n;
2691  try {
2692  n = id(nuc);
2693  }
2694  catch(NotANuclide) {
2695  return false;
2696  }
2697  catch(IndeterminateNuclideForm) {
2698  return false;
2699  }
2700  if (n <= 10000000)
2701  return false;
2702  int zzz = n / 10000000;
2703  int aaa = (n % 10000000) / 10000;
2704  if (aaa == 0)
2705  return false; // is element
2706  else if (aaa < zzz)
2707  return false;
2708  return true;
2709 }
2710 
2711 
2712 
2713 /********************/
2714 /*** id functions ***/
2715 /********************/
2716 int pyne::nucname::id(int nuc) {
2717  if (nuc < 0)
2718  throw NotANuclide(nuc, "");
2719 
2720  int newnuc;
2721  int zzz = nuc / 10000000; // ZZZ ?
2722  int aaassss = nuc % 10000000; // AAA-SSSS ?
2723  int aaa = aaassss / 10000; // AAA ?
2724  int ssss = aaassss % 10000; // SSSS ?
2725  // Nuclide must already be in id form
2726  if (0 < zzz && zzz <= aaa && aaa <= zzz * 7) {
2727  // Normal nuclide
2728  if (5 < ssss){
2729  // Unphysical metastable state warning
2730  warning("You have indicated a metastable state of " + pyne::to_str(ssss) + ". Metastable state above 5, possibly unphysical. ");
2731  }
2732  return nuc;
2733  } else if (aaassss == 0 && 0 < zz_name.count(zzz)) {
2734  // Natural elemental nuclide: ie for Uranium = 920000000
2735  return nuc;
2736  } else if (nuc < 1000 && 0 < zz_name.count(nuc))
2737  // Gave Z-number
2738  return nuc * 10000000;
2739 
2740  // Not in id form, try ZZZAAAM form.
2741  zzz = nuc / 10000; // ZZZ ?
2742  aaassss = nuc % 10000; // AAA-SSSS ?
2743  aaa = aaassss / 10; // AAA ?
2744  ssss = nuc % 10; // SSSS ?
2745  if (zzz <= aaa && aaa <= zzz * 7) {
2746  // ZZZAAAM nuclide
2747  if (5 < ssss){
2748  // Unphysical metastable state warning
2749  warning("You have indicated a metastable state of " + pyne::to_str(ssss) + ". Metastable state above 5, possibly unphysical. ");
2750  }
2751  return (zzz*10000000) + (aaa*10000) + (nuc%10);
2752  } else if (aaa <= zzz && zzz <= aaa * 7 && 0 < zz_name.count(aaa)) {
2753  // Cinder-form (aaazzzm), ie 2350920
2754  if (5 < ssss){
2755  // Unphysical metastable state warning
2756  warning("You have indicated a metastable state of " + pyne::to_str(ssss) + ". Metastable state above 5, possibly unphysical. ");
2757  }
2758  return (aaa*10000000) + (zzz*10000) + (nuc%10);
2759  }
2760  //else if (aaassss == 0 && 0 == zz_name.count(nuc/1000) && 0 < zz_name.count(zzz))
2761  else if (aaassss == 0 && 0 < zz_name.count(zzz)) {
2762  // zzaaam form natural nuclide
2763  return zzz * 10000000;
2764  }
2765 
2766  if (nuc >= 1000000){
2767  // From now we assume no metastable info has been given.
2768  throw IndeterminateNuclideForm(nuc, "");
2769  }
2770 
2771  // Nuclide is not in zzaaam form,
2772  // Try MCNP form, ie zzaaa
2773  // This is the same form as SZA for the 0th state.
2774  zzz = nuc / 1000;
2775  aaa = nuc % 1000;
2776  if (zzz <= aaa) {
2777  if (aaa - 400 < 0) {
2778  if (nuc == 95242)
2779  return nuc * 10000 + 1; // special case MCNP Am-242m
2780  else
2781  return nuc * 10000; // Nuclide in normal MCNP form
2782  } else {
2783  // Nuclide in MCNP metastable form
2784  if (nuc == 95642)
2785  return (95642 - 400)*10000; // special case MCNP Am-242
2786  nuc = ((nuc - 400) * 10000) + 1;
2787  while (3.0 < (float ((nuc/10000)%1000) / float (nuc/10000000)))
2788  nuc -= 999999;
2789  return nuc;
2790  }
2791  } else if (aaa == 0 && 0 < zz_name.count(zzz)) {
2792  // MCNP form natural nuclide
2793  return zzz * 10000000;
2794  }
2795 
2796  // Not a normal nuclide, might be a
2797  // Natural elemental nuclide.
2798  // ie 92 for Uranium = 920000
2799  if (0 < zz_name.count(nuc))
2800  return nuc * 10000000;
2801  throw IndeterminateNuclideForm(nuc, "");
2802 }
2803 
2804 int pyne::nucname::id(const char * nuc) {
2805  std::string newnuc (nuc);
2806  return id(newnuc);
2807 }
2808 
2809 int pyne::nucname::id(std::string nuc) {
2810  size_t npos = std::string::npos;
2811  if (nuc.empty())
2812  throw NotANuclide(nuc, "<empty>");
2813  int newnuc;
2814  std::string elem_name;
2815  int dash1 = nuc.find("-");
2816  int dash2;
2817  if (dash1 == npos)
2818  dash2 = npos;
2819  else
2820  dash2 = nuc.find("-", dash1+1);
2821 
2822  // nuc must be at least 4 characters or greater if it is in ZZLLAAAM form.
2823  if (nuc.length() >= 5 && dash1 != npos && dash2 != npos) {
2824  // Nuclide most likely in ZZLLAAAM Form, only form that contains two "-"'s.
2825  std::string zz = nuc.substr(0, dash1);
2826  std::string ll = nuc.substr(dash1+1, dash2);
2827  int zz_int = to_int(zz);
2828  // Verifying that the LL and ZZ point to the same element as secondary
2829  if(znum(ll) != zz_int)
2830  throw NotANuclide(nuc, "mismatched znum and chemical symbol");
2831  return zzllaaam_to_id(nuc);
2832  }
2833 
2834  // Get the string into a regular form
2835  std::string nucstr = pyne::to_upper(nuc);
2836  nucstr = pyne::remove_substring(nucstr, "-");
2837  int nuclen = nucstr.length();
2838 
2839  if (pyne::contains_substring(pyne::digits, nucstr.substr(0, 1))) {
2840  if (pyne::contains_substring(pyne::digits, nucstr.substr(nuclen-1, nuclen))) {
2841  // Nuclide must actually be an integer that
2842  // just happens to be living in string form.
2843  newnuc = pyne::to_int(nucstr);
2844  newnuc = id(newnuc);
2845  } else {
2846  // probably in NIST-like form (242Am)
2847  // Here we know we have both digits and letters
2848  std::string anum_str = pyne::remove_characters(nucstr, pyne::alphabet);
2849  newnuc = pyne::to_int(anum_str) * 10000;
2850 
2851  // Add the Z-number
2852  elem_name = pyne::remove_characters(nucstr, pyne::digits);
2853  elem_name = pyne::capitalize(elem_name);
2854  if (0 < name_zz.count(elem_name))
2855  newnuc = (10000000 * name_zz[elem_name]) + newnuc;
2856  else
2857  throw NotANuclide(nucstr, newnuc);
2858  }
2859  } else if (pyne::contains_substring(pyne::alphabet, nucstr.substr(0, 1))) {
2860  // Nuclide is probably in name form, or some variation therein
2861  std::string anum_str = pyne::remove_characters(nucstr, pyne::alphabet);
2862 
2863  // natural element form, a la 'U' -> 920000000
2864  if (anum_str.empty()) {
2865  elem_name = pyne::capitalize(nucstr);
2866  if (0 < name_zz.count(elem_name))
2867  return 10000000 * name_zz[elem_name];
2868  }
2869 
2870  int anum = pyne::to_int(anum_str);
2871 
2872  // bad form
2873  if (anum < 0)
2874  throw NotANuclide(nucstr, anum);
2875 
2876  // Figure out if we are meta-stable or not
2877  std::string end_char = pyne::last_char(nucstr);
2878  if (end_char == "M")
2879  newnuc = (10000 * anum) + 1;
2880  else if (pyne::contains_substring(pyne::digits, end_char))
2881  newnuc = (10000 * anum);
2882  else
2883  throw NotANuclide(nucstr, newnuc);
2884 
2885  // Add the Z-number
2886  elem_name = pyne::remove_characters(nucstr.substr(0, nuclen-1), pyne::digits);
2887  elem_name = pyne::capitalize(elem_name);
2888  if (0 < name_zz.count(elem_name))
2889  newnuc = (10000000 * name_zz[elem_name]) + newnuc;
2890  else
2891  throw NotANuclide(nucstr, newnuc);
2892  } else {
2893  // Clearly not a nuclide
2894  throw NotANuclide(nuc, nucstr);
2895  }
2896  return newnuc;
2897 }
2898 
2899 
2900 /***************************/
2901 /*** iselement functions ***/
2902 /***************************/
2903 
2904 bool pyne::nucname::iselement(std::string nuc) {
2905  int n;
2906  try {
2907  n = id(nuc);
2908  }
2909  catch(NotANuclide) {
2910  return false;
2911  }
2912  return iselement(n);
2913 }
2914 
2915 bool pyne::nucname::iselement(const char * nuc) {
2916  return iselement(std::string(nuc));
2917 }
2918 
2920  int n;
2921  try {
2922  n = id(nuc);
2923  }
2924  catch(NotANuclide) {
2925  return false;
2926  }
2927 
2928  if (n < 10000000)
2929  return false;
2930  int zzz = znum(n);
2931  int aaa = anum(n);
2932  if (zzz > 0 && aaa == 0)
2933  return true; // is element
2934  return false;
2935 }
2936 
2937 /**********************/
2938 /*** name functions ***/
2939 /**********************/
2940 std::string pyne::nucname::name(int nuc) {
2941  int nucid = id(nuc);
2942  std::string newnuc = "";
2943 
2944  int zzz = nucid / 10000000;
2945  int ssss = nucid % 10000;
2946  int aaassss = nucid % 10000000;
2947  int aaa = aaassss / 10000;
2948 
2949  // Make sure the LL value is correct
2950  if (0 == zz_name.count(zzz))
2951  throw NotANuclide(nuc, nucid);
2952 
2953  // Add LL
2954  newnuc += zz_name[zzz];
2955 
2956  // Add A-number
2957  if (0 < aaa)
2958  newnuc += pyne::to_str(aaa);
2959 
2960  // Add meta-stable flag
2961  if (0 < ssss)
2962  newnuc += "M";
2963 
2964  return newnuc;
2965 }
2966 
2967 
2968 
2969 std::string pyne::nucname::name(const char * nuc) {
2970  std::string newnuc (nuc);
2971  return name(newnuc);
2972 }
2973 
2974 
2975 std::string pyne::nucname::name(std::string nuc) {
2976  return name(id(nuc));
2977 }
2978 
2979 
2980 /**********************/
2981 /*** znum functions ***/
2982 /**********************/
2983 int pyne::nucname::znum(int nuc) {
2984  return id(nuc) / 10000000;
2985 }
2986 
2987 int pyne::nucname::znum(const char * nuc) {
2988  return id(nuc) / 10000000;
2989 }
2990 
2991 int pyne::nucname::znum(std::string nuc) {
2992  return id(nuc) / 10000000;
2993 }
2994 
2995 /**********************/
2996 /*** anum functions ***/
2997 /**********************/
2998 int pyne::nucname::anum(int nuc) {
2999  return (id(nuc) / 10000) % 1000;
3000 }
3001 
3002 int pyne::nucname::anum(const char * nuc) {
3003  return (id(nuc) / 10000) % 1000;
3004 }
3005 
3006 int pyne::nucname::anum(std::string nuc) {
3007  return (id(nuc) / 10000) % 1000;
3008 }
3009 
3010 /**********************/
3011 /*** snum functions ***/
3012 /**********************/
3013 int pyne::nucname::snum(int nuc) {
3014  return id(nuc) % 10000;
3015 }
3016 
3017 int pyne::nucname::snum(const char * nuc) {
3018  return id(nuc) % 10000;
3019 }
3020 
3021 int pyne::nucname::snum(std::string nuc) {
3022  return id(nuc) % 10000;
3023 }
3024 
3025 /************************/
3026 /*** zzaaam functions ***/
3027 /************************/
3029  int nucid = id(nuc);
3030  int zzzaaa = nucid / 10000;
3031  int ssss = nucid % 10000;
3032  if (10 <= ssss)
3033  ssss = 9;
3034  return zzzaaa*10 + ssss;
3035 }
3036 
3037 
3038 int pyne::nucname::zzaaam(const char * nuc) {
3039  std::string newnuc (nuc);
3040  return zzaaam(newnuc);
3041 }
3042 
3043 
3044 int pyne::nucname::zzaaam(std::string nuc) {
3045  return zzaaam(id(nuc));
3046 }
3047 
3048 
3050  return (nuc/10)*10000 + (nuc%10);
3051 }
3052 
3053 
3054 int pyne::nucname::zzaaam_to_id(const char * nuc) {
3055  return zzaaam_to_id(std::string(nuc));
3056 }
3057 
3058 
3059 int pyne::nucname::zzaaam_to_id(std::string nuc) {
3060  return zzaaam_to_id(pyne::to_int(nuc));
3061 }
3062 
3063 /************************/
3064 /*** zzzaaa functions ***/
3065 /************************/
3067  int nucid = id(nuc);
3068  int zzzaaa = nucid/10000;
3069 
3070  return zzzaaa;
3071 }
3072 
3073 
3074 int pyne::nucname::zzzaaa(const char * nuc) {
3075  std::string newnuc (nuc);
3076  return zzzaaa(newnuc);
3077 }
3078 
3079 
3080 int pyne::nucname::zzzaaa(std::string nuc) {
3081  return zzzaaa(id(nuc));
3082 }
3083 
3084 
3086  return (nuc)*10000;
3087 }
3088 
3089 
3090 int pyne::nucname::zzzaaa_to_id(const char * nuc) {
3091  return zzzaaa_to_id(std::string(nuc));
3092 }
3093 
3094 
3095 int pyne::nucname::zzzaaa_to_id(std::string nuc) {
3096  return zzzaaa_to_id(pyne::to_int(nuc));
3097 }
3098 
3099 /*************************/
3100 /*** zzllaaam functions ***/
3101 /*************************/
3102 std::string pyne::nucname::zzllaaam(int nuc) {
3103  int nucid = id(nuc);
3104  std::string newnuc = "";
3105 
3106  int ssss = nucid % 10000;
3107  int aaassss = nucid % 10000000;
3108  int zzz = nucid / 10000000;
3109  int aaa = aaassss / 10000;
3110 
3111  // Make sure the LL value is correct
3112  if (0 == zz_name.count(zzz))
3113  throw NotANuclide(nuc, nucid);
3114  //Adding ZZ
3115  newnuc += pyne::to_str(zzz);
3116  newnuc += "-";
3117  // Add LL
3118  newnuc += zz_name[zzz];
3119  // Add required dash
3120  newnuc += "-";
3121  // Add AAA
3122  if (0 < aaassss)
3123  newnuc += pyne::to_str(aaa);
3124  // Add meta-stable flag
3125  if (0 < ssss)
3126  newnuc += "m";
3127  return newnuc;
3128 }
3129 
3130 
3131 std::string pyne::nucname::zzllaaam(const char * nuc) {
3132  std::string newnuc (nuc);
3133  return zzllaaam(newnuc);
3134 }
3135 
3136 
3137 std::string pyne::nucname::zzllaaam(std::string nuc) {
3138  return zzllaaam(id(nuc));
3139 }
3140 
3141 
3142 int pyne::nucname::zzllaaam_to_id(const char * nuc) {
3143  return zzllaaam_to_id(std::string(nuc));
3144 }
3145 
3146 
3147 int pyne::nucname::zzllaaam_to_id(std::string nuc) {
3148  if (nuc.empty())
3149  throw NotANuclide(nuc, "<empty>");
3150  int nucid;
3151  std::string elem_name;
3152 
3153  // Get the string into a regular form
3154  std::string nucstr = pyne::to_upper(nuc);
3155  // Removing first two characters (redundant), for 1 digit nuclides, such
3156  // as 2-He-4, the first slash will be removed, and the second attempt to
3157  // remove the second slash will do nothing.
3158  nucstr.erase(0,2);
3159  nucstr = pyne::remove_substring(nucstr, "-");
3160  // Does nothing if nuclide is short, otherwise removes the second "-" instance
3161  nucstr = pyne::remove_substring(nucstr, "-");
3162  int nuclen = nucstr.length();
3163 
3164  // Nuclide is probably in name form, or some variation therein
3165  std::string anum_str = pyne::remove_characters(nucstr, pyne::alphabet);
3166 
3167  // natural element form, a la 'U' -> 920000000
3168  if (anum_str.empty() || pyne::contains_substring(nucstr, "NAT")) {
3169  elem_name = pyne::capitalize(pyne::remove_substring(nucstr, "NAT"));
3170  if (0 < name_zz.count(elem_name))
3171  return 10000000 * name_zz[elem_name];
3172  }
3173  int anum = pyne::to_int(anum_str);
3174 
3175  // Figure out if we are meta-stable or not
3176  std::string end_char = pyne::last_char(nucstr);
3177  if (end_char == "M")
3178  nucid = (10000 * anum) + 1;
3179  else if (pyne::contains_substring(pyne::digits, end_char))
3180  nucid = (10000 * anum);
3181  else
3182  throw NotANuclide(nucstr, nucid);
3183 
3184  // Add the Z-number
3185  elem_name = pyne::remove_characters(nucstr.substr(0, nuclen-1), pyne::digits);
3186  elem_name = pyne::capitalize(elem_name);
3187  if (0 < name_zz.count(elem_name))
3188  nucid = (10000000 * name_zz[elem_name]) + nucid;
3189  else
3190  throw NotANuclide(nucstr, nucid);
3191  return nucid;
3192 }
3193 
3194 /**********************/
3195 /*** mcnp functions ***/
3196 /**********************/
3197 int pyne::nucname::mcnp(int nuc) {
3198  nuc = id(nuc);
3199  int ssss = nuc % 10000;
3200  int newnuc = nuc / 10000;
3201 
3202  // special case Am242(m)
3203  if (newnuc == 95242 && ssss < 2)
3204  ssss = (ssss + 1) % 2;
3205 
3206  // Handle the crazy MCNP meta-stable format
3207  if (0 != ssss && ssss < 10)
3208  newnuc += 300 + (ssss * 100);
3209 
3210  return newnuc;
3211 }
3212 
3213 
3214 
3215 int pyne::nucname::mcnp(const char * nuc) {
3216  std::string newnuc (nuc);
3217  return mcnp(newnuc);
3218 }
3219 
3220 
3221 
3222 int pyne::nucname::mcnp(std::string nuc) {
3223  return mcnp(id(nuc));
3224 }
3225 
3226 //
3227 // MCNP -> id
3228 //
3230  int zzz = nuc / 1000;
3231  int aaa = nuc % 1000;
3232  if (zzz == 0)
3233  throw NotANuclide(nuc, "not in the MCNP format");
3234  else if (zzz <= aaa) {
3235  if (aaa - 400 < 0) {
3236  if (nuc == 95242)
3237  return nuc * 10000 + 1; // special case MCNP Am-242m
3238  else
3239  return nuc * 10000; // Nuclide in normal MCNP form
3240  } else {
3241  // Nuclide in MCNP metastable form
3242  if (nuc == 95642)
3243  return (95642 - 400)*10000; // special case MCNP Am-242
3244  nuc = ((nuc - 400) * 10000) + 1;
3245  while (3.0 < (float ((nuc/10000)%1000) / float (nuc/10000000)))
3246  nuc -= 999999;
3247  return nuc;
3248  }
3249  } else if (aaa == 0)
3250  // MCNP form natural nuclide
3251  return zzz * 10000000;
3252  throw IndeterminateNuclideForm(nuc, "");
3253 }
3254 
3255 
3256 int pyne::nucname::mcnp_to_id(const char * nuc) {
3257  return mcnp_to_id(std::string(nuc));
3258 }
3259 
3260 
3261 int pyne::nucname::mcnp_to_id(std::string nuc) {
3262  return mcnp_to_id(pyne::to_int(nuc));
3263 }
3264 
3265 
3266 /**********************/
3267 /*** fluka functions ***/
3268 /**********************/
3269 std::string pyne::nucname::fluka(int nuc) {
3270  int x = id(nuc);
3271  if (zz_fluka.count(x) == 0) {
3272  throw NotANuclide(nuc, "fluka name could not be found");
3273  }
3274  return zz_fluka[x];
3275 }
3276 
3277 
3278 //
3279 // FLUKA name -> id
3280 //
3282  if (fluka_zz.count(name) == 0) {
3283  throw NotANuclide(-1, "No nuclide: fluka name could not be found");
3284  }
3285  return fluka_zz[name];
3286 }
3287 
3289  return fluka_to_id(std::string(name));
3290 }
3291 
3292 
3293 /*************************/
3294 /*** serpent functions ***/
3295 /*************************/
3296 std::string pyne::nucname::serpent(int nuc) {
3297  int nucid = id(nuc);
3298  std::string newnuc = "";
3299 
3300  int ssss = nucid % 10000;
3301  int aaassss = nucid % 10000000;
3302  int zzz = nucid / 10000000;
3303  int aaa = aaassss / 10000;
3304 
3305  // Make sure the LL value is correct
3306  if (0 == zz_name.count(zzz))
3307  throw NotANuclide(nuc, nucid);
3308 
3309  // Add LL
3310  std::string llupper = pyne::to_upper(zz_name[zzz]);
3311  std::string lllower = pyne::to_lower(zz_name[zzz]);
3312  newnuc += llupper[0];
3313  for (int l = 1; l < lllower.size(); l++)
3314  newnuc += lllower[l];
3315 
3316  // Add required dash
3317  newnuc += "-";
3318 
3319  // Add A-number
3320  if (0 < aaassss)
3321  newnuc += pyne::to_str(aaa);
3322  else if (0 == aaassss)
3323  newnuc += "nat";
3324 
3325  // Add meta-stable flag
3326  if (0 < ssss)
3327  newnuc += "m";
3328 
3329  return newnuc;
3330 }
3331 
3332 
3333 std::string pyne::nucname::serpent(const char * nuc) {
3334  std::string newnuc (nuc);
3335  return serpent(newnuc);
3336 }
3337 
3338 
3339 std::string pyne::nucname::serpent(std::string nuc) {
3340  return serpent(id(nuc));
3341 }
3342 
3343 //
3344 // Serpent -> id
3345 //
3346 //int pyne::nucname::serpent_to_id(int nuc)
3347 //{
3348 // Should be ZAID
3349 //}
3350 
3351 
3352 int pyne::nucname::serpent_to_id(const char * nuc) {
3353  return serpent_to_id(std::string(nuc));
3354 }
3355 
3356 
3357 int pyne::nucname::serpent_to_id(std::string nuc) {
3358  if (nuc.empty())
3359  throw NotANuclide(nuc, "<empty>");
3360  int nucid;
3361  std::string elem_name;
3362 
3363  // Get the string into a regular form
3364  std::string nucstr = pyne::to_upper(nuc);
3365  nucstr = pyne::remove_substring(nucstr, "-");
3366  int nuclen = nucstr.length();
3367 
3368  // Nuclide is probably in name form, or some variation therein
3369  std::string anum_str = pyne::remove_characters(nucstr, pyne::alphabet);
3370 
3371  // natural element form, a la 'U' -> 920000000
3372  if (anum_str.empty() || pyne::contains_substring(nucstr, "NAT")) {
3373  elem_name = pyne::capitalize(pyne::remove_substring(nucstr, "NAT"));
3374  if (0 < name_zz.count(elem_name))
3375  return 10000000 * name_zz[elem_name];
3376  }
3377  int anum = pyne::to_int(anum_str);
3378 
3379  // Figure out if we are meta-stable or not
3380  std::string end_char = pyne::last_char(nucstr);
3381  if (end_char == "M")
3382  nucid = (10000 * anum) + 1;
3383  else if (pyne::contains_substring(pyne::digits, end_char))
3384  nucid = (10000 * anum);
3385  else
3386  throw NotANuclide(nucstr, nucid);
3387 
3388  // Add the Z-number
3389  elem_name = pyne::remove_characters(nucstr.substr(0, nuclen-1), pyne::digits);
3390  elem_name = pyne::capitalize(elem_name);
3391  if (0 < name_zz.count(elem_name))
3392  nucid = (10000000 * name_zz[elem_name]) + nucid;
3393  else
3394  throw NotANuclide(nucstr, nucid);
3395  return nucid;
3396 }
3397 
3398 
3399 /**********************/
3400 /*** nist functions ***/
3401 /**********************/
3402 std::string pyne::nucname::nist(int nuc) {
3403  int nucid = id(nuc);
3404  std::string newnuc = "";
3405 
3406  int zzz = nucid / 10000000;
3407  int ssss = nucid % 10000;
3408  int aaassss = nucid % 10000000;
3409  int aaa = aaassss / 10000;
3410 
3411  // Make sure the LL value is correct
3412  if (0 == zz_name.count(zzz))
3413  throw NotANuclide(nuc, nucid);
3414 
3415  // Add A-number
3416  if (0 < aaassss)
3417  newnuc += pyne::to_str(aaa);
3418 
3419  // Add name
3420  std::string name_upper = pyne::to_upper(zz_name[zzz]);
3421  std::string name_lower = pyne::to_lower(zz_name[zzz]);
3422  newnuc += name_upper[0];
3423  for (int l = 1; l < name_lower.size(); l++)
3424  newnuc += name_lower[l];
3425 
3426  // Add meta-stable flag
3427  // No metastable flag for NIST,
3428  // but could add star, by uncommenting below
3429  //if (0 < mod_10)
3430  // newnuc += "*";
3431 
3432  return newnuc;
3433 }
3434 
3435 
3436 std::string pyne::nucname::nist(const char * nuc) {
3437  std::string newnuc (nuc);
3438  return nist(newnuc);
3439 }
3440 
3441 
3442 std::string pyne::nucname::nist(std::string nuc) {
3443  return nist(id(nuc));
3444 }
3445 
3446 
3447 //
3448 // NIST -> id
3449 //
3450 //int pyne::nucname::nist_to_id(int nuc)
3451 //{
3452 // NON-EXISTANT
3453 //};
3454 
3455 int pyne::nucname::nist_to_id(const char * nuc) {
3456  return nist_to_id(std::string(nuc));
3457 }
3458 
3459 int pyne::nucname::nist_to_id(std::string nuc) {
3460  if (nuc.empty())
3461  throw NotANuclide(nuc, "<empty>");
3462  int nucid;
3463  nuc = pyne::to_upper(nuc);
3464  std::string elem_name;
3465  int nuclen = nuc.length();
3466 
3467  // Nuclide is probably in name form, or some variation therein
3468  std::string anum_str = pyne::remove_characters(nuc, pyne::alphabet);
3469 
3470  // natural element form, a la 'U' -> 920000000
3471  if (anum_str.empty()) {
3472  elem_name = pyne::capitalize(nuc);
3473  if (0 < name_zz.count(elem_name))
3474  return 10000000 * name_zz[elem_name];
3475  }
3476  nucid = pyne::to_int(anum_str) * 10000;
3477 
3478  // Add the Z-number
3479  elem_name = pyne::remove_characters(nuc, pyne::digits);
3480  elem_name = pyne::capitalize(elem_name);
3481  if (0 < name_zz.count(elem_name))
3482  nucid = (10000000 * name_zz[elem_name]) + nucid;
3483  else
3484  throw NotANuclide(nuc, nucid);
3485  return nucid;
3486 }
3487 
3488 
3489 /************************/
3490 /*** cinder functions ***/
3491 /************************/
3493  // cinder nuclides of form aaazzzm
3494  int nucid = id(nuc);
3495  int zzz = nucid / 10000000;
3496  int ssss = nucid % 10000;
3497  int aaassss = nucid % 10000000;
3498  int aaa = aaassss / 10000;
3499  if (10 <= ssss)
3500  ssss = 9;
3501  return (aaa*10000) + (zzz*10) + ssss;
3502 }
3503 
3504 
3505 
3506 int pyne::nucname::cinder(const char * nuc) {
3507  std::string newnuc (nuc);
3508  return cinder(newnuc);
3509 }
3510 
3511 
3512 
3513 int pyne::nucname::cinder(std::string nuc) {
3514  return cinder(id(nuc));
3515 }
3516 
3517 //
3518 // Cinder -> Id
3519 //
3521  int ssss = nuc % 10;
3522  int aaazzz = nuc / 10;
3523  int zzz = aaazzz % 1000;
3524  int aaa = aaazzz / 1000;
3525  return (zzz * 10000000) + (aaa * 10000) + ssss;
3526 }
3527 
3528 
3529 int pyne::nucname::cinder_to_id(const char * nuc) {
3530  return cinder_to_id(std::string(nuc));
3531 }
3532 
3533 
3534 int pyne::nucname::cinder_to_id(std::string nuc) {
3535  return cinder_to_id(pyne::to_int(nuc));
3536 }
3537 
3538 
3539 
3540 
3541 /**********************/
3542 /*** ALARA functions ***/
3543 /**********************/
3544 std::string pyne::nucname::alara(int nuc) {
3545  int nucid = id(nuc);
3546  std::string newnuc = "";
3547  std::string ll = "";
3548 
3549  int zzz = nucid / 10000000;
3550  int ssss = nucid % 10000;
3551  int aaassss = nucid % 10000000;
3552  int aaa = aaassss / 10000;
3553 
3554  // Make sure the LL value is correct
3555  if (0 == zz_name.count(zzz))
3556  throw NotANuclide(nuc, nucid);
3557 
3558  // Add LL, in lower case
3559  ll += zz_name[zzz];
3560 
3561  for(int i = 0; ll[i] != '\0'; i++)
3562  ll[i] = tolower(ll[i]);
3563  newnuc += ll;
3564 
3565  // Add A-number
3566  if (0 < aaassss){
3567  newnuc += ":";
3568  newnuc += pyne::to_str(aaa);
3569  }
3570 
3571  // Note, ALARA input format does not use metastable flag
3572  return newnuc;
3573 }
3574 
3575 
3576 std::string pyne::nucname::alara(const char * nuc) {
3577  std::string newnuc (nuc);
3578  return alara(newnuc);
3579 }
3580 
3581 
3582 std::string pyne::nucname::alara(std::string nuc) {
3583  return alara(id(nuc));
3584 }
3585 
3586 
3587 //
3588 // Cinder -> Id
3589 //
3590 //int pyne::nucname::alara_to_id(int nuc)
3591 //{
3592 // Not Possible
3593 //}
3594 
3595 
3596 int pyne::nucname::alara_to_id(const char * nuc) {
3597  return alara_to_id(std::string(nuc));
3598 }
3599 
3600 
3601 int pyne::nucname::alara_to_id(std::string nuc) {
3602  if (nuc.empty())
3603  throw NotANuclide(nuc, "<empty>");
3604  int nucid;
3605  nuc = pyne::to_upper(pyne::remove_characters(nuc, ":"));
3606  std::string elem_name;
3607  int nuclen = nuc.length();
3608 
3609  // Nuclide is probably in name form, or some variation therein
3610  std::string anum_str = pyne::remove_characters(nuc, pyne::alphabet);
3611 
3612  // natural element form, a la 'U' -> 920000000
3613  if (anum_str.empty()) {
3614  elem_name = pyne::capitalize(nuc);
3615  if (0 < name_zz.count(elem_name))
3616  return 10000000 * name_zz[elem_name];
3617  }
3618  nucid = pyne::to_int(anum_str) * 10000;
3619 
3620  // Add the Z-number
3621  elem_name = pyne::remove_characters(nuc, pyne::digits);
3622  elem_name = pyne::capitalize(elem_name);
3623  if (0 < name_zz.count(elem_name))
3624  nucid = (10000000 * name_zz[elem_name]) + nucid;
3625  else
3626  throw NotANuclide(nuc, nucid);
3627  return nucid;
3628 }
3629 
3630 
3631 
3632 
3633 /***********************/
3634 /*** SZA functions ***/
3635 /***********************/
3636 int pyne::nucname::sza(int nuc) {
3637  int nucid = id(nuc);
3638  int zzzaaa = nucid / 10000;
3639  int sss = nucid % 10000;
3640  return sss * 1000000 + zzzaaa;
3641 }
3642 
3643 
3644 int pyne::nucname::sza(const char * nuc) {
3645  std::string newnuc (nuc);
3646  return sza(newnuc);
3647 }
3648 
3649 
3650 int pyne::nucname::sza(std::string nuc) {
3651  return sza(id(nuc));
3652 }
3653 
3654 
3656  int sss = nuc / 1000000;
3657  int zzzaaa = nuc % 1000000;
3658  if (5 < sss){
3659  // Unphysical metastable state warning
3660  warning("You have indicated a metastable state of " + pyne::to_str(sss) + ". Metastable state above 5, possibly unphysical. ");
3661  }
3662  return zzzaaa * 10000 + sss;
3663 }
3664 
3665 
3666 int pyne::nucname::sza_to_id(const char * nuc) {
3667  std::string newnuc (nuc);
3668  return sza_to_id(newnuc);
3669 }
3670 
3671 
3672 int pyne::nucname::sza_to_id(std::string nuc) {
3673  return sza_to_id(pyne::to_int(nuc));
3674 }
3675 
3676 
3678  for (int i = 0; i < TOTAL_STATE_MAPS; ++i) {
3680  }
3681 }
3682 
3684  int zzzaaa = (state / 10000) * 10000;
3685  int state_number = state % 10000;
3686  if (state_number == 0) return state;
3687  std::map<int, int>::iterator nuc_iter, nuc_end;
3688 
3689  nuc_iter = state_id_map.find(state);
3690  nuc_end = state_id_map.end();
3691  if (nuc_iter != nuc_end){
3692  int m = (*nuc_iter).second;
3693  return zzzaaa + m;
3694  }
3695 
3696  if (state_id_map.empty()) {
3697  _load_state_map();
3698  return state_id_to_id(state);
3699  }
3700  throw IndeterminateNuclideForm(state, "no matching metastable state");
3701 }
3702 
3703 
3705  int zzzaaa = (nuc_id / 10000) * 10000;
3706  int state = nuc_id % 10000;
3707  if (state == 0) return nuc_id;
3708  std::map<int, int>::iterator nuc_iter, nuc_end, it;
3709 
3710  nuc_iter = state_id_map.lower_bound(nuc_id);
3711  nuc_end = state_id_map.upper_bound(nuc_id + 10000);
3712  for (it = nuc_iter; it!= nuc_end; ++it){
3713  if (state == it->second) {
3714  return it->first;
3715  }
3716  }
3717  int m = (*nuc_iter).second;
3718 
3719  if (state_id_map.empty()) {
3720  _load_state_map();
3721  return id_to_state_id(nuc_id);
3722  }
3723  throw IndeterminateNuclideForm(state, "no matching state id");
3724 }
3725 
3726 
3727 /************************/
3728 /*** ENSDF functions ***/
3729 /************************/
3730 //
3731 // ENSDF -> Id
3732 //
3733 
3734 int pyne::nucname::ensdf_to_id(const char * nuc) {
3735  return ensdf_to_id(std::string(nuc));
3736 }
3737 
3738 int pyne::nucname::ensdf_to_id(std::string nuc) {
3739  if (nuc.size() < 4) {
3740  return nucname::id(nuc);
3741  } else if (std::isdigit(nuc[3])) {
3742  int aaa = to_int(nuc.substr(0, 3));
3743  int zzz;
3744  std::string xx_str = nuc.substr(3,2);
3745  zzz = to_int(xx_str) + 100;
3746  int nid = 10000 * aaa + 10000000 * zzz;
3747  return nid;
3748  } else {
3749  return nucname::id(nuc);
3750  }
3751 
3752 }
3753 
3754 //
3755 // end of src/nucname.cpp
3756 //
3757 
3758 
3759 //
3760 // start of src/rxname.cpp
3761 //
3762 #ifndef PYNE_IS_AMALGAMATED
3763 #include "rxname.h"
3764 #endif
3765 
3767  "total",
3768  "scattering",
3769  "elastic",
3770  "nonelastic",
3771  "n",
3772  "misc",
3773  "continuum",
3774  "z_2nd",
3775  "z_2n",
3776  "z_2n_0",
3777  "z_2n_1",
3778  "z_2n_2",
3779  "z_3n",
3780  "z_3n_0",
3781  "z_3n_1",
3782  "z_3n_2",
3783  "fission",
3784  "fission_first",
3785  "fission_second",
3786  "fission_third",
3787  "na",
3788  "na_0",
3789  "na_1",
3790  "na_2",
3791  "n3a",
3792  "z_2na",
3793  "z_3na",
3794  "absorption",
3795  "np",
3796  "np_0",
3797  "np_1",
3798  "np_2",
3799  "npd",
3800  "n2a",
3801  "z_2n2a",
3802  "nd",
3803  "nd_0",
3804  "nd_1",
3805  "nd_2",
3806  "nt",
3807  "nt_0",
3808  "nt_1",
3809  "nt_2",
3810  "nHe3",
3811  "nHe3_0",
3812  "nHe3_1",
3813  "nHe3_2",
3814  "nd3a",
3815  "nt2a",
3816  "z_4n",
3817  "z_4n_0",
3818  "z_4n_1",
3819  "fission_fourth",
3820  "z_2np",
3821  "z_3np",
3822  "n2p",
3823  "npa",
3824  "n_0",
3825  "n_1",
3826  "n_2",
3827  "n_3",
3828  "n_4",
3829  "n_5",
3830  "n_6",
3831  "n_7",
3832  "n_8",
3833  "n_9",
3834  "n_10",
3835  "n_11",
3836  "n_12",
3837  "n_13",
3838  "n_14",
3839  "n_15",
3840  "n_16",
3841  "n_17",
3842  "n_18",
3843  "n_19",
3844  "n_20",
3845  "n_21",
3846  "n_22",
3847  "n_23",
3848  "n_24",
3849  "n_25",
3850  "n_26",
3851  "n_27",
3852  "n_28",
3853  "n_29",
3854  "n_30",
3855  "n_31",
3856  "n_32",
3857  "n_33",
3858  "n_34",
3859  "n_35",
3860  "n_36",
3861  "n_37",
3862  "n_38",
3863  "n_39",
3864  "n_40",
3865  "n_continuum",
3866  "disappearance",
3867  "gamma",
3868  "gamma_0",
3869  "gamma_1",
3870  "gamma_2",
3871  "p",
3872  "d",
3873  "t",
3874  "He3",
3875  "a",
3876  "z_2a",
3877  "z_3a",
3878  "z_2p",
3879  "z_2p_0",
3880  "z_2p_1",
3881  "z_2p_2",
3882  "pa",
3883  "t2a",
3884  "d2a",
3885  "pd",
3886  "pt",
3887  "da",
3888  "resonance_parameters",
3889  "n_total",
3890  "gamma_total",
3891  "p_total",
3892  "d_total",
3893  "t_total",
3894  "He3_total",
3895  "a_total",
3896  "pionp",
3897  "pion0",
3898  "pionm",
3899  "muonp",
3900  "muonm",
3901  "kaonp",
3902  "kaon0_long",
3903  "kaon0_short",
3904  "kaonm",
3905  "antip",
3906  "antin",
3907  "mubar",
3908  "epsilon",
3909  "y",
3910  "erel_total",
3911  "erel_elastic",
3912  "erel_nonelastic",
3913  "erel_n",
3914  "erel_misc",
3915  "erel_continuum",
3916  "erel_2nd",
3917  "erel_2n",
3918  "erel_3n",
3919  "erel_fission",
3920  "erel_fission_first",
3921  "erel_fission_second",
3922  "erel_fission_third",
3923  "erel_na",
3924  "erel_n3a",
3925  "erel_2na",
3926  "erel_3na",
3927  "erel_absorption",
3928  "erel_np",
3929  "erel_n2a",
3930  "erel_2n2a",
3931  "erel_nd",
3932  "erel_nt",
3933  "erel_nHe3",
3934  "erel_nd3a",
3935  "erel_nt2a",
3936  "erel_4n",
3937  "erel_fission_fourth",
3938  "erel_2np",
3939  "erel_3np",
3940  "erel_n2p",
3941  "erel_npa",
3942  "erel_n_0",
3943  "erel_n_1",
3944  "erel_n_2",
3945  "erel_n_3",
3946  "erel_n_4",
3947  "erel_n_5",
3948  "erel_n_6",
3949  "erel_n_7",
3950  "erel_n_8",
3951  "erel_n_9",
3952  "erel_n_10",
3953  "erel_n_11",
3954  "erel_n_12",
3955  "erel_n_13",
3956  "erel_n_14",
3957  "erel_n_15",
3958  "erel_n_16",
3959  "erel_n_17",
3960  "erel_n_18",
3961  "erel_n_19",
3962  "erel_n_20",
3963  "erel_n_21",
3964  "erel_n_22",
3965  "erel_n_23",
3966  "erel_n_24",
3967  "erel_n_25",
3968  "erel_n_26",
3969  "erel_n_27",
3970  "erel_n_28",
3971  "erel_n_29",
3972  "erel_n_30",
3973  "erel_n_31",
3974  "erel_n_32",
3975  "erel_n_33",
3976  "erel_n_34",
3977  "erel_n_35",
3978  "erel_n_36",
3979  "erel_n_37",
3980  "erel_n_38",
3981  "erel_n_39",
3982  "erel_n_40",
3983  "erel_n_continuum",
3984  "erel_disappearance",
3985  "erel_gamma",
3986  "erel_p",
3987  "erel_d",
3988  "erel_t",
3989  "erel_He3",
3990  "erel_a",
3991  "erel_2a",
3992  "erel_3a",
3993  "erel_2p",
3994  "erel_pa",
3995  "erel_t2a",
3996  "erel_d2a",
3997  "erel_pd",
3998  "erel_pt",
3999  "erel_da",
4000  "damage",
4001  "heading",
4002  "nubar",
4003  "fission_product_yield_independent",
4004  "nubar_delayed",
4005  "nubar_prompt",
4006  "decay",
4007  "energy_per_fission",
4008  "fission_product_yield_cumulative",
4009  "gamma_delayed",
4010  "stopping_power",
4011  "photon_total",
4012  "photon_coherent",
4013  "photon_incoherent",
4014  "scattering_factor_imag",
4015  "scattering_factor_real",
4016  "pair_prod_elec",
4017  "pair_prod",
4018  "pair_prod_nuc",
4019  "absorption_photoelectric",
4020  "photoexcitation",
4021  "scattering_electroatomic",
4022  "bremsstrahlung",
4023  "excitation_electroatomic",
4024  "atomic_relaxation",
4025  "k_photoelectric",
4026  "l1_photoelectric",
4027  "l2_photoelectric",
4028  "l3_photoelectric",
4029  "m1_photoelectric",
4030  "m2_photoelectric",
4031  "m3_photoelectric",
4032  "m4_photoelectric",
4033  "m5_photoelectric",
4034  "n1_photoelectric",
4035  "n2_photoelectric",
4036  "n3_photoelectric",
4037  "n4_photoelectric",
4038  "n5_photoelectric",
4039  "n6_photoelectric",
4040  "n7_photoelectric",
4041  "o1_photoelectric",
4042  "o2_photoelectric",
4043  "o3_photoelectric",
4044  "o4_photoelectric",
4045  "o5_photoelectric",
4046  "o6_photoelectric",
4047  "o7_photoelectric",
4048  "o8_photoelectric",
4049  "o9_photoelectric",
4050  "p1_photoelectric",
4051  "p2_photoelectric",
4052  "p3_photoelectric",
4053  "p4_photoelectric",
4054  "p5_photoelectric",
4055  "p6_photoelectric",
4056  "p7_photoelectric",
4057  "p8_photoelectric",
4058  "p9_photoelectric",
4059  "p10_photoelectric",
4060  "p11_photoelectric",
4061  "q1_photoelectric",
4062  "q2_photoelectric",
4063  "q3_photoelectric",
4064  "p_0",
4065  "p_1",
4066  "p_2",
4067  "p_3",
4068  "p_4",
4069  "p_5",
4070  "p_6",
4071  "p_7",
4072  "p_8",
4073  "p_9",
4074  "p_10",
4075  "p_11",
4076  "p_12",
4077  "p_13",
4078  "p_14",
4079  "p_15",
4080  "p_16",
4081  "p_17",
4082  "p_18",
4083  "p_19",
4084  "p_20",
4085  "p_21",
4086  "p_22",
4087  "p_23",
4088  "p_24",
4089  "p_25",
4090  "p_26",
4091  "p_27",
4092  "p_28",
4093  "p_29",
4094  "p_30",
4095  "p_31",
4096  "p_32",
4097  "p_33",
4098  "p_34",
4099  "p_35",
4100  "p_36",
4101  "p_37",
4102  "p_38",
4103  "p_39",
4104  "p_40",
4105  "p_41",
4106  "p_42",
4107  "p_43",
4108  "p_44",
4109  "p_45",
4110  "p_46",
4111  "p_47",
4112  "p_48",
4113  "p_continuum",
4114  "d_0",
4115  "d_1",
4116  "d_2",
4117  "d_3",
4118  "d_4",
4119  "d_5",
4120  "d_6",
4121  "d_7",
4122  "d_8",
4123  "d_9",
4124  "d_10",
4125  "d_11",
4126  "d_12",
4127  "d_13",
4128  "d_14",
4129  "d_15",
4130  "d_16",
4131  "d_17",
4132  "d_18",
4133  "d_19",
4134  "d_20",
4135  "d_21",
4136  "d_22",
4137  "d_23",
4138  "d_24",
4139  "d_25",
4140  "d_26",
4141  "d_27",
4142  "d_28",
4143  "d_29",
4144  "d_30",
4145  "d_31",
4146  "d_32",
4147  "d_33",
4148  "d_34",
4149  "d_35",
4150  "d_36",
4151  "d_37",
4152  "d_38",
4153  "d_39",
4154  "d_40",
4155  "d_41",
4156  "d_42",
4157  "d_43",
4158  "d_44",
4159  "d_45",
4160  "d_46",
4161  "d_47",
4162  "d_48",
4163  "d_continuum",
4164  "t_0",
4165  "t_1",
4166  "t_2",
4167  "t_3",
4168  "t_4",
4169  "t_5",
4170  "t_6",
4171  "t_7",
4172  "t_8",
4173  "t_9",
4174  "t_10",
4175  "t_11",
4176  "t_12",
4177  "t_13",
4178  "t_14",
4179  "t_15",
4180  "t_16",
4181  "t_17",
4182  "t_18",
4183  "t_19",
4184  "t_20",
4185  "t_21",
4186  "t_22",
4187  "t_23",
4188  "t_24",
4189  "t_25",
4190  "t_26",
4191  "t_27",
4192  "t_28",
4193  "t_29",
4194  "t_30",
4195  "t_31",
4196  "t_32",
4197  "t_33",
4198  "t_34",
4199  "t_35",
4200  "t_36",
4201  "t_37",
4202  "t_38",
4203  "t_39",
4204  "t_40",
4205  "t_41",
4206  "t_42",
4207  "t_43",
4208  "t_44",
4209  "t_45",
4210  "t_46",
4211  "t_47",
4212  "t_48",
4213  "t_continuum",
4214  "He3_0",
4215  "He3_1",
4216  "He3_2",
4217  "He3_3",
4218  "He3_4",
4219  "He3_5",
4220  "He3_6",
4221  "He3_7",
4222  "He3_8",
4223  "He3_9",
4224  "He3_10",
4225  "He3_11",
4226  "He3_12",
4227  "He3_13",
4228  "He3_14",
4229  "He3_15",
4230  "He3_16",
4231  "He3_17",
4232  "He3_18",
4233  "He3_19",
4234  "He3_20",
4235  "He3_21",
4236  "He3_22",
4237  "He3_23",
4238  "He3_24",
4239  "He3_25",
4240  "He3_26",
4241  "He3_27",
4242  "He3_28",
4243  "He3_29",
4244  "He3_30",
4245  "He3_31",
4246  "He3_32",
4247  "He3_33",
4248  "He3_34",
4249  "He3_35",
4250  "He3_36",
4251  "He3_37",
4252  "He3_38",
4253  "He3_39",
4254  "He3_40",
4255  "He3_41",
4256  "He3_42",
4257  "He3_43",
4258  "He3_44",
4259  "He3_45",
4260  "He3_46",
4261  "He3_47",
4262  "He3_48",
4263  "He3_continuum",
4264  "a_0",
4265  "a_1",
4266  "a_2",
4267  "a_3",
4268  "a_4",
4269  "a_5",
4270  "a_6",
4271  "a_7",
4272  "a_8",
4273  "a_9",
4274  "a_10",
4275  "a_11",
4276  "a_12",
4277  "a_13",
4278  "a_14",
4279  "a_15",
4280  "a_16",
4281  "a_17",
4282  "a_18",
4283  "a_19",
4284  "a_20",
4285  "a_21",
4286  "a_22",
4287  "a_23",
4288  "a_24",
4289  "a_25",
4290  "a_26",
4291  "a_27",
4292  "a_28",
4293  "a_29",
4294  "a_30",
4295  "a_31",
4296  "a_32",
4297  "a_33",
4298  "a_34",
4299  "a_35",
4300  "a_36",
4301  "a_37",
4302  "a_38",
4303  "a_39",
4304  "a_40",
4305  "a_41",
4306  "a_42",
4307  "a_43",
4308  "a_44",
4309  "a_45",
4310  "a_46",
4311  "a_47",
4312  "a_48",
4313  "a_continuum",
4314  "lumped_covar",
4315  "excited",
4316  "bminus",
4317  "bplus",
4318  "ec",
4319  "bminus_n",
4320  "bminus_a",
4321  "it",
4322  "bplus_a",
4323  "ec_bplus",
4324  "bplus_p",
4325  "bminus_2n",
4326  "bminus_3n",
4327  "bminus_4n",
4328  "ecp",
4329  "eca",
4330  "bplus_2p",
4331  "ec_2p",
4332  "decay_2bminus",
4333  "bminus_p",
4334  "decay_14c",
4335  "bplus_3p",
4336  "sf",
4337  "decay_2bplus",
4338  "decay_2ec"
4339  };
4340 std::set<std::string> pyne::rxname::names(pyne::rxname::_names,
4342 
4343 
4344 std::map<std::string, unsigned int> pyne::rxname::altnames;
4345 std::map<unsigned int, std::string> pyne::rxname::id_name;
4346 std::map<std::string, unsigned int> pyne::rxname::name_id;
4347 std::map<unsigned int, unsigned int> pyne::rxname::id_mt;
4348 std::map<unsigned int, unsigned int> pyne::rxname::mt_id;
4349 std::map<unsigned int, std::string> pyne::rxname::labels;
4350 std::map<unsigned int, std::string> pyne::rxname::docs;
4351 std::map<std::pair<std::string, int>, unsigned int> pyne::rxname::offset_id;
4352 std::map<std::pair<std::string, unsigned int>, int> pyne::rxname::id_offset;
4353 
4355  using std::make_pair;
4356  std::string rx;
4357  unsigned int rxid;
4358  unsigned int _mts [NUM_RX_NAMES] = {
4359  1,
4360  0,
4361  2,
4362  3,
4363  4,
4364  5,
4365  10,
4366  11,
4367  16,
4368  0,
4369  0,
4370  0,
4371  17,
4372  0,
4373  0,
4374  0,
4375  18,
4376  19,
4377  20,
4378  21,
4379  22,
4380  0,
4381  0,
4382  0,
4383  23,
4384  24,
4385  25,
4386  27,
4387  28,
4388  0,
4389  0,
4390  0,
4391  0,
4392  29,
4393  30,
4394  32,
4395  0,
4396  0,
4397  0,
4398  33,
4399  0,
4400  0,
4401  0,
4402  34,
4403  0,
4404  0,
4405  0,
4406  35,
4407  36,
4408  37,
4409  0,
4410  0,
4411  38,
4412  41,
4413  42,
4414  44,
4415  45,
4416  50,
4417  51,
4418  52,
4419  53,
4420  54,
4421  55,
4422  56,
4423  57,
4424  58,
4425  59,
4426  60,
4427  61,
4428  62,
4429  63,
4430  64,
4431  65,
4432  66,
4433  67,
4434  68,
4435  69,
4436  70,
4437  71,
4438  72,
4439  73,
4440  74,
4441  75,
4442  76,
4443  77,
4444  78,
4445  79,
4446  80,
4447  81,
4448  82,
4449  83,
4450  84,
4451  85,
4452  86,
4453  87,
4454  88,
4455  89,
4456  90,
4457  91,
4458  101,
4459  102,
4460  0,
4461  0,
4462  0,
4463  103,
4464  104,
4465  105,
4466  106,
4467  107,
4468  108,
4469  109,
4470  111,
4471  0,
4472  0,
4473  0,
4474  112,
4475  113,
4476  114,
4477  115,
4478  116,
4479  117,
4480  151,
4481  201,
4482  202,
4483  203,
4484  204,
4485  205,
4486  206,
4487  207,
4488  208,
4489  209,
4490  210,
4491  211,
4492  212,
4493  213,
4494  214,
4495  215,
4496  216,
4497  217,
4498  218,
4499  251,
4500  252,
4501  253,
4502  301,
4503  302,
4504  303,
4505  304,
4506  305,
4507  310,
4508  311,
4509  316,
4510  317,
4511  318,
4512  319,
4513  320,
4514  321,
4515  322,
4516  323,
4517  324,
4518  325,
4519  327,
4520  328,
4521  329,
4522  330,
4523  332,
4524  333,
4525  334,
4526  335,
4527  336,
4528  337,
4529  338,
4530  341,
4531  342,
4532  344,
4533  345,
4534  350,
4535  351,
4536  352,
4537  353,
4538  354,
4539  355,
4540  356,
4541  357,
4542  358,
4543  359,
4544  360,
4545  361,
4546  362,
4547  363,
4548  364,
4549  365,
4550  366,
4551  367,
4552  368,
4553  369,
4554  370,
4555  371,
4556  372,
4557  373,
4558  374,
4559  375,
4560  376,
4561  377,
4562  378,
4563  379,
4564  380,
4565  381,
4566  382,
4567  383,
4568  384,
4569  385,
4570  386,
4571  387,
4572  388,
4573  389,
4574  390,
4575  391,
4576  401,
4577  402,
4578  403,
4579  404,
4580  405,
4581  406,
4582  407,
4583  408,
4584  409,
4585  411,
4586  412,
4587  413,
4588  414,
4589  415,
4590  416,
4591  417,
4592  444,
4593  451,
4594  452,
4595  454,
4596  455,
4597  456,
4598  457,
4599  458,
4600  459,
4601  460,
4602  500,
4603  501,
4604  502,
4605  504,
4606  505,
4607  506,
4608  515,
4609  516,
4610  517,
4611  522,
4612  523,
4613  526,
4614  527,
4615  528,
4616  533,
4617  534,
4618  535,
4619  536,
4620  537,
4621  538,
4622  539,
4623  540,
4624  541,
4625  542,
4626  543,
4627  544,
4628  545,
4629  546,
4630  547,
4631  548,
4632  549,
4633  550,
4634  551,
4635  552,
4636  553,
4637  554,
4638  555,
4639  556,
4640  557,
4641  558,
4642  559,
4643  560,
4644  561,
4645  562,
4646  563,
4647  564,
4648  565,
4649  566,
4650  567,
4651  568,
4652  569,
4653  570,
4654  571,
4655  572,
4656  600,
4657  601,
4658  602,
4659  603,
4660  604,
4661  605,
4662  606,
4663  607,
4664  608,
4665  609,
4666  610,
4667  611,
4668  612,
4669  613,
4670  614,
4671  615,
4672  616,
4673  617,
4674  618,
4675  619,
4676  620,
4677  621,
4678  622,
4679  623,
4680  624,
4681  625,
4682  626,
4683  627,
4684  628,
4685  629,
4686  630,
4687  631,
4688  632,
4689  633,
4690  634,
4691  635,
4692  636,
4693  637,
4694  638,
4695  639,
4696  640,
4697  641,
4698  642,
4699  643,
4700  644,
4701  645,
4702  646,
4703  647,
4704  648,
4705  649,
4706  650,
4707  651,
4708  652,
4709  653,
4710  654,
4711  655,
4712  656,
4713  657,
4714  658,
4715  659,
4716  660,
4717  661,
4718  662,
4719  663,
4720  664,
4721  665,
4722  666,
4723  667,
4724  668,
4725  669,
4726  670,
4727  671,
4728  672,
4729  673,
4730  674,
4731  675,
4732  676,
4733  677,
4734  678,
4735  679,
4736  680,
4737  681,
4738  682,
4739  683,
4740  684,
4741  685,
4742  686,
4743  687,
4744  688,
4745  689,
4746  690,
4747  691,
4748  692,
4749  693,
4750  694,
4751  695,
4752  696,
4753  697,
4754  698,
4755  699,
4756  700,
4757  701,
4758  702,
4759  703,
4760  704,
4761  705,
4762  706,
4763  707,
4764  708,
4765  709,
4766  710,
4767  711,
4768  712,
4769  713,
4770  714,
4771  715,
4772  716,
4773  717,
4774  718,
4775  719,
4776  720,
4777  721,
4778  722,
4779  723,
4780  724,
4781  725,
4782  726,
4783  727,
4784  728,
4785  729,
4786  730,
4787  731,
4788  732,
4789  733,
4790  734,
4791  735,
4792  736,
4793  737,
4794  738,
4795  739,
4796  740,
4797  741,
4798  742,
4799  743,
4800  744,
4801  745,
4802  746,
4803  747,
4804  748,
4805  749,
4806  750,
4807  751,
4808  752,
4809  753,
4810  754,
4811  755,
4812  756,
4813  757,
4814  758,
4815  759,
4816  760,
4817  761,
4818  762,
4819  763,
4820  764,
4821  765,
4822  766,
4823  767,
4824  768,
4825  769,
4826  770,
4827  771,
4828  772,
4829  773,
4830  774,
4831  775,
4832  776,
4833  777,
4834  778,
4835  779,
4836  780,
4837  781,
4838  782,
4839  783,
4840  784,
4841  785,
4842  786,
4843  787,
4844  788,
4845  789,
4846  790,
4847  791,
4848  792,
4849  793,
4850  794,
4851  795,
4852  796,
4853  797,
4854  798,
4855  799,
4856  800,
4857  801,
4858  802,
4859  803,
4860  804,
4861  805,
4862  806,
4863  807,
4864  808,
4865  809,
4866  810,
4867  811,
4868  812,
4869  813,
4870  814,
4871  815,
4872  816,
4873  817,
4874  818,
4875  819,
4876  820,
4877  821,
4878  822,
4879  823,
4880  824,
4881  825,
4882  826,
4883  827,
4884  828,
4885  829,
4886  830,
4887  831,
4888  832,
4889  833,
4890  834,
4891  835,
4892  836,
4893  837,
4894  838,
4895  839,
4896  840,
4897  841,
4898  842,
4899  843,
4900  844,
4901  845,
4902  846,
4903  847,
4904  848,
4905  849,
4906  851,
4907  0,
4908  0,
4909  0,
4910  0,
4911  0,
4912  0,
4913  0,
4914  0,
4915  0,
4916  0,
4917  0,
4918  0,
4919  0,
4920  0,
4921  0,
4922  0,
4923  0,
4924  0,
4925  0,
4926  0,
4927  0,
4928  0,
4929  0,
4930  0
4931  };
4932  std::string _labels[NUM_RX_NAMES] = {
4933  "(z,total)",
4934  "(z,scattering)",
4935  "(z,elastic)",
4936  "(z,nonelastic)",
4937  "(z,n)",
4938  "(misc)",
4939  "(z,continuum)",
4940  "(z,2nd)",
4941  "(z,2n)",
4942  "(z,2n0)",
4943  "(z,2n1)",
4944  "(z,2n2)",
4945  "(z,3n)",
4946  "(z,3n0)",
4947  "(z,3n1)",
4948  "(z,3n2)",
4949  "(z,fission)",
4950  "(z,f)",
4951  "(z,nf)",
4952  "(z,2nf)",
4953  "(z,n+a)",
4954  "(z,n+a0)",
4955  "(z,n+a1)",
4956  "(z,n+a2)",
4957  "(z,n+3a)",
4958  "(z,2n+a)",
4959  "(z,3n+a)",
4960  "(z,abs) Absorption",
4961  "(z,n+p)",
4962  "(z,n+p0)",
4963  "(z,n+p1)",
4964  "(z,n+p2)",
4965  "(z,n+p+d)",
4966  "(z,n+2a)",
4967  "(z,2n+2a)",
4968  "(z,nd)",
4969  "(z,nd0)",
4970  "(z,nd1)",
4971  "(z,nd2)",
4972  "(z,nt)",
4973  "(z,nt0)",
4974  "(z,nt1)",
4975  "(z,nt2)",
4976  "(z,n+He3)",
4977  "(z,n+He3-0)",
4978  "(z,n+He3-1)",
4979  "(z,n+He3-2)",
4980  "(z,n+d+3a)",
4981  "(z,n+t+2a)",
4982  "(z,4n)",
4983  "(z,4n0)",
4984  "(z,4n1)",
4985  "(z,3nf)",
4986  "(z,2n+p)",
4987  "(z,3n+p)",
4988  "(z,n+2p)",
4989  "(z,npa)",
4990  "(z,n0)",
4991  "(z,n1)",
4992  "(z,n2)",
4993  "(z,n3)",
4994  "(z,n4)",
4995  "(z,n5)",
4996  "(z,n6)",
4997  "(z,n7)",
4998  "(z,n8)",
4999  "(z,n9)",
5000  "(z,n10)",
5001  "(z,n11)",
5002  "(z,n12)",
5003  "(z,n13)",
5004  "(z,n14)",
5005  "(z,n15)",
5006  "(z,n16)",
5007  "(z,n17)",
5008  "(z,n18)",
5009  "(z,n19)",
5010  "(z,n20)",
5011  "(z,n21)",
5012  "(z,n22)",
5013  "(z,n23)",
5014  "(z,n24)",
5015  "(z,n25)",
5016  "(z,n26)",
5017  "(z,n27)",
5018  "(z,n28)",
5019  "(z,n29)",
5020  "(z,n30)",
5021  "(z,n31)",
5022  "(z,n32)",
5023  "(z,n33)",
5024  "(z,n34)",
5025  "(z,n35)",
5026  "(z,n36)",
5027  "(z,n37)",
5028  "(z,n38)",
5029  "(z,n39)",
5030  "(z,n40)",
5031  "(z,nc)",
5032  "(z,disap) Neutron disappearance",
5033  "(z,gamma)",
5034  "(z,gamma0)",
5035  "(z,gamma1)",
5036  "(z,gamma2)",
5037  "(z,p)",
5038  "(z,d)",
5039  "(z,t)",
5040  "(z,3He)",
5041  "(z,a)",
5042  "(z,2a)",
5043  "(z,3a)",
5044  "(z,2p)",
5045  "(z,2p0)",
5046  "(z,2p1)",
5047  "(z,2p2)",
5048  "(z,pa)",
5049  "(z,t2a)",
5050  "(z,d2a)",
5051  "(z,pd)",
5052  "(z,pt)",
5053  "(z,da)",
5054  "Resonance Parameters",
5055  "(z,Xn)",
5056  "(z,Xgamma)",
5057  "(z,Xp)",
5058  "(z,Xd)",
5059  "(z,Xt)",
5060  "(z,X3He)",
5061  "(z,Xa)",
5062  "(z,Xpi+) Total pi+ meson production",
5063  "(z,Xpi0) Total pi0 meson production",
5064  "(z,Xpi-) Total pi- meson production",
5065  "(z,Xmu+) Total anti-muon production",
5066  "(z,Xmu-) Total muon production",
5067  "(z,Xk+) Total positive kaon production",
5068  "(z,Xk0long) Total long-lived neutral kaon production",
5069  "(z,Xk0short) Total short-lived neutral kaon production",
5070  "(z,Xk-) Total negative kaon production",
5071  "(z,Xp-) Total anti-proton production",
5072  "(z,Xn-) Total anti-neutron production",
5073  "Average cosine of scattering angle",
5074  "Average logarithmic energy decrement",
5075  "Average xi^2/(2*xi)",
5076  "Energy Release from (z,total)",
5077  "Energy Release from (z,elastic)",
5078  "Energy Release from (z,nonelastic)",
5079  "Energy Release from (z,inelastic)",
5080  "Energy Release from (misc)",
5081  "Energy Release from (z,continuum)",
5082  "Energy Release from (z,2nd)",
5083  "Energy Release from (z,2n)",
5084  "Energy Release from (z,3n)",
5085  "Energy Release from (z,fission)",
5086  "Energy Release from (z,f)",
5087  "Energy Release from (z,nf)",
5088  "Energy Release from (z,2nf)",
5089  "Energy Release from (z,n+a)",
5090  "Energy Release from (z,n+3a)",
5091  "Energy Release from (z,2n+a)",
5092  "Energy Release from (z,3n+a)",
5093  "Energy Release from (z,abs) Absorption",
5094  "Energy Release from (z,n+p)",
5095  "Energy Release from (z,n+2a)",
5096  "Energy Release from (z,2n+2a)",
5097  "Energy Release from (z,nd)",
5098  "Energy Release from (z,nt)",
5099  "Energy Release from (z,n+He3)",
5100  "Energy Release from (z,n+d+3a)",
5101  "Energy Release from (z,n+t+2a)",
5102  "Energy Release from (z,4n)",
5103  "Energy Release from (z,3nf)",
5104  "Energy Release from (z,2n+p)",
5105  "Energy Release from (z,3n+p)",
5106  "Energy Release from (z,n+2p)",
5107  "Energy Release from (z,npa)",
5108  "Energy Release from (z,n0)",
5109  "Energy Release from (z,n1)",
5110  "Energy Release from (z,n2)",
5111  "Energy Release from (z,n3)",
5112  "Energy Release from (z,n4)",
5113  "Energy Release from (z,n5)",
5114  "Energy Release from (z,n6)",
5115  "Energy Release from (z,n7)",
5116  "Energy Release from (z,n8)",
5117  "Energy Release from (z,n9)",
5118  "Energy Release from (z,n10)",
5119  "Energy Release from (z,n11)",
5120  "Energy Release from (z,n12)",
5121  "Energy Release from (z,n13)",
5122  "Energy Release from (z,n14)",
5123  "Energy Release from (z,n15)",
5124  "Energy Release from (z,n16)",
5125  "Energy Release from (z,n17)",
5126  "Energy Release from (z,n18)",
5127  "Energy Release from (z,n19)",
5128  "Energy Release from (z,n20)",
5129  "Energy Release from (z,n21)",
5130  "Energy Release from (z,n22)",
5131  "Energy Release from (z,n23)",
5132  "Energy Release from (z,n24)",
5133  "Energy Release from (z,n25)",
5134  "Energy Release from (z,n26)",
5135  "Energy Release from (z,n27)",
5136  "Energy Release from (z,n28)",
5137  "Energy Release from (z,n29)",
5138  "Energy Release from (z,n30)",
5139  "Energy Release from (z,n31)",
5140  "Energy Release from (z,n32)",
5141  "Energy Release from (z,n33)",
5142  "Energy Release from (z,n34)",
5143  "Energy Release from (z,n35)",
5144  "Energy Release from (z,n36)",
5145  "Energy Release from (z,n37)",
5146  "Energy Release from (z,n38)",
5147  "Energy Release from (z,n39)",
5148  "Energy Release from (z,n40)",
5149  "Energy Release from (z,nc)",
5150  "Energy Release from (z,disap) Neutron disappearance",
5151  "Energy Release from (z,gamma)",
5152  "Energy Release from (z,p)",
5153  "Energy Release from (z,d)",
5154  "Energy Release from (z,t)",
5155  "Energy Release from (z,3He)",
5156  "Energy Release from (z,a)",
5157  "Energy Release from (z,2a)",
5158  "Energy Release from (z,3a)",
5159  "Energy Release from (z,2p)",
5160  "Energy Release from (z,pa)",
5161  "Energy Release from (z,t2a)",
5162  "Energy Release from (z,d2a)",
5163  "Energy Release from (z,pd)",
5164  "Energy Release from (z,pt)",
5165  "Energy Release from (z,da)",
5166  "(damage)",
5167  "Descriptive Data",
5168  "Total Neutrons per Fission",
5169  "Independent fission product yield",
5170  "Delayed Neutron Data",
5171  "Prompt Neutrons per Fission",
5172  "Radioactive Decay Data",
5173  "Energy Release Due to Fission",
5174  "Cumulative Fission Product Yield",
5175  "Delayed Photon Data",
5176  "Total charged-particle stopping power",
5177  "Total photon interaction",
5178  "Photon coherent scattering",
5179  "Photon incoherent scattering",
5180  "Imaginary scattering factor",
5181  "Real scattering factor",
5182  "Pair production, electron field",
5183  "Total pair production",
5184  "Pair production, nuclear field",
5185  "Photoelectric absorption",
5186  "Photo-excitation cross section",
5187  "Electro-atomic scattering",
5188  "Electro-atomic bremsstrahlung",
5189  "Electro-atomic excitation cross section",
5190  "Atomic relaxation data",
5191  "K (1s1/2) subshell",
5192  "L1 (2s1/2) subshell",
5193  "L2 (2p1/2) subshell",
5194  "L3 (2p3/2) subshell",
5195  "M1 (3s1/2) subshell",
5196  "M2 (3p1/2) subshell",
5197  "M3 (3p3/2) subshell",
5198  "M4 (3d1/2) subshell",
5199  "M5 (3d1/2) subshell",
5200  "N1 (4s1/2) subshell",
5201  "N2 (4p1/2) subshell",
5202  "N3 (4p3/2) subshell",
5203  "N4 (4d3/2) subshell",
5204  "N5 (4d5/2) subshell",
5205  "N6 (4f5/2) subshell",
5206  "N7 (4f7/2) subshell",
5207  "O1 (5s1/2) subshell",
5208  "O2 (5p1/2) subshell",
5209  "O3 (5p3/2) subshell",
5210  "O4 (5d3/2) subshell",
5211  "O5 (5d5/2) subshell",
5212  "O6 (5f5/2) subshell",
5213  "O7 (5f7/2) subshell",
5214  "O8 (5g7/2) subshell",
5215  "O9 (5g9/2) subshell",
5216  "P1 (6s1/2) subshell",
5217  "P2 (6p1/2) subshell",
5218  "P3 (6p3/2) subshell",
5219  "P4 (6d3/2) subshell",
5220  "P5 (6d5/2) subshell",
5221  "P6 (6f5/2) subshell",
5222  "P7 (6f7/2) subshell",
5223  "P8 (6g7/2) subshell",
5224  "P9 (6g9/2) subshell",
5225  "P10 (6h9/2) subshell",
5226  "P11 (6h11/2) subshell",
5227  "Q1 (7s1/2) subshell",
5228  "Q2 (7p1/2) subshell",
5229  "Q3 (7p3/2) subshell",
5230  "(z,p0)",
5231  "(z,p1)",
5232  "(z,p2)",
5233  "(z,p3)",
5234  "(z,p4)",
5235  "(z,p5)",
5236  "(z,p6)",
5237  "(z,p7)",
5238  "(z,p8)",
5239  "(z,p9)",
5240  "(z,p10)",
5241  "(z,p11)",
5242  "(z,p12)",
5243  "(z,p13)",
5244  "(z,p14)",
5245  "(z,p15)",
5246  "(z,p16)",
5247  "(z,p17)",
5248  "(z,p18)",
5249  "(z,p19)",
5250  "(z,p20)",
5251  "(z,p21)",
5252  "(z,p22)",
5253  "(z,p23)",
5254  "(z,p24)",
5255  "(z,p25)",
5256  "(z,p26)",
5257  "(z,p27)",
5258  "(z,p28)",
5259  "(z,p29)",
5260  "(z,p30)",
5261  "(z,p31)",
5262  "(z,p32)",
5263  "(z,p33)",
5264  "(z,p34)",
5265  "(z,p35)",
5266  "(z,p36)",
5267  "(z,p37)",
5268  "(z,p38)",
5269  "(z,p39)",
5270  "(z,p40)",
5271  "(z,p41)",
5272  "(z,p42)",
5273  "(z,p43)",
5274  "(z,p44)",
5275  "(z,p45)",
5276  "(z,p46)",
5277  "(z,p47)",
5278  "(z,p48)",
5279  "(z,pc)",
5280  "(z,d0)",
5281  "(z,d1)",
5282  "(z,d2)",
5283  "(z,d3)",
5284  "(z,d4)",
5285  "(z,d5)",
5286  "(z,d6)",
5287  "(z,d7)",
5288  "(z,d8)",
5289  "(z,d9)",
5290  "(z,d10)",
5291  "(z,d11)",
5292  "(z,d12)",
5293  "(z,d13)",
5294  "(z,d14)",
5295  "(z,d15)",
5296  "(z,d16)",
5297  "(z,d17)",
5298  "(z,d18)",
5299  "(z,d19)",
5300  "(z,d20)",
5301  "(z,d21)",
5302  "(z,d22)",
5303  "(z,d23)",
5304  "(z,d24)",
5305  "(z,d25)",
5306  "(z,d26)",
5307  "(z,d27)",
5308  "(z,d28)",
5309  "(z,d29)",
5310  "(z,d30)",
5311  "(z,d31)",
5312  "(z,d32)",
5313  "(z,d33)",
5314  "(z,d34)",
5315  "(z,d35)",
5316  "(z,d36)",
5317  "(z,d37)",
5318  "(z,d38)",
5319  "(z,d39)",
5320  "(z,d40)",
5321  "(z,d41)",
5322  "(z,d42)",
5323  "(z,d43)",
5324  "(z,d44)",
5325  "(z,d45)",
5326  "(z,d46)",
5327  "(z,d47)",
5328  "(z,d48)",
5329  "(z,dc)",
5330  "(z,t0)",
5331  "(z,t1)",
5332  "(z,t2)",
5333  "(z,t3)",
5334  "(z,t4)",
5335  "(z,t5)",
5336  "(z,t6)",
5337  "(z,t7)",
5338  "(z,t8)",
5339  "(z,t9)",
5340  "(z,t10)",
5341  "(z,t11)",
5342  "(z,t12)",
5343  "(z,t13)",
5344  "(z,t14)",
5345  "(z,t15)",
5346  "(z,t16)",
5347  "(z,t17)",
5348  "(z,t18)",
5349  "(z,t19)",
5350  "(z,t20)",
5351  "(z,t21)",
5352  "(z,t22)",
5353  "(z,t23)",
5354  "(z,t24)",
5355  "(z,t25)",
5356  "(z,t26)",
5357  "(z,t27)",
5358  "(z,t28)",
5359  "(z,t29)",
5360  "(z,t30)",
5361  "(z,t31)",
5362  "(z,t32)",
5363  "(z,t33)",
5364  "(z,t34)",
5365  "(z,t35)",
5366  "(z,t36)",
5367  "(z,t37)",
5368  "(z,t38)",
5369  "(z,t39)",
5370  "(z,t40)",
5371  "(z,t41)",
5372  "(z,t42)",
5373  "(z,t43)",
5374  "(z,t44)",
5375  "(z,t45)",
5376  "(z,t46)",
5377  "(z,t47)",
5378  "(z,t48)",
5379  "(z,tc)",
5380  "(z,3He0)",
5381  "(z,3He1)",
5382  "(z,3He2)",
5383  "(z,3He3)",
5384  "(z,3He4)",
5385  "(z,3He5)",
5386  "(z,3He6)",
5387  "(z,3He7)",
5388  "(z,3He8)",
5389  "(z,3He9)",
5390  "(z,3He10)",
5391  "(z,3He11)",
5392  "(z,3He12)",
5393  "(z,3He13)",
5394  "(z,3He14)",
5395  "(z,3He15)",
5396  "(z,3He16)",
5397  "(z,3He17)",
5398  "(z,3He18)",
5399  "(z,3He19)",
5400  "(z,3He20)",
5401  "(z,3He21)",
5402  "(z,3He22)",
5403  "(z,3He23)",
5404  "(z,3He24)",
5405  "(z,3He25)",
5406  "(z,3He26)",
5407  "(z,3He27)",
5408  "(z,3He28)",
5409  "(z,3He29)",
5410  "(z,3He30)",
5411  "(z,3He31)",
5412  "(z,3He32)",
5413  "(z,3He33)",
5414  "(z,3He34)",
5415  "(z,3He35)",
5416  "(z,3He36)",
5417  "(z,3He37)",
5418  "(z,3He38)",
5419  "(z,3He39)",
5420  "(z,3He40)",
5421  "(z,3He41)",
5422  "(z,3He42)",
5423  "(z,3He43)",
5424  "(z,3He44)",
5425  "(z,3He45)",
5426  "(z,3He46)",
5427  "(z,3He47)",
5428  "(z,3He48)",
5429  "(z,3Hec)",
5430  "(z,a0)",
5431  "(z,a1)",
5432  "(z,a2)",
5433  "(z,a3)",
5434  "(z,a4)",
5435  "(z,a5)",
5436  "(z,a6)",
5437  "(z,a7)",
5438  "(z,a8)",
5439  "(z,a9)",
5440  "(z,a10)",
5441  "(z,a11)",
5442  "(z,a12)",
5443  "(z,a13)",
5444  "(z,a14)",
5445  "(z,a15)",
5446  "(z,a16)",
5447  "(z,a17)",
5448  "(z,a18)",
5449  "(z,a19)",
5450  "(z,a20)",
5451  "(z,a21)",
5452  "(z,a22)",
5453  "(z,a23)",
5454  "(z,a24)",
5455  "(z,a25)",
5456  "(z,a26)",
5457  "(z,a27)",
5458  "(z,a28)",
5459  "(z,a29)",
5460  "(z,a30)",
5461  "(z,a31)",
5462  "(z,a32)",
5463  "(z,a33)",
5464  "(z,a34)",
5465  "(z,a35)",
5466  "(z,a36)",
5467  "(z,a37)",
5468  "(z,a38)",
5469  "(z,a39)",
5470  "(z,a40)",
5471  "(z,a41)",
5472  "(z,a42)",
5473  "(z,a43)",
5474  "(z,a44)",
5475  "(z,a45)",
5476  "(z,a46)",
5477  "(z,a47)",
5478  "(z,a48)",
5479  "(z,ac)",
5480  "Lumped Covariances",
5481  "Any Excited State",
5482  "(z,b-)",
5483  "(z,b+)",
5484  "(z,ec)",
5485  "(z,b-n)",
5486  "(z,b-a)",
5487  "(z,it)",
5488  "(z,b+a)",
5489  "(z,ec+b+)",
5490  "(z,b+p)",
5491  "(z,b-2n)",
5492  "(z,b-3n)",
5493  "(z,b-4n)",
5494  "(z,ecp)",
5495  "(z,eca)",
5496  "(z,b+2p)",
5497  "(z,ec2p)",
5498  "(z,2b-)",
5499  "(z,b-p)",
5500  "(z,14c)",
5501  "(z,b+3p)",
5502  "(z,sf)",
5503  "(z,2b+)",
5504  "(z,2ec)"
5505  };
5506  std::string _docs[NUM_RX_NAMES] = {
5507  "(n,total) Neutron total",
5508  "Total scattering",
5509  "(z,z0) Elastic scattering",
5510  "(z,nonelas) Nonelastic neutron",
5511  "(z,n) One neutron in exit channel",
5512  "(z,anything) Miscellaneous",
5513  "(z,contin) Total continuum reaction",
5514  "(z,2nd) Production of 2n and d",
5515  "(z,2n) Production of 2n",
5516  "(z,2n0) Production of 2n, ground state",
5517  "(z,2n1) Production of 2n, 1st excited state",
5518  "(z,2n2) Production of 2n, 2nd excited state",
5519  "(z,3n) Production of 3n",
5520  "(z,3n0) Production of 3n, ground state",
5521  "(z,3n1) Production of 3n, 1st excited state",
5522  "(z,3n2) Production of 3n, 2nd excited state",
5523  "(z,fiss) Particle-induced fission",
5524  "(z,f) First-chance fission",
5525  "(z,nf) Second chance fission",
5526  "(z,2nf) Third-chance fission",
5527  "(z,na) Production of n and alpha",
5528  "(z,na0) Production of n and alpha, ground state",
5529  "(z,na1) Production of n and alpha, 1st excited state",
5530  "(z,na2) Production of n and alpha, 2nd excited state",
5531  "(z,n3a) Production of n and 3 alphas",
5532  "(z,2na) Production of 2n and alpha",
5533  "(z,3na) Production of 3n and alpha",
5534  "(n,abs) Absorption",
5535  "(z,np) Production of n and p",
5536  "(z,np0) Production of n and p, ground state",
5537  "(z,np1) Production of n and p, 1st excited state",
5538  "(z,np2) Production of n and p, 2nd excited state",
5539  "(z,npd) Production of n, p, and d",
5540  "(z,n2a) Production of n and 2 alphas",
5541  "(z,2n2a) Production of 2n and 2 alphas",
5542  "(z,nd) Production of n and d",
5543  "(z,nd0) Production of n and d, ground state",
5544  "(z,nd1) Production of n and d, 1st excited state",
5545  "(z,nd2) Production of n and d, 2nd excited state",
5546  "(z,nt) Production of n and t",
5547  "(z,nt0) Production of n and t, ground state",
5548  "(z,nt1) Production of n and t, 1st excited state",
5549  "(z,nt2) Production of n and t, 2nd excited state",
5550  "(z,n3He) Production of n and He-3",
5551  "(z,n3He-0) Production of n and He-3, ground state",
5552  "(z,n3He-1) Production of n and He-3, 1st excited state",
5553  "(z,n3He-2) Production of n and He-3, 2nd excited state",
5554  "(z,nd2a) Production of n, d, and alpha",
5555  "(z,nt2a) Production of n, t, and 2 alphas",
5556  "(z,4n) Production of 4n",
5557  "(z,4n0) Production of 4n, ground state",
5558  "(z,4n1) Production of 4n, 1st excited state",
5559  "(z,3nf) Fourth-chance fission",
5560  "(z,2np) Production of 2n and p",
5561  "(z,3np) Production of 3n and p",
5562  "(z,n2p) Production of n and 2p",
5563  "(z,npa) Production of n, p, and alpha",
5564  "(z,n0) Production of n, ground state",
5565  "(z,n1) Production of n, 1st excited state",
5566  "(z,n2) Production of n, 2nd excited state",
5567  "(z,n3) Production of n, 3rd excited state",
5568  "(z,n4) Production of n, 4th excited state",
5569  "(z,n5) Production of n, 5th excited state",
5570  "(z,n6) Production of n, 6th excited state",
5571  "(z,n7) Production of n, 7th excited state",
5572  "(z,n8) Production of n, 8th excited state",
5573  "(z,n9) Production of n, 9th excited state",
5574  "(z,n10) Production of n, 10th excited state",
5575  "(z,n11) Production of n, 11th excited state",
5576  "(z,n12) Production of n, 12th excited state",
5577  "(z,n13) Production of n, 13th excited state",
5578  "(z,n14) Production of n, 14th excited state",
5579  "(z,n15) Production of n, 15th excited state",
5580  "(z,n16) Production of n, 16th excited state",
5581  "(z,n17) Production of n, 17th excited state",
5582  "(z,n18) Production of n, 18th excited state",
5583  "(z,n19) Production of n, 19th excited state",
5584  "(z,n20) Production of n, 20th excited state",
5585  "(z,n21) Production of n, 21st excited state",
5586  "(z,n22) Production of n, 22nd excited state",
5587  "(z,n23) Production of n, 23rd excited state",
5588  "(z,n24) Production of n, 24th excited state",
5589  "(z,n25) Production of n, 25th excited state",
5590  "(z,n26) Production of n, 26th excited state",
5591  "(z,n27) Production of n, 27th excited state",
5592  "(z,n28) Production of n, 28th excited state",
5593  "(z,n29) Production of n, 29th excited state",
5594  "(z,n30) Production of n, 30th excited state",
5595  "(z,n31) Production of n, 31st excited state",
5596  "(z,n32) Production of n, 32nd excited state",
5597  "(z,n33) Production of n, 33rd excited state",
5598  "(z,n34) Production of n, 34th excited state",
5599  "(z,n35) Production of n, 35th excited state",
5600  "(z,n36) Production of n, 36th excited state",
5601  "(z,n37) Production of n, 37th excited state",
5602  "(z,n38) Production of n, 38th excited state",
5603  "(z,n39) Production of n, 39th excited state",
5604  "(z,n40) Production of n, 40th excited state",
5605  "(z,nc) Production of n in continuum",
5606  "(n,disap) Neutron disappearance",
5607  "(z,gamma) Radiative capture",
5608  "(z,gamma0) Radiative capture, ground state",
5609  "(z,gamma1) Radiative capture, 1st excited state",
5610  "(z,gamma2) Radiative capture, 2st excited state",
5611  "(z,p) Production of p",
5612  "(z,d) Production of d",
5613  "(z,t) Production of t",
5614  "(z,3He) Production of He-3",
5615  "(z,a) Production of alpha",
5616  "(z,2a) Production of 2 alphas",
5617  "(z,3a) Production of 3 alphas",
5618  "(z,2p) Production of 2p",
5619  "(z,2p0) Production of 2p, ground state",
5620  "(z,2p1) Production of 2p, 1st excited state",
5621  "(z,2p2) Production of 2p, 2nd excited state",
5622  "(z,pa) Production of p and alpha",
5623  "(z,t2a) Production of t and 2 alphas",
5624  "(z,d2a) Production of d and 2 alphas",
5625  "(z,pd) Production of p and d",
5626  "(z,pt) Production of p and t",
5627  "(z,da) Production of d and a",
5628  "Resonance Parameters",
5629  "(z,Xn) Total neutron production",
5630  "(z,Xgamma) Total gamma production",
5631  "(z,Xp) Total proton production",
5632  "(z,Xd) Total deuteron production",
5633  "(z,Xt) Total triton production",
5634  "(z,X3He) Total He-3 production",
5635  "(z,Xa) Total alpha production",
5636  "(z,Xpi+) Total pi+ meson production",
5637  "(z,Xpi0) Total pi0 meson production",
5638  "(z,Xpi-) Total pi- meson production",
5639  "(z,Xmu+) Total anti-muon production",
5640  "(z,Xmu-) Total muon production",
5641  "(z,Xk+) Total positive kaon production",
5642  "(z,Xk0long) Total long-lived neutral kaon production",
5643  "(z,Xk0short) Total short-lived neutral kaon production",
5644  "(z,Xk-) Total negative kaon production",
5645  "(z,Xp-) Total anti-proton production",
5646  "(z,Xn-) Total anti-neutron production",
5647  "Average cosine of scattering angle",
5648  "Average logarithmic energy decrement",
5649  "Average xi^2/(2*xi)",
5650  "Energy Release from (n,total) Neutron total",
5651  "Energy Release from (z,z0) Elastic scattering",
5652  "Energy Release from (z,nonelas) Nonelastic neutron",
5653  "Energy Release from (z,n) One neutron in exit channel",
5654  "Energy Release from (z,anything) Miscellaneous",
5655  "Energy Release from (z,contin) Total continuum reaction",
5656  "Energy Release from (z,2nd) Production of 2n and d",
5657  "Energy Release from (z,2n) Production of 2n",
5658  "Energy Release from (z,3n) Production of 3n",
5659  "Energy Release from (z,fiss) Particle-induced fission",
5660  "Energy Release from (z,f) First-chance fission",
5661  "Energy Release from (z,nf) Second chance fission",
5662  "Energy Release from (z,2nf) Third-chance fission",
5663  "Energy Release from (z,na) Production of n and alpha",
5664  "Energy Release from (z,n3a) Production of n and 3 alphas",
5665  "Energy Release from (z,2na) Production of 2n and alpha",
5666  "Energy Release from (z,3na) Production of 3n and alpha",
5667  "Energy Release from (n,abs) Absorption",
5668  "Energy Release from (z,np) Production of n and p",
5669  "Energy Release from (z,n2a) Production of n and 2 alphas",
5670  "Energy Release from (z,2n2a) Production of 2n and 2 alphas",
5671  "Energy Release from (z,nd) Production of n and d",
5672  "Energy Release from (z,nt) Production of n and t",
5673  "Energy Release from (z,n3He) Production of n and He-3",
5674  "Energy Release from (z,nd2a) Production of n, d, and alpha",
5675  "Energy Release from (z,nt2a) Production of n, t, and 2 alphas",
5676  "Energy Release from (z,4n) Production of 4n",
5677  "Energy Release from (z,3nf) Fourth-chance fission",
5678  "Energy Release from (z,2np) Production of 2n and p",
5679  "Energy Release from (z,3np) Production of 3n and p",
5680  "Energy Release from (z,n2p) Production of n and 2p",
5681  "Energy Release from (z,npa) Production of n, p, and alpha",
5682  "Energy Release from (z,n0) Production of n, ground state",
5683  "Energy Release from (z,n1) Production of n, 1st excited state",
5684  "Energy Release from (z,n2) Production of n, 2nd excited state",
5685  "Energy Release from (z,n3) Production of n, 3rd excited state",
5686  "Energy Release from (z,n4) Production of n, 4th excited state",
5687  "Energy Release from (z,n5) Production of n, 5th excited state",
5688  "Energy Release from (z,n6) Production of n, 6th excited state",
5689  "Energy Release from (z,n7) Production of n, 7th excited state",
5690  "Energy Release from (z,n8) Production of n, 8th excited state",
5691  "Energy Release from (z,n9) Production of n, 9th excited state",
5692  "Energy Release from (z,n10) Production of n, 10th excited state",
5693  "Energy Release from (z,n11) Production of n, 11th excited state",
5694  "Energy Release from (z,n12) Production of n, 12th excited state",
5695  "Energy Release from (z,n13) Production of n, 13th excited state",
5696  "Energy Release from (z,n14) Production of n, 14th excited state",
5697  "Energy Release from (z,n15) Production of n, 15th excited state",
5698  "Energy Release from (z,n16) Production of n, 16th excited state",
5699  "Energy Release from (z,n17) Production of n, 17th excited state",
5700  "Energy Release from (z,n18) Production of n, 18th excited state",
5701  "Energy Release from (z,n19) Production of n, 19th excited state",
5702  "Energy Release from (z,n20) Production of n, 20th excited state",
5703  "Energy Release from (z,n21) Production of n, 21st excited state",
5704  "Energy Release from (z,n22) Production of n, 22nd excited state",
5705  "Energy Release from (z,n23) Production of n, 23rd excited state",
5706  "Energy Release from (z,n24) Production of n, 24th excited state",
5707  "Energy Release from (z,n25) Production of n, 25th excited state",
5708  "Energy Release from (z,n26) Production of n, 26th excited state",
5709  "Energy Release from (z,n27) Production of n, 27th excited state",
5710  "Energy Release from (z,n28) Production of n, 28th excited state",
5711  "Energy Release from (z,n29) Production of n, 29th excited state",
5712  "Energy Release from (z,n30) Production of n, 30th excited state",
5713  "Energy Release from (z,n31) Production of n, 31st excited state",
5714  "Energy Release from (z,n32) Production of n, 32nd excited state",
5715  "Energy Release from (z,n33) Production of n, 33rd excited state",
5716  "Energy Release from (z,n34) Production of n, 34th excited state",
5717  "Energy Release from (z,n35) Production of n, 35th excited state",
5718  "Energy Release from (z,n36) Production of n, 36th excited state",
5719  "Energy Release from (z,n37) Production of n, 37th excited state",
5720  "Energy Release from (z,n38) Production of n, 38th excited state",
5721  "Energy Release from (z,n39) Production of n, 39th excited state",
5722  "Energy Release from (z,n40) Production of n, 40th excited state",
5723  "Energy Release from (z,nc) Production of n in continuum",
5724  "Energy Release from (n,disap) Neutron disappearance",
5725  "Energy Release from (z,gamma) Radiative capture",
5726  "Energy Release from (z,p) Production of p",
5727  "Energy Release from (z,d) Production of d",
5728  "Energy Release from (z,t) Production of t",
5729  "Energy Release from (z,3He) Production of He-3",
5730  "Energy Release from (z,a) Production of alpha",
5731  "Energy Release from (z,2a) Production of 2 alphas",
5732  "Energy Release from (z,3a) Production of 3 alphas",
5733  "Energy Release from (z,2p) Production of 2p",
5734  "Energy Release from (z,pa) Production of p and alpha",
5735  "Energy Release from (z,t2a) Production of t and 2 alphas",
5736  "Energy Release from (z,d2a) Production of d and 2 alphas",
5737  "Energy Release from (z,pd) Production of p and d",
5738  "Energy Release from (z,pt) Production of p and t",
5739  "Energy Release from (z,da) Production of d and a",
5740  "(damage)",
5741  "Descriptive Data",
5742  "Total Neutrons per Fission",
5743  "Independent fission product yield",
5744  "Delayed Neutron Data",
5745  "Prompt Neutrons per Fission",
5746  "Radioactive Decay Data",
5747  "Energy Release Due to Fission",
5748  "Cumulative Fission Product Yield",
5749  "Delayed Photon Data",
5750  "Total charged-particle stopping power",
5751  "Total photon interaction",
5752  "Photon coherent scattering",
5753  "Photon incoherent scattering",
5754  "Imaginary scattering factor",
5755  "Real scattering factor",
5756  "Pair production, electron field",
5757  "Total pair production",
5758  "Pair production, nuclear field",
5759  "Photoelectric absorption",
5760  "Photo-excitation cross section",
5761  "Electro-atomic scattering",
5762  "Electro-atomic bremsstrahlung",
5763  "Electro-atomic excitation cross section",
5764  "Atomic relaxation data",
5765  "K (1s1/2) subshell",
5766  "L1 (2s1/2) subshell",
5767  "L2 (2p1/2) subshell",
5768  "L3 (2p3/2) subshell",
5769  "M1 (3s1/2) subshell",
5770  "M2 (3p1/2) subshell",
5771  "M3 (3p3/2) subshell",
5772  "M4 (3d1/2) subshell",
5773  "M5 (3d1/2) subshell",
5774  "N1 (4s1/2) subshell",
5775  "N2 (4p1/2) subshell",
5776  "N3 (4p3/2) subshell",
5777  "N4 (4d3/2) subshell",
5778  "N5 (4d5/2) subshell",
5779  "N6 (4f5/2) subshell",
5780  "N7 (4f7/2) subshell",
5781  "O1 (5s1/2) subshell",
5782  "O2 (5p1/2) subshell",
5783  "O3 (5p3/2) subshell",
5784  "O4 (5d3/2) subshell",
5785  "O5 (5d5/2) subshell",
5786  "O6 (5f5/2) subshell",
5787  "O7 (5f7/2) subshell",
5788  "O8 (5g7/2) subshell",
5789  "O9 (5g9/2) subshell",
5790  "P1 (6s1/2) subshell",
5791  "P2 (6p1/2) subshell",
5792  "P3 (6p3/2) subshell",
5793  "P4 (6d3/2) subshell",
5794  "P5 (6d5/2) subshell",
5795  "P6 (6f5/2) subshell",
5796  "P7 (6f7/2) subshell",
5797  "P8 (6g7/2) subshell",
5798  "P9 (6g9/2) subshell",
5799  "P10 (6h9/2) subshell",
5800  "P11 (6h11/2) subshell",
5801  "Q1 (7s1/2) subshell",
5802  "Q2 (7p1/2) subshell",
5803  "Q3 (7p3/2) subshell",
5804  "(n,p0)",
5805  "(n,p1)",
5806  "(n,p2)",
5807  "(n,p3)",
5808  "(n,p4)",
5809  "(n,p5)",
5810  "(n,p6)",
5811  "(n,p7)",
5812  "(n,p8)",
5813  "(n,p9)",
5814  "(n,p10)",
5815  "(n,p11)",
5816  "(n,p12)",
5817  "(n,p13)",
5818  "(n,p14)",
5819  "(n,p15)",
5820  "(n,p16)",
5821  "(n,p17)",
5822  "(n,p18)",
5823  "(n,p19)",
5824  "(n,p20)",
5825  "(n,p21)",
5826  "(n,p22)",
5827  "(n,p23)",
5828  "(n,p24)",
5829  "(n,p25)",
5830  "(n,p26)",
5831  "(n,p27)",
5832  "(n,p28)",
5833  "(n,p29)",
5834  "(n,p30)",
5835  "(n,p31)",
5836  "(n,p32)",
5837  "(n,p33)",
5838  "(n,p34)",
5839  "(n,p35)",
5840  "(n,p36)",
5841  "(n,p37)",
5842  "(n,p38)",
5843  "(n,p39)",
5844  "(n,p40)",
5845  "(n,p41)",
5846  "(n,p42)",
5847  "(n,p43)",
5848  "(n,p44)",
5849  "(n,p45)",
5850  "(n,p46)",
5851  "(n,p47)",
5852  "(n,p48)",
5853  "(n,pc)",
5854  "(n,d0)",
5855  "(n,d1)",
5856  "(n,d2)",
5857  "(n,d3)",
5858  "(n,d4)",
5859  "(n,d5)",
5860  "(n,d6)",
5861  "(n,d7)",
5862  "(n,d8)",
5863  "(n,d9)",
5864  "(n,d10)",
5865  "(n,d11)",
5866  "(n,d12)",
5867  "(n,d13)",
5868  "(n,d14)",
5869  "(n,d15)",
5870  "(n,d16)",
5871  "(n,d17)",
5872  "(n,d18)",
5873  "(n,d19)",
5874  "(n,d20)",
5875  "(n,d21)",
5876  "(n,d22)",
5877  "(n,d23)",
5878  "(n,d24)",
5879  "(n,d25)",
5880  "(n,d26)",
5881  "(n,d27)",
5882  "(n,d28)",
5883  "(n,d29)",
5884  "(n,d30)",
5885  "(n,d31)",
5886  "(n,d32)",
5887  "(n,d33)",
5888  "(n,d34)",
5889  "(n,d35)",
5890  "(n,d36)",
5891  "(n,d37)",
5892  "(n,d38)",
5893  "(n,d39)",
5894  "(n,d40)",
5895  "(n,d41)",
5896  "(n,d42)",
5897  "(n,d43)",
5898  "(n,d44)",
5899  "(n,d45)",
5900  "(n,d46)",
5901  "(n,d47)",
5902  "(n,d48)",
5903  "(n,dc)",
5904  "(z,t0)",
5905  "(z,t1)",
5906  "(z,t2)",
5907  "(z,t3)",
5908  "(z,t4)",
5909  "(z,t5)",
5910  "(z,t6)",
5911  "(z,t7)",
5912  "(z,t8)",
5913  "(z,t9)",
5914  "(z,t10)",
5915  "(z,t11)",
5916  "(z,t12)",
5917  "(z,t13)",
5918  "(z,t14)",
5919  "(z,t15)",
5920  "(z,t16)",
5921  "(z,t17)",
5922  "(z,t18)",
5923  "(z,t19)",
5924  "(z,t20)",
5925  "(z,t21)",
5926  "(z,t22)",
5927  "(z,t23)",
5928  "(z,t24)",
5929  "(z,t25)",
5930  "(z,t26)",
5931  "(z,t27)",
5932  "(z,t28)",
5933  "(z,t29)",
5934  "(z,t30)",
5935  "(z,t31)",
5936  "(z,t32)",
5937  "(z,t33)",
5938  "(z,t34)",
5939  "(z,t35)",
5940  "(z,t36)",
5941  "(z,t37)",
5942  "(z,t38)",
5943  "(z,t39)",
5944  "(z,t40)",
5945  "(z,t41)",
5946  "(z,t42)",
5947  "(z,t43)",
5948  "(z,t44)",
5949  "(z,t45)",
5950  "(z,t46)",
5951  "(z,t47)",
5952  "(z,t48)",
5953  "(n,tc)",
5954  "(n,3He0)",
5955  "(n,3He1)",
5956  "(n,3He2)",
5957  "(n,3He3)",
5958  "(n,3He4)",
5959  "(n,3He5)",
5960  "(n,3He6)",
5961  "(n,3He7)",
5962  "(n,3He8)",
5963  "(n,3He9)",
5964  "(n,3He10)",
5965  "(n,3He11)",
5966  "(n,3He12)",
5967  "(n,3He13)",
5968  "(n,3He14)",
5969  "(n,3He15)",
5970  "(n,3He16)",
5971  "(n,3He17)",
5972  "(n,3He18)",
5973  "(n,3He19)",
5974  "(n,3He20)",
5975  "(n,3He21)",
5976  "(n,3He22)",
5977  "(n,3He23)",
5978  "(n,3He24)",
5979  "(n,3He25)",
5980  "(n,3He26)",
5981  "(n,3He27)",
5982  "(n,3He28)",
5983  "(n,3He29)",
5984  "(n,3He30)",
5985  "(n,3He31)",
5986  "(n,3He32)",
5987  "(n,3He33)",
5988  "(n,3He34)",
5989  "(n,3He35)",
5990  "(n,3He36)",
5991  "(n,3He37)",
5992  "(n,3He38)",
5993  "(n,3He39)",
5994  "(n,3He40)",
5995  "(n,3He41)",
5996  "(n,3He42)",
5997  "(n,3He43)",
5998  "(n,3He44)",
5999  "(n,3He45)",
6000  "(n,3He46)",
6001  "(n,3He47)",
6002  "(n,3He48)",
6003  "(n,3Hec)",
6004  "(z,a0)",
6005  "(z,a1)",
6006  "(z,a2)",
6007  "(z,a3)",
6008  "(z,a4)",
6009  "(z,a5)",
6010  "(z,a6)",
6011  "(z,a7)",
6012  "(z,a8)",
6013  "(z,a9)",
6014  "(z,a10)",
6015  "(z,a11)",
6016  "(z,a12)",
6017  "(z,a13)",
6018  "(z,a14)",
6019  "(z,a15)",
6020  "(z,a16)",
6021  "(z,a17)",
6022  "(z,a18)",
6023  "(z,a19)",
6024  "(z,a20)",
6025  "(z,a21)",
6026  "(z,a22)",
6027  "(z,a23)",
6028  "(z,a24)",
6029  "(z,a25)",
6030  "(z,a26)",
6031  "(z,a27)",
6032  "(z,a28)",
6033  "(z,a29)",
6034  "(z,a30)",
6035  "(z,a31)",
6036  "(z,a32)",
6037  "(z,a33)",
6038  "(z,a34)",
6039  "(z,a35)",
6040  "(z,a36)",
6041  "(z,a37)",
6042  "(z,a38)",
6043  "(z,a39)",
6044  "(z,a40)",
6045  "(z,a41)",
6046  "(z,a42)",
6047  "(z,a43)",
6048  "(z,a44)",
6049  "(z,a45)",
6050  "(z,a46)",
6051  "(z,a47)",
6052  "(z,a48)",
6053  "(n,ac)",
6054  "Lumped-Reaction Covariances",
6055  "production of any excited state nucleus",
6056  "(z,b-)",
6057  "(z,b+)",
6058  "(z,ec)",
6059  "(z,b-n)",
6060  "(z,b-a)",
6061  "(z,it)",
6062  "(z,b+a)",
6063  "(z,ec+b+)",
6064  "(z,b+p)",
6065  "(z,b-2n)",
6066  "(z,b-3n)",
6067  "(z,b-4n)",
6068  "(z,ecp)",
6069  "(z,eca)",
6070  "(z,b+2p)",
6071  "(z,ec2p)",
6072  "(z,2b-)",
6073  "(z,b-p)",
6074  "(z,14c)",
6075  "(z,b+3p)",
6076  "(z,sf)",
6077  "(z,2b+)",
6078  "(z,2ec)"
6079  };
6080 
6081  // fill the maps
6082  for (int i = 0; i < NUM_RX_NAMES; i++) {
6083  rx = _names[i];
6084  rxid = pyne::rxname::hash(rx);
6085  id_name[rxid] = rx;
6086  name_id[rx] = rxid;
6087  if (0 < _mts[i]) {
6088  id_mt[rxid] = _mts[i];
6089  mt_id[_mts[i]] = rxid;
6090  }
6091  labels[rxid] = _labels[i];
6092  docs[rxid] = _docs[i];
6093  }
6094 
6095  // set alternative names
6096  altnames["tot"] = name_id["total"];
6097  altnames["s"] = name_id["scattering"];
6098  altnames["scat"] = name_id["scattering"];
6099  altnames["e"] = name_id["elastic"];
6100  altnames["elas"] = name_id["elastic"];
6101  altnames["i"] = name_id["n"];
6102  altnames["inel"] = name_id["n"];
6103  altnames["inelastic"] = name_id["n"];
6104  altnames["abs"] = name_id["absorption"];
6105  altnames["fis"] = name_id["fission"];
6106  altnames["fiss"] = name_id["fission"];
6107  altnames["alpha"] = name_id["a"];
6108  altnames["deut"] = name_id["d"];
6109  altnames["deuteron"] = name_id["d"];
6110  altnames["deuterium"] = name_id["d"];
6111  altnames["trit"] = name_id["t"];
6112  altnames["triton"] = name_id["t"];
6113  altnames["tritium"] = name_id["t"];
6114  altnames["proton"] = name_id["p"];
6115  altnames["h"] = name_id["He3"]; // 'h' stands for helion
6116  altnames["he3"] = name_id["He3"];
6117  altnames["HE3"] = name_id["He3"];
6118  altnames["3HE"] = name_id["He3"];
6119  altnames["3He"] = name_id["He3"];
6120  altnames["3he"] = name_id["He3"];
6121  altnames["he-3"] = name_id["He3"];
6122  altnames["HE-3"] = name_id["He3"];
6123  altnames["*"] = name_id["excited"];
6124  altnames["2n"] = name_id["z_2n"];
6125  altnames["2p"] = name_id["z_2p"];
6126  altnames["3h"] = name_id["t"];
6127  altnames["g"] = name_id["it"];
6128  altnames["b-"] = name_id["bminus"];
6129  altnames["b+"] = name_id["bplus"];
6130  altnames["b-n"] = name_id["bminus_n"];
6131  altnames["b-a"] = name_id["bminus_a"];
6132  altnames["b+a"] = name_id["bplus_a"];
6133  altnames["ec+b+"] = name_id["ec_bplus"];
6134  altnames["b+p"] = name_id["bplus_p"];
6135  altnames["b-2n"] = name_id["bminus_2n"];
6136  altnames["b-3n"] = name_id["bminus_3n"];
6137  altnames["b-4n"] = name_id["bminus_4n"];
6138  altnames["b+2p"] = name_id["bplus_2p"];
6139  altnames["ec2p"] = name_id["ec_2p"];
6140  altnames["2b-"] = name_id["decay_2bminus"];
6141  altnames["b-p"] = name_id["bminus_p"];
6142  altnames["14c"] = name_id["decay_14c"];
6143  altnames["b+3p"] = name_id["bplus_3p"];
6144  altnames["2b+"] = name_id["decay_2bplus"];
6145  altnames["2ec"] = name_id["decay_2ec"];
6146 
6147 
6148  // set the nuclide difference mappings, offset_id
6149  // offset_id[incident particle type "n", "p", ...][delta Z num][delta A num][rxid]
6150  // offset_id mapping may be ambiquious so they must come before the id_offsets!
6151  // the following should be sorted by (dz, da, ds)
6152  // neutrons:
6153  offset_id[make_pair("n", offset(-4, -8))] = name_id["n2a"];
6154  offset_id[make_pair("n", offset(-4, -7))] = name_id["z_2a"];
6155  offset_id[make_pair("n", offset(-2, -5))] = name_id["z_2na"];
6156  offset_id[make_pair("n", offset(-2, -4))] = name_id["na"];
6157  offset_id[make_pair("n", offset(-2, -4, 1))] = name_id["na_1"];
6158  offset_id[make_pair("n", offset(-2, -4, 2))] = name_id["na_2"];
6159  offset_id[make_pair("n", offset(-2, -3))] = name_id["a"];
6160  offset_id[make_pair("n", offset(-2, -3, 1))] = name_id["a_1"];
6161  offset_id[make_pair("n", offset(-2, -3, 2))] = name_id["a_2"];
6162  offset_id[make_pair("n", offset(-2, -2))] = name_id["He3"];
6163  offset_id[make_pair("n", offset(-2, -2, 1))] = name_id["He3_1"];
6164  offset_id[make_pair("n", offset(-2, -2, 2))] = name_id["He3_2"];
6165  offset_id[make_pair("n", offset(-2, -1))] = name_id["z_2p"];
6166  offset_id[make_pair("n", offset(-2, -1, 1))] = name_id["z_2p_1"];
6167  offset_id[make_pair("n", offset(-2, -1, 2))] = name_id["z_2p_2"];
6168  offset_id[make_pair("n", offset(-1, -3))] = name_id["nt"];
6169  offset_id[make_pair("n", offset(-1, -3, 1))] = name_id["nt_1"];
6170  offset_id[make_pair("n", offset(-1, -3, 2))] = name_id["nt_2"];
6171  offset_id[make_pair("n", offset(-1, -2))] = name_id["t"];
6172  offset_id[make_pair("n", offset(-1, -2, 1))] = name_id["t_1"];
6173  offset_id[make_pair("n", offset(-1, -2, 2))] = name_id["t_2"];
6174  offset_id[make_pair("n", offset(-1, -1))] = name_id["d"];
6175  offset_id[make_pair("n", offset(-1, -1, 1))] = name_id["d_1"];
6176  offset_id[make_pair("n", offset(-1, -1, 2))] = name_id["d_2"];
6177  offset_id[make_pair("n", offset(-1, 0))] = name_id["p"];
6178  offset_id[make_pair("n", offset(-1, 0, 1))] = name_id["p_1"];
6179  offset_id[make_pair("n", offset(-1, 0, 2))] = name_id["p_2"];
6180  offset_id[make_pair("n", offset(0, -3))] = name_id["z_4n"];
6181  offset_id[make_pair("n", offset(0, -3, 1))] = name_id["z_4n_1"];
6182  offset_id[make_pair("n", offset(0, -2))] = name_id["z_3n"];
6183  offset_id[make_pair("n", offset(0, -2, 1))] = name_id["z_3n_1"];
6184  offset_id[make_pair("n", offset(0, -2, 2))] = name_id["z_3n_2"];
6185  offset_id[make_pair("n", offset(0, -1))] = name_id["z_2n"];
6186  offset_id[make_pair("n", offset(0, -1, 1))] = name_id["z_2n_1"];
6187  offset_id[make_pair("n", offset(0, -1, 2))] = name_id["z_2n_2"];
6188  offset_id[make_pair("n", offset(0, 0))] = name_id["scattering"];
6189  offset_id[make_pair("n", offset(0, 0, 1))] = name_id["n_1"];
6190  offset_id[make_pair("n", offset(0, 0, 2))] = name_id["n_2"];
6191  offset_id[make_pair("n", offset(0, 1))] = name_id["absorption"];
6192  offset_id[make_pair("n", offset(0, 1, 1))] = name_id["gamma_1"];
6193  offset_id[make_pair("n", offset(0, 1, 2))] = name_id["gamma_2"];
6194  // proton:
6195  offset_id[make_pair("p", offset(0, 0))] = name_id["scattering"];
6196  offset_id[make_pair("p", offset(1, 1))] = name_id["absorption"];
6197  offset_id[make_pair("p", offset(1, 0))] = name_id["n"];
6198  offset_id[make_pair("p", offset(1, -1))] = name_id["z_2n"];
6199  offset_id[make_pair("p", offset(1, -2))] = name_id["z_3n"];
6200  offset_id[make_pair("p", offset(1, -3))] = name_id["z_4n"];
6201  offset_id[make_pair("p", offset(-1, -1))] = name_id["z_2p"];
6202  offset_id[make_pair("p", offset(0, -1))] = name_id["d"];
6203  offset_id[make_pair("p", offset(0, -2))] = name_id["t"];
6204  offset_id[make_pair("p", offset(-1, -2))] = name_id["He3"];
6205  offset_id[make_pair("p", offset(-1, -3))] = name_id["a"];
6206  // deuterium:
6207  offset_id[make_pair("d", offset(0, 0))] = name_id["scattering"];
6208  offset_id[make_pair("d", offset(1, 2))] = name_id["absorption"];
6209  offset_id[make_pair("d", offset(1, 1))] = name_id["n"];
6210  offset_id[make_pair("d", offset(1, 0))] = name_id["z_2n"];
6211  offset_id[make_pair("d", offset(1, -1))] = name_id["z_3n"];
6212  offset_id[make_pair("d", offset(1, -2))] = name_id["z_4n"];
6213  offset_id[make_pair("d", offset(0, 1))] = name_id["p"];
6214  offset_id[make_pair("d", offset(-1, 0))] = name_id["z_2p"];
6215  offset_id[make_pair("d", offset(0, -1))] = name_id["t"];
6216  offset_id[make_pair("d", offset(-1, -1))] = name_id["He3"];
6217  offset_id[make_pair("d", offset(-1, -2))] = name_id["a"];
6218  // tritium:
6219  offset_id[make_pair("t", offset(0, 0))] = name_id["scattering"];
6220  offset_id[make_pair("t", offset(1, 3))] = name_id["absorption"];
6221  offset_id[make_pair("t", offset(1, 2))] = name_id["n"];
6222  offset_id[make_pair("t", offset(1, 1))] = name_id["z_2n"];
6223  offset_id[make_pair("t", offset(1, 0))] = name_id["z_3n"];
6224  offset_id[make_pair("t", offset(1, -1))] = name_id["z_4n"];
6225  offset_id[make_pair("t", offset(0, 2))] = name_id["p"];
6226  offset_id[make_pair("t", offset(-1, 1))] = name_id["z_2p"];
6227  offset_id[make_pair("t", offset(0, 1))] = name_id["d"];
6228  offset_id[make_pair("t", offset(-1, 0))] = name_id["He3"];
6229  offset_id[make_pair("t", offset(-1, -1))] = name_id["a"];
6230  // He3:
6231  offset_id[make_pair("He3", offset(0, 0))] = name_id["scattering"];
6232  offset_id[make_pair("He3", offset(2, 3))] = name_id["absorption"];
6233  offset_id[make_pair("He3", offset(2, 2))] = name_id["n"];
6234  offset_id[make_pair("He3", offset(2, 1))] = name_id["z_2n"];
6235  offset_id[make_pair("He3", offset(2, 0))] = name_id["z_3n"];
6236  offset_id[make_pair("He3", offset(2, -1))] = name_id["z_4n"];
6237  offset_id[make_pair("He3", offset(1, 2))] = name_id["p"];
6238  offset_id[make_pair("He3", offset(0, 1))] = name_id["z_2p"];
6239  offset_id[make_pair("He3", offset(1, 1))] = name_id["d"];
6240  offset_id[make_pair("He3", offset(1, 0))] = name_id["t"];
6241  offset_id[make_pair("He3", offset(0, -1))] = name_id["a"];
6242  // alpha:
6243  offset_id[make_pair("a", offset(0, 0))] = name_id["scattering"];
6244  offset_id[make_pair("a", offset(2, 4))] = name_id["absorption"];
6245  offset_id[make_pair("a", offset(2, 3))] = name_id["n"];
6246  offset_id[make_pair("a", offset(2, 2))] = name_id["z_2n"];
6247  offset_id[make_pair("a", offset(2, 1))] = name_id["z_3n"];
6248  offset_id[make_pair("a", offset(2, 0))] = name_id["z_4n"];
6249  offset_id[make_pair("a", offset(1, 3))] = name_id["p"];
6250  offset_id[make_pair("a", offset(0, 2))] = name_id["z_2p"];
6251  offset_id[make_pair("a", offset(1, 2))] = name_id["d"];
6252  offset_id[make_pair("a", offset(1, 1))] = name_id["t"];
6253  offset_id[make_pair("a", offset(0, 1))] = name_id["He3"];
6254  // gamma:
6255  offset_id[make_pair("gamma", offset(0, -1))] = name_id["n"];
6256  offset_id[make_pair("gamma", offset(0, -2))] = name_id["z_2n"];
6257  offset_id[make_pair("gamma", offset(0, -3))] = name_id["z_3n"];
6258  offset_id[make_pair("gamma", offset(0, -4))] = name_id["z_4n"];
6259  offset_id[make_pair("gamma", offset(-1, -1))] = name_id["p"];
6260  offset_id[make_pair("gamma", offset(-2, -2))] = name_id["z_2p"];
6261  offset_id[make_pair("gamma", offset(-1, -2))] = name_id["d"];
6262  offset_id[make_pair("gamma", offset(-1, -3))] = name_id["t"];
6263  offset_id[make_pair("gamma", offset(-2, -3))] = name_id["He3"];
6264  offset_id[make_pair("gamma", offset(-2, -4))] = name_id["a"];
6265  // decay:
6266  offset_id[make_pair("decay", offset(0, -1))] = name_id["n"];
6267  offset_id[make_pair("decay", offset(0, -2))] = name_id["z_2n"];
6268  offset_id[make_pair("decay", offset(0, -3))] = name_id["z_3n"];
6269  offset_id[make_pair("decay", offset(0, -4))] = name_id["z_4n"];
6270  offset_id[make_pair("decay", offset(-1, -1))] = name_id["p"];
6271  offset_id[make_pair("decay", offset(-2, -2))] = name_id["z_2p"];
6272  offset_id[make_pair("decay", offset(-1, -2))] = name_id["d"];
6273  offset_id[make_pair("decay", offset(-1, -3))] = name_id["t"];
6274  offset_id[make_pair("decay", offset(-2, -3))] = name_id["He3"];
6275  offset_id[make_pair("decay", offset(-2, -4))] = name_id["a"];
6276  offset_id[make_pair("decay", offset(1, 0))] = name_id["bminus"];
6277  offset_id[make_pair("decay", offset(-1, 0))] = name_id["bplus"];
6278  offset_id[make_pair("decay", offset(1, -1))] = name_id["bminus_n"];
6279  offset_id[make_pair("decay", offset(-1, -4))] = name_id["bminus_a"];
6280  offset_id[make_pair("decay", offset(0, 0))] = name_id["it"];
6281  offset_id[make_pair("decay", offset(-3, -4))] = name_id["bplus_a"];
6282  offset_id[make_pair("decay", offset(-2, -1))] = name_id["bplus_p"];
6283  offset_id[make_pair("decay", offset(1, -2))] = name_id["bminus_2n"];
6284  offset_id[make_pair("decay", offset(1, -3))] = name_id["bminus_3n"];
6285  offset_id[make_pair("decay", offset(1, -4))] = name_id["bminus_4n"];
6286  offset_id[make_pair("decay", offset(-3, -2))] = name_id["bplus_2p"];
6287  offset_id[make_pair("decay", offset(-4, -3))] = name_id["bplus_3p"];
6288  offset_id[make_pair("decay", offset(2, 0))] = name_id["decay_2bminus"];
6289  offset_id[make_pair("decay", offset(-2, 0))] = name_id["decay_2bplus"];
6290  offset_id[make_pair("decay", offset(-6, -14))] = name_id["decay_14c"];
6291 
6292  // pre-loaded child offsets
6293  std::map<std::pair<std::string, int>, unsigned int>::iterator ioffid;
6294  for (ioffid = offset_id.begin(); ioffid != offset_id.end(); ioffid++) {
6295  id_offset[make_pair(ioffid->first.first, ioffid->second)] = ioffid->first.second;
6296  }
6297  // neutrons:
6298  id_offset[make_pair("n", name_id["nHe3"])] = offset(-2, -3);
6299  id_offset[make_pair("n", name_id["nHe3_1"])] = offset(-2, -3, 2);
6300  id_offset[make_pair("n", name_id["nHe3_2"])] = offset(-2, -3, 2);
6301  id_offset[make_pair("n", name_id["z_3np"])] = offset(-1, -3);
6302  id_offset[make_pair("n", name_id["nd"])] = offset(-1, -2);
6303  id_offset[make_pair("n", name_id["nd_1"])] = offset(-1, -2, 1);
6304  id_offset[make_pair("n", name_id["nd_2"])] = offset(-1, -2, 2);
6305  id_offset[make_pair("n", name_id["np"])] = offset(-1, -1);
6306  id_offset[make_pair("n", name_id["np_1"])] = offset(-1, -1, 1);
6307  id_offset[make_pair("n", name_id["np_2"])] = offset(-1, -1, 2);
6308  id_offset[make_pair("n", name_id["n"])] = offset(0, 0);
6309  id_offset[make_pair("n", name_id["gamma"])] = offset(0, 1);
6310  // decay:
6311  id_offset[make_pair("decay", name_id["bminus_p"])] = offset(0, -1);
6312  id_offset[make_pair("decay", name_id["ec_2p"])] = offset(-3, -2);
6313  id_offset[make_pair("decay", name_id["ec"])] = offset(-1, 0);
6314  id_offset[make_pair("decay", name_id["ec_bplus"])] = offset(-1, 0);
6315  id_offset[make_pair("decay", name_id["ecp"])] = offset(-2, -1);
6316  id_offset[make_pair("decay", name_id["eca"])] = offset(-3, -4);
6317  id_offset[make_pair("decay", name_id["decay_2ec"])] = offset(-2, 0);
6318  return NULL;
6319 }
6321 
6322 
6323 unsigned int pyne::rxname::hash(std::string s) {
6324  return pyne::rxname::hash(s.c_str());
6325 }
6326 
6327 unsigned int pyne::rxname::hash(const char * s) {
6328  // Modified from http://cboard.cprogramming.com/tech-board/114650-string-hashing-algorithm.html#post853145
6329  // starting from h = 32*2^5 > 1000, rather than 0, to reserve space for MT numbers
6330  int c;
6331  unsigned int h = 32;
6332  while((c = *s++)) {
6333  h = ((h << 5) + h) ^ c;
6334  }
6335  return h;
6336 }
6337 
6338 
6339 // ************************
6340 // *** name functions *****
6341 // ************************
6342 
6343 std::string pyne::rxname::name(char * s) {
6344  return pyne::rxname::name(std::string(s));
6345 }
6346 
6347 std::string pyne::rxname::name(std::string s) {
6348  if (0 < names.count(s))
6349  return s;
6350  if (0 < altnames.count(s))
6351  return id_name[altnames[s]];
6352  // see if id in string form
6353  int i = 0;
6354  int I = s.length();
6355  int found = 0;
6356  while(0 <= found && i < I) {
6357  found = pyne::digits.find(s[i]);
6358  i++;
6359  }
6360  if (0<=found)
6361  return pyne::rxname::name(atoi(s.c_str()));
6362  // dead...
6363  throw NotAReaction(s, "???");
6364 }
6365 
6366 
6367 std::string pyne::rxname::name(int n) {
6368  return pyne::rxname::name((unsigned int) n);
6369 }
6370 
6371 std::string pyne::rxname::name(unsigned int n) {
6372  if (0 < id_name.count(n))
6373  return id_name[n];
6374  if (0 < mt_id.count(n))
6375  return id_name[mt_id[n]];
6376  throw NotAReaction(n, "???");
6377 }
6378 
6379 
6380 std::string pyne::rxname::name(int from_nuc, int to_nuc, std::string z) {
6381  // This assumes nuclides are in id form
6382  std::pair<std::string, int> key = std::make_pair(z, to_nuc - from_nuc);
6383  if (0 == offset_id.count(key))
6384  throw IndeterminateReactionForm("z=" + z + ", " + pyne::to_str(from_nuc) + \
6385  ", " + pyne::to_str(to_nuc), "???");
6386  return id_name[offset_id[key]];
6387 }
6388 
6389 std::string pyne::rxname::name(std::string from_nuc, int to_nuc, std::string z) {
6390  return pyne::rxname::name(pyne::nucname::id(from_nuc),
6391  pyne::nucname::id(to_nuc), z);
6392 }
6393 
6394 std::string pyne::rxname::name(int from_nuc, std::string to_nuc, std::string z) {
6395  return pyne::rxname::name(pyne::nucname::id(from_nuc),
6396  pyne::nucname::id(to_nuc), z);
6397 }
6398 
6399 std::string pyne::rxname::name(std::string from_nuc, std::string to_nuc, std::string z) {
6400  return pyne::rxname::name(pyne::nucname::id(from_nuc),
6401  pyne::nucname::id(to_nuc), z);
6402 }
6403 
6404 
6405 
6406 // **********************
6407 // *** id functions *****
6408 // **********************
6409 unsigned int pyne::rxname::id(int x) {
6410  return name_id[pyne::rxname::name(x)];
6411 }
6412 
6413 unsigned int pyne::rxname::id(unsigned int x) {
6414  if (0 < id_name.count(x))
6415  return x;
6416  if (0 < mt_id.count(x))
6417  return mt_id[x];
6418  return name_id[pyne::rxname::name(x)];
6419 }
6420 
6421 unsigned int pyne::rxname::id(const char * x) {
6422  return name_id[pyne::rxname::name(x)];
6423 }
6424 
6425 unsigned int pyne::rxname::id(std::string x) {
6426  if (0 < names.count(x))
6427  return name_id[x];
6428  if (0 < altnames.count(x))
6429  return altnames[x];
6430  return name_id[pyne::rxname::name(x)];
6431 }
6432 
6433 unsigned int pyne::rxname::id(int from_nuc, int to_nuc, std::string z) {
6434  // This assumes nuclides are in id form
6435  std::pair<std::string, int> key = std::make_pair(z, to_nuc - from_nuc);
6436  if (0 == offset_id.count(key))
6437  throw IndeterminateReactionForm("z=" + z + ", " + pyne::to_str(from_nuc) + \
6438  ", " + pyne::to_str(to_nuc), "???");
6439  return offset_id[key];
6440 }
6441 
6442 unsigned int pyne::rxname::id(int from_nuc, std::string to_nuc, std::string z) {
6443  return pyne::rxname::id(pyne::nucname::id(from_nuc),
6444  pyne::nucname::id(to_nuc), z);
6445 }
6446 
6447 unsigned int pyne::rxname::id(std::string from_nuc, int to_nuc, std::string z) {
6448  return pyne::rxname::id(pyne::nucname::id(from_nuc),
6449  pyne::nucname::id(to_nuc), z);
6450 }
6451 
6452 unsigned int pyne::rxname::id(std::string from_nuc, std::string to_nuc, std::string z) {
6453  return pyne::rxname::id(pyne::nucname::id(from_nuc),
6454  pyne::nucname::id(to_nuc), z);
6455 }
6456 
6457 
6458 // **********************
6459 // *** MT functions *****
6460 // **********************
6461 unsigned int pyne::rxname::mt(int x) {
6462  unsigned int rxid = pyne::rxname::id(x);
6463  if (0 == id_mt.count(rxid))
6464  throw NotAReaction();
6465  return id_mt[rxid];
6466 }
6467 
6468 unsigned int pyne::rxname::mt(unsigned int x) {
6469  unsigned int rxid = pyne::rxname::id(x);
6470  if (0 == id_mt.count(rxid))
6471  throw NotAReaction();
6472  return id_mt[rxid];
6473 }
6474 
6475 unsigned int pyne::rxname::mt(char * x) {
6476  unsigned int rxid = pyne::rxname::id(x);
6477  if (0 == id_mt.count(rxid))
6478  throw NotAReaction();
6479  return id_mt[rxid];
6480 }
6481 
6482 unsigned int pyne::rxname::mt(std::string x) {
6483  unsigned int rxid = pyne::rxname::id(x);
6484  if (0 == id_mt.count(rxid))
6485  throw NotAReaction();
6486  return id_mt[rxid];
6487 }
6488 
6489 unsigned int pyne::rxname::mt(int from_nuc, int to_nuc, std::string z) {
6490  unsigned int rxid = pyne::rxname::id(from_nuc, to_nuc, z);
6491  if (0 == id_mt.count(rxid))
6492  throw NotAReaction();
6493  return id_mt[rxid];
6494 }
6495 
6496 unsigned int pyne::rxname::mt(int from_nuc, std::string to_nuc, std::string z) {
6497  unsigned int rxid = pyne::rxname::id(from_nuc, to_nuc, z);
6498  if (0 == id_mt.count(rxid))
6499  throw NotAReaction();
6500  return id_mt[rxid];
6501 }
6502 
6503 unsigned int pyne::rxname::mt(std::string from_nuc, int to_nuc, std::string z) {
6504  unsigned int rxid = pyne::rxname::id(from_nuc, to_nuc, z);
6505  if (0 == id_mt.count(rxid))
6506  throw NotAReaction();
6507  return id_mt[rxid];
6508 }
6509 
6510 unsigned int pyne::rxname::mt(std::string from_nuc, std::string to_nuc, std::string z) {
6511  unsigned int rxid = pyne::rxname::id(from_nuc, to_nuc, z);
6512  if (0 == id_mt.count(rxid))
6513  throw NotAReaction();
6514  return id_mt[rxid];
6515 }
6516 
6517 
6518 // ***********************
6519 // *** label functions ***
6520 // ***********************
6521 std::string pyne::rxname::label(int x) {
6522  return labels[pyne::rxname::id(x)];
6523 }
6524 
6525 std::string pyne::rxname::label(unsigned int x) {
6526  return labels[pyne::rxname::id(x)];
6527 }
6528 
6529 std::string pyne::rxname::label(char * x) {
6530  return labels[pyne::rxname::id(x)];
6531 }
6532 
6533 std::string pyne::rxname::label(std::string x) {
6534  return labels[pyne::rxname::id(x)];
6535 }
6536 
6537 std::string pyne::rxname::label(int from_nuc, int to_nuc, std::string z) {
6538  return labels[pyne::rxname::id(from_nuc, to_nuc, z)];
6539 }
6540 
6541 std::string pyne::rxname::label(int from_nuc, std::string to_nuc, std::string z) {
6542  return labels[pyne::rxname::id(from_nuc, to_nuc, z)];
6543 }
6544 
6545 std::string pyne::rxname::label(std::string from_nuc, int to_nuc, std::string z) {
6546  return labels[pyne::rxname::id(from_nuc, to_nuc, z)];
6547 }
6548 
6549 std::string pyne::rxname::label(std::string from_nuc, std::string to_nuc, std::string z) {
6550  return labels[pyne::rxname::id(from_nuc, to_nuc, z)];
6551 }
6552 
6553 
6554 // *********************
6555 // *** doc functions ***
6556 // *********************
6557 std::string pyne::rxname::doc(int x) {
6558  return docs[pyne::rxname::id(x)];
6559 }
6560 
6561 std::string pyne::rxname::doc(unsigned int x) {
6562  return docs[pyne::rxname::id(x)];
6563 }
6564 
6565 std::string pyne::rxname::doc(char * x) {
6566  return docs[pyne::rxname::id(x)];
6567 }
6568 
6569 std::string pyne::rxname::doc(std::string x) {
6570  return docs[pyne::rxname::id(x)];
6571 }
6572 
6573 std::string pyne::rxname::doc(int from_nuc, int to_nuc, std::string z) {
6574  return docs[pyne::rxname::id(from_nuc, to_nuc, z)];
6575 }
6576 
6577 std::string pyne::rxname::doc(int from_nuc, std::string to_nuc, std::string z) {
6578  return docs[pyne::rxname::id(from_nuc, to_nuc, z)];
6579 }
6580 
6581 std::string pyne::rxname::doc(std::string from_nuc, int to_nuc, std::string z) {
6582  return docs[pyne::rxname::id(from_nuc, to_nuc, z)];
6583 }
6584 
6585 std::string pyne::rxname::doc(std::string from_nuc, std::string to_nuc, std::string z) {
6586  return docs[pyne::rxname::id(from_nuc, to_nuc, z)];
6587 }
6588 
6589 
6590 // ***********************
6591 // *** child functions ***
6592 // ***********************
6593 
6594 int pyne::rxname::child(int nuc, unsigned int rx, std::string z) {
6595  // This assumes nuclides are in id form
6596  std::pair<std::string, unsigned int> key = std::make_pair(z, rx);
6597  if (0 == id_offset.count(key))
6598  throw IndeterminateReactionForm("z=" + z + ", rx=" + pyne::to_str(rx), "???");
6599  int to_nuc = nuc + id_offset[key];
6600  if (!pyne::nucname::isnuclide(to_nuc))
6601  throw pyne::nucname::NotANuclide(nuc, to_nuc);
6602  return to_nuc;
6603 }
6604 
6605 int pyne::rxname::child(int nuc, std::string rx, std::string z) {
6606  return child(nuc, id(rx), z);
6607 }
6608 
6609 int pyne::rxname::child(std::string nuc, unsigned int rx, std::string z) {
6610  return child(pyne::nucname::id(nuc), rx, z);
6611 }
6612 
6613 int pyne::rxname::child(std::string nuc, std::string rx, std::string z) {
6614  return child(pyne::nucname::id(nuc), id(rx), z);
6615 }
6616 
6617 // ************************
6618 // *** parent functions ***
6619 // ************************
6620 
6621 int pyne::rxname::parent(int nuc, unsigned int rx, std::string z) {
6622  // This assumes nuclides are in id form
6623  std::pair<std::string, unsigned int> key = std::make_pair(z, rx);
6624  if (0 == id_offset.count(key))
6625  throw IndeterminateReactionForm("z=" + z + ", rx=" + pyne::to_str(rx), "???");
6626  int from_nuc = nuc - id_offset[key];
6627  if (!pyne::nucname::isnuclide(from_nuc))
6628  throw pyne::nucname::NotANuclide(from_nuc, nuc);
6629  return from_nuc;
6630 }
6631 
6632 int pyne::rxname::parent(int nuc, std::string rx, std::string z) {
6633  return parent(nuc, id(rx), z);
6634 }
6635 
6636 int pyne::rxname::parent(std::string nuc, unsigned int rx, std::string z) {
6637  return parent(pyne::nucname::id(nuc), rx, z);
6638 }
6639 
6640 int pyne::rxname::parent(std::string nuc, std::string rx, std::string z) {
6641  return parent(pyne::nucname::id(nuc), id(rx), z);
6642 }
6643 
6644 //
6645 // end of src/rxname.cpp
6646 //
6647 
6648 
6649 //
6650 // start of src/_atomic_data.cpp
6651 //
6652 // Implements basic nuclear data functions.
6653 #ifndef PYNE_IS_AMALGAMATED
6654  #include "atomic_data.h"
6655  #include "nucname.h"
6656 #endif
6657 
6659  // header version of atomic weight table data
6660  //see if the data table is already loaded
6661  if(!atomic_mass_map.empty()) {
6662  return;
6663  } else {
6665  }
6666  //see if the data table is already loaded
6667  if(!natural_abund_map.empty()) {
6668  return;
6669  } else {
6671  }
6672 
6673  // calculate the atomic_masses of the elements
6674  std::map<int,double> :: iterator it;
6675 
6676  for (int z=1; z<= 92; z++) {
6677  // loop through the natural abundance map
6678  double element_atomic_weight = 0.0;
6679  for (it = natural_abund_map.begin(); it != natural_abund_map.end(); ++it){
6680  // if the atomic number of the abudance matches the
6681  // that of index
6682  if(pyne::nucname::znum(it->first) == z) {
6683  // take atomic abundance and multiply by mass
6684  // to get the mass of that nuclide / 100 since abundance is in %
6685  element_atomic_weight += (it->second*atomic_mass_map[it->first]/100.0);
6686  }
6687  }
6688  // insert the abundance of the element into the list
6689  atomic_mass_map[z*10000000] = element_atomic_weight;
6690  }
6691 }
6692 
6694  atomic_mass_map[10010000] = 1.00782503223;
6695  atomic_mass_map[10020000] = 2.01410177812;
6696  atomic_mass_map[10030000] = 3.01604927791;
6697  atomic_mass_map[20030000] = 3.01602932008;
6698  atomic_mass_map[30030000] = 3.030775;
6699  atomic_mass_map[10040000] = 4.026431864;
6700  atomic_mass_map[20040000] = 4.00260325413;
6701  atomic_mass_map[30040000] = 4.027185559;
6702  atomic_mass_map[10050000] = 5.035311489;
6703  atomic_mass_map[20050000] = 5.012057224;
6704  atomic_mass_map[30050000] = 5.0125378;
6705  atomic_mass_map[40050000] = 5.03987;
6706  atomic_mass_map[10060000] = 6.044955433;
6707  atomic_mass_map[20060000] = 6.018885891;
6708  atomic_mass_map[30060000] = 6.01512288742;
6709  atomic_mass_map[40060000] = 6.019726411;
6710  atomic_mass_map[50060000] = 6.0508;
6711  atomic_mass_map[10070000] = 7.052749;
6712  atomic_mass_map[20070000] = 7.027990654;
6713  atomic_mass_map[30070000] = 7.01600343659;
6714  atomic_mass_map[40070000] = 7.016928717;
6715  atomic_mass_map[50070000] = 7.029712;
6716  atomic_mass_map[20080000] = 8.03393439;
6717  atomic_mass_map[30080000] = 8.022486246;
6718  atomic_mass_map[40080000] = 8.005305102;
6719  atomic_mass_map[50080000] = 8.024607326;
6720  atomic_mass_map[60080000] = 8.037643042;
6721  atomic_mass_map[20090000] = 9.043946494;
6722  atomic_mass_map[30090000] = 9.026790191;
6723  atomic_mass_map[40090000] = 9.012183065;
6724  atomic_mass_map[50090000] = 9.013329649;
6725  atomic_mass_map[60090000] = 9.031037204;
6726  atomic_mass_map[20100000] = 10.052788655;
6727  atomic_mass_map[30100000] = 10.035483453;
6728  atomic_mass_map[40100000] = 10.013534695;
6729  atomic_mass_map[50100000] = 10.012936949;
6730  atomic_mass_map[60100000] = 10.016853307;
6731  atomic_mass_map[70100000] = 10.04165363;
6732  atomic_mass_map[30110000] = 11.043723581;
6733  atomic_mass_map[40110000] = 11.021661081;
6734  atomic_mass_map[50110000] = 11.009305355;
6735  atomic_mass_map[60110000] = 11.011433563;
6736  atomic_mass_map[70110000] = 11.026091034;
6737  atomic_mass_map[30120000] = 12.052517322;
6738  atomic_mass_map[40120000] = 12.026922082;
6739  atomic_mass_map[50120000] = 12.014352658;
6740  atomic_mass_map[60120000] = 12.0;
6741  atomic_mass_map[70120000] = 12.018613187;
6742  atomic_mass_map[80120000] = 12.034261836;
6743  atomic_mass_map[30130000] = 13.062631523;
6744  atomic_mass_map[40130000] = 13.036134506;
6745  atomic_mass_map[50130000] = 13.017780166;
6746  atomic_mass_map[60130000] = 13.0033548351;
6747  atomic_mass_map[70130000] = 13.005738609;
6748  atomic_mass_map[80130000] = 13.024815446;
6749  atomic_mass_map[40140000] = 14.04289292;
6750  atomic_mass_map[50140000] = 14.025404012;
6751  atomic_mass_map[60140000] = 14.0032419884;
6752  atomic_mass_map[70140000] = 14.0030740044;
6753  atomic_mass_map[80140000] = 14.008596359;
6754  atomic_mass_map[90140000] = 14.034315207;
6755  atomic_mass_map[40150000] = 15.05342;
6756  atomic_mass_map[50150000] = 15.03108768;
6757  atomic_mass_map[60150000] = 15.010599256;
6758  atomic_mass_map[70150000] = 15.0001088989;
6759  atomic_mass_map[80150000] = 15.003065618;
6760  atomic_mass_map[90150000] = 15.018042853;
6761  atomic_mass_map[40160000] = 16.061672036;
6762  atomic_mass_map[50160000] = 16.039841663;
6763  atomic_mass_map[60160000] = 16.014701252;
6764  atomic_mass_map[70160000] = 16.006101925;
6765  atomic_mass_map[80160000] = 15.9949146196;
6766  atomic_mass_map[90160000] = 16.011465725;
6767  atomic_mass_map[100160000] = 16.025750197;
6768  atomic_mass_map[50170000] = 17.046989906;
6769  atomic_mass_map[60170000] = 17.02257747;
6770  atomic_mass_map[70170000] = 17.008448873;
6771  atomic_mass_map[80170000] = 16.9991317565;
6772  atomic_mass_map[90170000] = 17.002095237;
6773  atomic_mass_map[100170000] = 17.017713963;
6774  atomic_mass_map[50180000] = 18.055660189;
6775  atomic_mass_map[60180000] = 18.026750708;
6776  atomic_mass_map[70180000] = 18.014077565;
6777  atomic_mass_map[80180000] = 17.9991596129;
6778  atomic_mass_map[90180000] = 18.000937325;
6779  atomic_mass_map[100180000] = 18.005708703;
6780  atomic_mass_map[110180000] = 18.026878252;
6781  atomic_mass_map[50190000] = 19.0631;
6782  atomic_mass_map[60190000] = 19.034796372;
6783  atomic_mass_map[70190000] = 19.017021603;
6784  atomic_mass_map[80190000] = 19.00357797;
6785  atomic_mass_map[90190000] = 18.9984031627;
6786  atomic_mass_map[100190000] = 19.001880907;
6787  atomic_mass_map[110190000] = 19.013880272;
6788  atomic_mass_map[120190000] = 19.034169186;
6789  atomic_mass_map[50200000] = 20.07207;
6790  atomic_mass_map[60200000] = 20.040319754;
6791  atomic_mass_map[70200000] = 20.023365807;
6792  atomic_mass_map[80200000] = 20.004075354;
6793  atomic_mass_map[90200000] = 19.999981252;
6794  atomic_mass_map[100200000] = 19.9924401762;
6795  atomic_mass_map[110200000] = 20.007354426;
6796  atomic_mass_map[120200000] = 20.018850004;
6797  atomic_mass_map[50210000] = 21.08129;
6798  atomic_mass_map[60210000] = 21.049;
6799  atomic_mass_map[70210000] = 21.02710824;
6800  atomic_mass_map[80210000] = 21.008654813;
6801  atomic_mass_map[90210000] = 20.999948889;
6802  atomic_mass_map[100210000] = 20.993846685;
6803  atomic_mass_map[110210000] = 20.997654695;
6804  atomic_mass_map[120210000] = 21.01171614;
6805  atomic_mass_map[130210000] = 21.028975;
6806  atomic_mass_map[60220000] = 22.057531496;
6807  atomic_mass_map[70220000] = 22.034394934;
6808  atomic_mass_map[80220000] = 22.009966057;
6809  atomic_mass_map[90220000] = 22.002998813;
6810  atomic_mass_map[100220000] = 21.991385114;
6811  atomic_mass_map[110220000] = 21.994437411;
6812  atomic_mass_map[120220000] = 21.999570648;
6813  atomic_mass_map[130220000] = 22.01954;
6814  atomic_mass_map[140220000] = 22.03579;
6815  atomic_mass_map[60230000] = 23.06889;
6816  atomic_mass_map[70230000] = 23.04114;
6817  atomic_mass_map[80230000] = 23.015695922;
6818  atomic_mass_map[90230000] = 23.003556696;
6819  atomic_mass_map[100230000] = 22.994466905;
6820  atomic_mass_map[110230000] = 22.989769282;
6821  atomic_mass_map[120230000] = 22.994124208;
6822  atomic_mass_map[130230000] = 23.007244351;
6823  atomic_mass_map[140230000] = 23.02544;
6824  atomic_mass_map[70240000] = 24.05039;
6825  atomic_mass_map[80240000] = 24.019861;
6826  atomic_mass_map[90240000] = 24.008115485;
6827  atomic_mass_map[100240000] = 23.99361065;
6828  atomic_mass_map[110240000] = 23.99096295;
6829  atomic_mass_map[120240000] = 23.985041697;
6830  atomic_mass_map[130240000] = 23.999948883;
6831  atomic_mass_map[140240000] = 24.011534538;
6832  atomic_mass_map[150240000] = 24.03577;
6833  atomic_mass_map[70250000] = 25.0601;
6834  atomic_mass_map[80250000] = 25.029358986;
6835  atomic_mass_map[90250000] = 25.012199229;
6836  atomic_mass_map[100250000] = 24.997788707;
6837  atomic_mass_map[110250000] = 24.989953969;
6838  atomic_mass_map[120250000] = 24.985836976;
6839  atomic_mass_map[130250000] = 24.990428102;
6840  atomic_mass_map[140250000] = 25.004108808;
6841  atomic_mass_map[150250000] = 25.02119;
6842  atomic_mass_map[80260000] = 26.03728745;
6843  atomic_mass_map[90260000] = 26.020037768;
6844  atomic_mass_map[100260000] = 26.000514705;
6845  atomic_mass_map[110260000] = 25.992634649;
6846  atomic_mass_map[120260000] = 25.982592968;
6847  atomic_mass_map[130260000] = 25.986891904;
6848  atomic_mass_map[140260000] = 25.992333845;
6849  atomic_mass_map[150260000] = 26.01178;
6850  atomic_mass_map[160260000] = 26.02907;
6851  atomic_mass_map[80270000] = 27.04772;
6852  atomic_mass_map[90270000] = 27.026441;
6853  atomic_mass_map[100270000] = 27.007553268;
6854  atomic_mass_map[110270000] = 26.994076531;
6855  atomic_mass_map[120270000] = 26.984340624;
6856  atomic_mass_map[130270000] = 26.981538531;
6857  atomic_mass_map[140270000] = 26.986704811;
6858  atomic_mass_map[150270000] = 26.999224406;
6859  atomic_mass_map[160270000] = 27.01828;
6860  atomic_mass_map[80280000] = 28.05591;
6861  atomic_mass_map[90280000] = 28.035342095;
6862  atomic_mass_map[100280000] = 28.012121998;
6863  atomic_mass_map[110280000] = 27.998939;
6864  atomic_mass_map[120280000] = 27.983876728;
6865  atomic_mass_map[130280000] = 27.98191021;
6866  atomic_mass_map[140280000] = 27.9769265347;
6867  atomic_mass_map[150280000] = 27.992326585;
6868  atomic_mass_map[160280000] = 28.004372766;
6869  atomic_mass_map[170280000] = 28.02954;
6870  atomic_mass_map[90290000] = 29.04254;
6871  atomic_mass_map[100290000] = 29.019753;
6872  atomic_mass_map[110290000] = 29.002877073;
6873  atomic_mass_map[120290000] = 28.988617393;
6874  atomic_mass_map[130290000] = 28.98045649;
6875  atomic_mass_map[140290000] = 28.9764946649;
6876  atomic_mass_map[150290000] = 28.981800794;
6877  atomic_mass_map[160290000] = 28.996611456;
6878  atomic_mass_map[170290000] = 29.01478;
6879  atomic_mass_map[90300000] = 30.05165;
6880  atomic_mass_map[100300000] = 30.024734;
6881  atomic_mass_map[110300000] = 30.009097932;
6882  atomic_mass_map[120300000] = 29.990462926;
6883  atomic_mass_map[130300000] = 29.98296022;
6884  atomic_mass_map[140300000] = 29.973770136;
6885  atomic_mass_map[150300000] = 29.978313753;
6886  atomic_mass_map[160300000] = 29.984907033;
6887  atomic_mass_map[170300000] = 30.00477;
6888  atomic_mass_map[180300000] = 30.02307;
6889  atomic_mass_map[90310000] = 31.059709;
6890  atomic_mass_map[100310000] = 31.033087;
6891  atomic_mass_map[110310000] = 31.013162656;
6892  atomic_mass_map[120310000] = 30.996648032;
6893  atomic_mass_map[130310000] = 30.983945171;
6894  atomic_mass_map[140310000] = 30.975363194;
6895  atomic_mass_map[150310000] = 30.9737619984;
6896  atomic_mass_map[160310000] = 30.979557007;
6897  atomic_mass_map[170310000] = 30.992414203;
6898  atomic_mass_map[180310000] = 31.012124;
6899  atomic_mass_map[100320000] = 32.03972;
6900  atomic_mass_map[110320000] = 32.020193;
6901  atomic_mass_map[120320000] = 31.999110239;
6902  atomic_mass_map[130320000] = 31.988085239;
6903  atomic_mass_map[140320000] = 31.974151539;
6904  atomic_mass_map[150320000] = 31.973907643;
6905  atomic_mass_map[160320000] = 31.9720711744;
6906  atomic_mass_map[170320000] = 31.985684637;
6907  atomic_mass_map[180320000] = 31.997637826;
6908  atomic_mass_map[190320000] = 32.02265;
6909  atomic_mass_map[100330000] = 33.04938;
6910  atomic_mass_map[110330000] = 33.02573;
6911  atomic_mass_map[120330000] = 33.005327145;
6912  atomic_mass_map[130330000] = 32.990908977;
6913  atomic_mass_map[140330000] = 32.977976964;
6914  atomic_mass_map[150330000] = 32.971725694;
6915  atomic_mass_map[160330000] = 32.9714589098;
6916  atomic_mass_map[170330000] = 32.977451989;
6917  atomic_mass_map[180330000] = 32.989925546;
6918  atomic_mass_map[190330000] = 33.00756;
6919  atomic_mass_map[100340000] = 34.056728;
6920  atomic_mass_map[110340000] = 34.03359;
6921  atomic_mass_map[120340000] = 34.008935481;
6922  atomic_mass_map[130340000] = 33.996705398;
6923  atomic_mass_map[140340000] = 33.978575569;
6924  atomic_mass_map[150340000] = 33.973645886;
6925  atomic_mass_map[160340000] = 33.967867004;
6926  atomic_mass_map[170340000] = 33.973762485;
6927  atomic_mass_map[180340000] = 33.98027009;
6928  atomic_mass_map[190340000] = 33.99869;
6929  atomic_mass_map[200340000] = 34.01487;
6930  atomic_mass_map[110350000] = 35.040623;
6931  atomic_mass_map[120350000] = 35.01679;
6932  atomic_mass_map[130350000] = 34.999764;
6933  atomic_mass_map[140350000] = 34.984583476;
6934  atomic_mass_map[150350000] = 34.973314062;
6935  atomic_mass_map[160350000] = 34.96903231;
6936  atomic_mass_map[170350000] = 34.968852682;
6937  atomic_mass_map[180350000] = 34.975257586;
6938  atomic_mass_map[190350000] = 34.988005407;
6939  atomic_mass_map[200350000] = 35.00514;
6940  atomic_mass_map[110360000] = 36.049288;
6941  atomic_mass_map[120360000] = 36.021879;
6942  atomic_mass_map[130360000] = 36.006388;
6943  atomic_mass_map[140360000] = 35.986695219;
6944  atomic_mass_map[150360000] = 35.978259625;
6945  atomic_mass_map[160360000] = 35.967080706;
6946  atomic_mass_map[170360000] = 35.968306809;
6947  atomic_mass_map[180360000] = 35.967545105;
6948  atomic_mass_map[190360000] = 35.98130201;
6949  atomic_mass_map[200360000] = 35.993074404;
6950  atomic_mass_map[210360000] = 36.01648;
6951  atomic_mass_map[110370000] = 37.057051;
6952  atomic_mass_map[120370000] = 37.03037;
6953  atomic_mass_map[130370000] = 37.010531;
6954  atomic_mass_map[140370000] = 36.99292074;
6955  atomic_mass_map[150370000] = 36.979606841;
6956  atomic_mass_map[160370000] = 36.971125514;
6957  atomic_mass_map[170370000] = 36.965902602;
6958  atomic_mass_map[180370000] = 36.966776331;
6959  atomic_mass_map[190370000] = 36.973375889;
6960  atomic_mass_map[200370000] = 36.985897852;
6961  atomic_mass_map[210370000] = 37.00374;
6962  atomic_mass_map[120380000] = 38.03658;
6963  atomic_mass_map[130380000] = 38.017402;
6964  atomic_mass_map[140380000] = 37.995523;
6965  atomic_mass_map[150380000] = 37.984251583;
6966  atomic_mass_map[160380000] = 37.971163328;
6967  atomic_mass_map[170380000] = 37.968010436;
6968  atomic_mass_map[180380000] = 37.962732106;
6969  atomic_mass_map[190380000] = 37.969081117;
6970  atomic_mass_map[200380000] = 37.976319224;
6971  atomic_mass_map[210380000] = 37.99512;
6972  atomic_mass_map[220380000] = 38.01145;
6973  atomic_mass_map[120390000] = 39.045384;
6974  atomic_mass_map[130390000] = 39.02254;
6975  atomic_mass_map[140390000] = 39.002491;
6976  atomic_mass_map[150390000] = 38.986227208;
6977  atomic_mass_map[160390000] = 38.975134197;
6978  atomic_mass_map[170390000] = 38.968008176;
6979  atomic_mass_map[180390000] = 38.964313038;
6980  atomic_mass_map[190390000] = 38.9637064864;
6981  atomic_mass_map[200390000] = 38.970710813;
6982  atomic_mass_map[210390000] = 38.984784968;
6983  atomic_mass_map[220390000] = 39.00236;
6984  atomic_mass_map[120400000] = 40.05218;
6985  atomic_mass_map[130400000] = 40.03003;
6986  atomic_mass_map[140400000] = 40.005829;
6987  atomic_mass_map[150400000] = 39.991331748;
6988  atomic_mass_map[160400000] = 39.975482562;
6989  atomic_mass_map[170400000] = 39.970415469;
6990  atomic_mass_map[180400000] = 39.9623831237;
6991  atomic_mass_map[190400000] = 39.963998166;
6992  atomic_mass_map[200400000] = 39.962590863;
6993  atomic_mass_map[210400000] = 39.977967291;
6994  atomic_mass_map[220400000] = 39.990498719;
6995  atomi