Appendix 2: Structure and subroutines of Shermo¶
In order to facilitate professional users to easily extend the functionality of Shermo, framework and subroutines of source code of Shermo are described in this appendix.
The source code files involved in Shermo are described as follows
-
Shermo.f90: Containing main program "Shermo", as well as the module "defvar" defining global variables and various constants. The flow chart of "Shermo" is shown below. The green texts indicate the subroutines involved in the corresponding stage

-
calc.f90: Containing various subroutines of calculating thermodynamic quantities
-
showthermo: Calculate and print detailed thermodynamic data at present (T, P)
-
calcthermo: Calculate and return thermodynamic data for given (T, P), invoked by both Shermo main program and "ensemble"
-
ensemble: Load an ensemble of input files, calculate and print thermodynamic data for each of them and conformational weighted data at present (T, P)
-
elecontri: Calculate thermodynamic contribution of electron levels. Employed by "showthermo" and "calcthermo"
-
getvibcontri: Get contribution of a vibration mode to ZPE, U(T)-U(0), CV, S. Employed by "showthermo" and "calcthermo"
-
calcinertia: Calculate moment of inertia matrix and its eigenvalues
-
getGconc: Calculate present concentration, return concentration specified by “conc” parameter, and calculate variation of G due to concentration change.
-
-
atommass.f90: Defining the subroutine "initmass", which sets isotope masses, compositions, and finally evaluate element masses
-
loadfile.f90: Containing subroutines to load output file frequency analysis task of various programs:
-
loadCP2K: Load CP2K output file
-
loadgau: Load Gaussian output file
-
loadnw: Load NWChem output file
-
loadgms: Load GAMESS-US output file
-
loadorca: Load ORCA output file
-
loadxtb: Load g98.out generated by xtb
-
loadshm: Load .shm file
-
-
sub.f90: Containing a variety of subroutines involved in Shermo code
-
loadarguments: Load arguments from command-line
-
loadsettings: Load settings.ini
-
modmass: Load modification on default atomic masses from settings.ini
-
setatmmass: Set mass for all atom
-
deterprog: Detect what program generated the current input file
-
-
symmetry.f90: Containing subroutines that deal with symmetry and point group
-
detectPG: Detecting point group, will call PG_eqvatm
-
PG_eqvatm: Get point group by invoking adapted subroutines of SYVA code
-
PGlabel2rotsym: Convert point group label to rotational symmetry number
-
-
SYVA.F: Modified SYVA code. SYVA was originally released as a stand-alone program for determining all symmetry elements and symmetry operations of rigid molecules
-
util.f90: Utility subroutines shared by Shermo subroutines
-
diagmat: Use Jacobi method to diagonalize matrix
-
skiplines: Skip specific number of lines in specific file ID
-
readaftersign: Read float data after the last specific sign from inputted string
-
readaftersign_int: The same as "readaftersign", but for reading integer
-
loclabel: Locate the line where the specific label first appears in the given file ID
-
loclabelfinal: Locate to the final specific label, and meantime returns the number of matches
-
sortr8: Sort values (double precision float) from small to large by bubble method
-