## Folders with calculations (crest/gaussian) and analysis scripts. 
# Final results are in the four csv files (shown in Tables S1-S4) + in VASP_calcualtion folder, where you can find the four computed structures with VASP.


README
therm-analysis_gasphase.ipynb 	# Notebook that computes the final energies in vacuum
				# Final values are printed in "data_water_METHOD.csv" 
				# METHOD = b3lyp-d3, m062x (it prints both, no action needed).
therm-analysis_water.ipynb	# same as above, but in water.
data_water_b3lyp-d3.csv 	# dataframe with b3lyp-d3bj energies in water. Energies relative to species 1. 
				# Rows: species numbers, according to text; columns: ΔE+ZPE, ΔH(298K), ΔG(298K,1M) (See Tables S1-S4).
data_water_m06x.csv 		# dataframe with m062x energies in water. See above
data_gasphase_b3lyp-d3.csv 	# dataframe with b3lyp-d3bj energies in vacuum. See above
data_gasphase_m06x.csv 		# dataframe with m062x energies in vacuum. See above
VASP_calculations 		# VASP calculations on polymer 10 and 11. 

SCRIPTS:
#All these scripts here are called by other scripts inside "data_gasphase" and "data_water" folders, and should not be run by the user.
make_DFT-SP_vac.sh 	 	# Creates a g16 input file for a B3LYP-D3BJ/aug-cc-pVTZ single point (called by data_gasphase/dft-SP.sh) 
make_DFT-SP_water_PCM.sh 	# Same as above, in PCM water (called by data_water/dft-SP.sh) 
make_M062X-SP_vac.sh		# Creates a g16 input file for a M062X/aug-cc-pVTZ single point (called by data_gasphase/m06-SP.sh) 
make_M062X-SP_water_PCM.sh	# Same as above, in PCM water (called by data_water/m06-SP.sh) 
make_dcc_SP_vac.sh 	# generates g16 input files for single points in vacuum of top five conformers
make_dcc_SP_water.sh 	# generates g16 input files for single points in PCM water of top five conformers
make_optfreq_vac.sh 	# generates g16 input for optimization in vacuum 
make_optfreq_water.sh 	# generates g16 input for optimization in water
split_crest_conf_first5.sh # generates separate xyz files for each top 5 conformers from CREST calculations
submit_crest.sh 	# submits crest calculation with solvent (water), with sbatch
submit_crest_vac.sh 	# submits crest calculation in vacuum, with sbatch
submit_gaussian2.sh 	# submits gaussian, with sbatch


# Gaussian calculations folders:
data_gasphase 
data_water 
# Both contain sub-folders named according to species number in the text. Both folders contain bash scripts to run so that the different workflow steps can be automated. I will explain them once as they are analogous in both but contain solvent models for water calcs:
 
 (all bash scripts must be run from inside the polymer folders so you can run them in a for loop over all polymer folders.)

crest.sh 	# run crest conformer search
dft-SP.sh 	# run B3LYP-D3BJ/aug-cc-pVTZ single points on B3LYP-D3BJ/cc-pVDZ  structures
dft-opt.sh 	# run B3LYP-D3BJ/cc-pVDZ opt of crest best structure
goodvibes 	# folder with analysis of thermodynamics of polyimine and iminoacetonitrile (Fig S2) 
m06-SP.sh 	# run m062x/aug-cc-pVTZ SPs on B3LYP-D3/cc-pVDZ structures
openbabel.sh 	# openbabel script to make xyz files from gaussian outputs of optimization which are then used as input structures for the single points
topfive.sh 	# Run single points for the best 5 conformers found by crest to see how much their energies deviate (also used to see if ranking by crest and dft is the same) 

The general structure of a polymer folder is 
crest 		# crest runs for small+large models. Inside earch crest run folder is a topfive folder with the SPs of the best 5 confs. 
crest-best	# the crest best conformer for small and large model
dft-SP   	# the B3LYP-D3BJ/aug-cc-pVTZ SP calcs on the opt-xyz structures
dft-opt  	# the B3LYP-D3BJ/cc-pVDZ opts for small and large model
m062x-SP  	# the m062x/aug-cc-pVTZ SPs for small and large model
opt-xyz 	# the optimized structures of small and large model at B3LYP-D3BJ/cc-pVDZ level.

data_gasphase:
1
12
13
14
15
16
17
18
19
2
20
21
22
23
24
25
26
27
28
29
3
30
31
32
33
4
5
6
7
8
9
crest.sh
dft-SP.sh
dft-opt.sh
m06-SP.sh
openbabel.sh
topfive.sh


data_water:
1
12
13
14
15
16
17
18
19
2
20
21
22
23
24
25
26
27
28
29
3
30
31
32
33
4
5
6
7
8
9
crest.sh
dft-SP.sh
dft-opt.sh
goodvibes
m06-SP.sh
openbabel.sh
topfive.sh


#VASP calculations folder:
VASP_calculations:	# Contains input and output files of VASP calculations
			# Relative energies of structures 10A, 10B, and 11 are computed with respect to structure 1 (folder named 1_HCN_chain).
00_B3LYP_calculations	# Calculations with B3LYP
00_structures		# cif and vasp files
10A			# VASP calculations on structure 10A (see text)
10B			# VASP calculations on structure 10B (see text)
11			# VASP calculations on structure 11 (see text)
1_HCN_chain		# VASP calculations on structure 1, linear HCN chain

