Gen_ANN_nh3_base/src/nnparams.incl

205 lines
7.7 KiB
Plaintext

!**** Declarations
double precision pi,infty,zero
double precision scan_res
double precision hart2eV, eV2hart
double precision hart2icm, icm2hart
double precision eV2icm, icm2eV
double precision deg2rad, rad2deg
integer maxneu,maxlay,maxtypes,maxtpar
integer maxpats
integer maxnin,maxnout,maxpout
integer maxwei,neucap,wbcap
integer maxset, maxnnkeys
integer maxxrmeta,xrcap
integer iinfty
integer iout,nnunit,perfunit,fitunit
integer ec_error,ec_read,ec_dim,ec_log
integer ec_dimrd
integer record_read,record_write,record_overwrite
integer record_update
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
character*32 nnrecfile
!**********************************************************
!**** 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
!*** maxset: max. number of neural networks to fit
!*** 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=15,maxnout=30)
parameter (maxpout=20,maxset=10000)
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)
parameter (maxnnkeys=4*maxlay)
!*** 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
!*** nnrecfile: filename for writing parameter records.
!*** 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 (nnrecfile='../nnfits/record')
parameter (nnfdir='../nnfits/',nnsdir='../scans/')
parameter (nnldir='../logs/')
parameter (nntag='',prim_tag=' Time-stamp: " "')
parameter (lrfmt='(ES20.12)',lifmt='(I12)')
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)')
!**********************************************************
!**** Continuation Parameters
!*** record_*: Various possible values for the common block variable
!*** record_state. See the parser for more.
parameter (record_read=0,record_write=1,record_overwrite=-1)
parameter (record_update=-2)
!**********************************************************
!**** 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)