!**** Declarations real*8 pi,infty,zero real*8 scan_res real*8 hart2eV, eV2hart real*8 hart2icm, icm2hart real*8 eV2icm, icm2eV real*8 deg2rad, rad2deg integer maxneu,maxlay,maxtypes,maxtpar integer maxpats integer maxnin,maxnout,maxpout integer maxwei,neucap,wbcap integer maxxrmeta,xrcap integer iinfty integer iout,nnunit,perfunit,fitunit integer ec_error,ec_read,ec_dim,ec_log integer ec_dimrd character*2 newline character*8 stdfmt character*8 nnldir character*8 nntag character*16 prim_tag character*16 nnfdir,nnsdir character*16 sline,asline,hline character*16 mform,smform,miform character*16 lrfmt,lifmt character*32 nndmpfile,nnexpfile character*32 nndatfile,nnreffile character*32 sampfile,perfile character*32 nnparfile,nnp10file !********************************************************** !**** Parameters !*** maxneu: max. number of neurons per hidden layer !*** maxnin: max. number of neurons in input layer !*** maxnout: max. number of neurons in output layer !*** maxpout: max. number of values in output pattern !*** maxlay: max. number of layers (always >2) !*** maxtypes: max. number of neuron types !*** maxtpar: max. number of parameters for each neuron type !*** maxpats: max. number of learning patterns !*** maxxrmeta: max. number of metadata-blocks in xranges !*** WARNING: maxnout should not be > maxneu, deriv-like structures !*** assume so. parameter (maxneu=150,maxnin=14,maxnout=15) parameter (maxpout=15) parameter (maxlay=3,maxtypes=2,maxtpar=1) parameter (maxpats=50000) parameter (maxxrmeta=3) !********************************************************** !**** Inferred Parameters !*** maxwei: max. total number of weight matrix elements !*** neucap: max. total number of neurons !*** wbcap: max. total number of weights and biases !*** xrcap: max. total number of used dimensions in xranges parameter (maxwei=(maxlay-3)*maxneu**2+maxneu*(maxnin+maxnout)) parameter (neucap=(maxlay-2)*maxneu+maxnin+maxnout) parameter (wbcap=maxwei+neucap) parameter (xrcap=2+maxxrmeta) !*** WARNING: maxwei may fail for 2-layered networks !*** if maxnin*maxnout is sufficiently large! !********************************************************** !**** Numerical Parameters !*** infty: largest possible double precision real value. !*** iinfty: largest possible integer value. !*** zero: sets what is considered an irrelevant difference !*** in size. use for comarison of reals, to determine !*** 'dangerously small' values, etc !*** scan_res: maximum precision for geometric boundary algorithm ! 3.14159265358979323846264338327950... parameter (pi=3.1415926536D0) parameter (infty=huge(1.0D0),iinfty=huge(1)) parameter (zero=1.0D-8,scan_res=1.0D-8) !********************************************************** !**** Unit Conversion Parameters !*** X2Y: convert from X to Y. !*** !**** !? currently inexact. FIX THIS. !*** hart: hartree !*** eV: electron volt !*** icm: inverse centimeters (h*c/cm) !**** !*** deg: degree !*** rad: radians parameter (hart2icm=219474.69d0) parameter (hart2eV=27.211385d0) parameter (eV2icm=hart2icm/hart2eV) parameter (icm2hart=1.0d0/hart2icm) parameter (eV2hart=1.0d0/hart2eV) parameter (icm2eV=1.0d0/eV2icm) parameter (deg2rad=pi/180.0d0) parameter (rad2deg=1.0d0/deg2rad) !********************************************************** !**** I/O Parameters !*** iout: standard output for vranf error messages !*** nnunit: temporary UNIT for misc. output files !*** nnuit + [0..99] are reserved for futher !*** unspecific misc. files. !*** perfunit: UNIT for performance logfile !*** fitunit: UNIT added to random positive integer !*** identifying a single core fit UNIQUELY !*** !*** lrfmt: format for long real output !*** lifmt: format for long integer output !*** !*** nndatfile: filename for DATA-files !*** (without file extension) !*** nnreffile: filename for reference DATA-blocks !*** (without file extension) !*** nnparfile: filename for best fitted parameters to be !*** written on (without file extension) !*** nnp10file: filename for the 10th percentile parameters to !*** be written on (without file extension) !*** nnexpfile: filename for modified neural network parameters !*** (without file extension) !*** sampfile: filename for displaying sampled points in !*** configuration space !*** nndmpfile: filename for dumping data point pairs !*** perfile: filename for logged fitting performances. !*** nntag: infix for various filenames to mark their origin !*** program should end with a trailing '_' if nonempty. !*** prim_tag: tag added to the '***' line of primitive par-files !*** nnfdir: directory for dumping fit files !*** nnsdir: directory for dumping scans. !*** nnldir: directory for dumping logfiles for each fit parameter (nndatfile='DATA_ANN') parameter (nnreffile='REF_ANN') parameter (nnparfile='../nnfits/fit_pars') parameter (nnp10file='../nnfits/fit_10p') parameter (nnexpfile='../nnfits/exp_pars') parameter (nndmpfile='../nnfits/fit_dump.dat') parameter (sampfile='../scans/samples.dat') parameter (perfile='../logs/performance.log') parameter (nnfdir='../nnfits/',nnsdir='../scans/') parameter (nnldir='../logs/') parameter (nntag='',prim_tag=' Time-stamp: " "') parameter (lrfmt='(ES20.12)',lifmt='(I)') parameter (iout=6,perfunit=700,nnunit=800,fitunit=8000) !********************************************************** !**** Debugging Parameters !*** sline: separation line !*** asline: alternative sep. line !*** hline: simple horizontal line !*** newline: a single blank line !*** mform: standard form for matrix output !*** miform: standard form for integer matrix output !*** smform: shortened form for matrix output !*** stdfmt: standard format for strings parameter (sline='(75("*"))',asline='(75("#"))') parameter (hline='(75("-"))') parameter (newline='()') parameter (mform='(5ES12.4)',smform='(5ES10.2)') parameter (miform='(5I12)') parameter (stdfmt='(A)') !********************************************************** !**** Error Codes !*** Codes should be powers of 2. Binary representation of return value !*** should correspond to all exceptions invoked. ec_error should never !*** be invoked with any other. !*** !*** ec_error: generic error (catch-all, avoid!) !*** ec_read: parsing error during les() !*** ec_dim: dimensioning error !*** ec_log: logic error !*** !**** Inferred error codes !*** ec_dimrd: ec_dim+ec_read parameter (ec_error=1,ec_read=2,ec_dim=4,ec_log=8) parameter (ec_dimrd=ec_dim+ec_read)