[FLASH-USERS] bad syntax in reading species

William Raphael Hix raph at ornl.gov
Mon Jun 11 13:45:23 EDT 2012


Hi Anthony-

This is something which FLASH might want to look into extending.  +, - and other symbols are widely used in reaction rate compilations.  For example, the leading database for astrophysical nuclear reactions, the REACLIB database maintained by the JINA collaboration, has long used al-6 to denote the ground state of Al26 and al*6 to denote the long-lived metastable state.  It's much easier to maintain the code if the notation in the dataset and the notation in FLASH are consistent.

						Raph

On Jun 1, 2012, at 11:10 AM, Anthony Scopatz wrote:

> Hello Seyit
> 
> "+" and "-" are not normal programming word characters.  These are defined as any upper or lowercase latin letter, underscores, and digits (0-9).  I might use "p" and "m" instead.  
> 
> Be Well
> Anthony
> 
> On Fri, Jun 1, 2012 at 4:05 PM, Seyit Hocuk <seyit at astro.rug.nl> wrote:
> Hi,
> 
> I want to include species with names that have '+' or '-' in them. The config file cannot recognize these characters. It gives this error:
> 
> "
> Bad syntax:
> SPECIES e-
> input doesn't match regular expression "SPECIES\s+(?P<name>\w+)(\s+TO\s+(?P<nElec>\d+))?\s*$"
> "
> 
> Can I change the file "\bin\unitCfg.py" to make it able to read these?
> 
>    def initparseSPECIES(self):
>        return {}, r'SPECIES\s+(?P<name>\w+)(\s+TO\s+(?P<nElec>\d+))?\s*$
> 
> 
> Thanks,
> Seyit
> 
> 

------------------------------------------------------------------------
William Raphael Hix                       Email:  raph at ornl.gov
Oak Ridge National Laboratory             Voice:  (865) 574-4716
P.O. Box 2008                               Fax:  (865) 576-8746  
Oak Ridge, TN 37831-6354 






More information about the flash-users mailing list