C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	>>>>>>>>>>>>>>>>>>>   LICENCE   <<<<<<<<<<<<<<<<<<
	
	[C] S. H. Zhang and R. F. Zhang 2018-2019, zrfbuaa group

	PNADIS - Peierls-Nabarro Analyzer for DISlocation core structure 
	         and slip resistance
	
	--------------------------version 1.0.0-------------------------------

	This program is free software: you can redistribute it and/or modify it 
	under the terms of the GNU General Public License as published by the Free
	Software Foundation, either version 3 of the License, or (at your option)
	any later version.

	This program is distributed in the hope that it will be useful, but WITHOUT
	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
	FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
	for more details.

	You should have received a copy of the GNU General Public License along
	with this program.  If not, see <http://www.gnu.org/licenses/>.


	>>>>>>>>>>>>>>>   CONTENT OF PNADIS   <<<<<<<<<<<<<<

	Folder <src>

	1/ PNADIS.m - The main file of PNADIS code.
	2/ StartCal.m - Start to run the code PNADIS.
	3/ install.m - To install the PNADIS code.
	4/ Default.m - To load its default value if the value of one parameter is 
	   not defined in the infile.m file.
	5/ Folder <1dPN_Model>
	    5.1/ fitting_toolbox_1d.m - To solve 1D P-N model via the fitting toolbox of MATLAB.
	    5.2/ fitting_toolbox_1d_1st.m - To solve 1D P-N model via the fitting 
     	         toolbox of MATLAB with considering the first-order approximation in
  	         the trial function of disregistry vector.
	    5.3/ lsq_curvefit_1d.m - To solve 1D P-N model via the lsqcurvefit 
	         function of MATLAB.
	    5.4/ lsq_curvefit_1d_1st.m - To solve 1D P-N model via the lsqcurvefit 
	         function of MATLAB with considering the first-order approximation 
	         in the trial function of disregistry vector.
	    5.5/ Folder <Desregistry>
	        5.5.1/ misdens1d.m - The misfit density for one dimension P-N model.
	        5.5.2/ misfit1d.m - The disregistry vector for one dimension P-N model.
	    5.6/ Folder <Gamma_Surface>
	        5.6.1/ fitgamma.m - To determine the restrofing force by deriving the GSFE.
	        5.6.2/ Gamma1d.m - The function of GSFE or gamma surface for 1D P-N model.
	        5.6.3/ gammaFit1d.m - To fit the GSFE data.
	    5.7/ Folder <Mini_Function> 
	        5.7.1 createFit.m - To fit the restoring force using the fitting toolbox of MATLAB.
	        5.7.2 fitfuncABC.m - The function of elastic resistance to fit the restoring force.
	        5.7.3 fitfuncABC_1st.m - The function of elastic resistance to fit the restoring 
	              force with considering the first-order approximation in the trial function 
	              of disregistry vector.
	        5.7.4 fitfuncABCx.m - The function of elastic resistance to fit the restoring force.
	        5.7.5 fitfuncABCx_1st.m - The function of elastic resistance to fit 
	              the restoring force with considering the first-order approximation 
	              in the trial function of disregistry vector.
	    5.8/ Folder <Peierls_Stress>
	        5.8.1 pnstress1d.m - To solve the Peierls stress via discrete dislocation energy approach.
	        5.8.2 pnstress1d_analysis.m - To solve the Peierls stress via analytical formula.
	    5.9/ Folder <Pressure_Field>
	        5.9.1 pressfield1d.m - To solve the hydrostatic stress around dislocation core (GPa) 
	              of a dislocation.
	6/ Folder <2dPN_Model>
	    6.1/ genetic_algorithm_2d.m - To run the GA to determine the dislocation core structure.
	    6.2/ particle_swarm_optimization_2d.m - To run the PSO to determine the dislocation
                 core structure.
	    6.3/ output_Edis.m - To determine the elasitc and misfit energies as the total dislocation
	         energy is minimum.
	    6.4/ Folder <Disregistry>
	        6.4.1 misdens_x.m - The misfit density along x axis for 2D P-N model.
	        6.4.2 misdens_z.m - The misfit density along z axis for 2D P-N model.
	        6.4.3 misfit_x.m - The disregistry vector along x axis for 2D P-N model.
	        6.4.4 misfit_z.m - The disregistry vector along z axis for 2D P-N model.
	    6.5/ Folder <Gamma_Surface>
	        6.5.1 Gamma.m - The function of GSFE or gamma surface for 2D P-N model.
	        6.5.2 gammaFit.m - To fit the GSFE data.
	    6.6/ Folder <Mini_Function>
	        6.6.1 minfunc.m - The total energy of a dislocation according the CCPN model.
	        6.6.2 minfunc_svpn.m - The total energy of a dislocation according the SVPN model.
	    6.7/ Folder <Peierls_Stress>
	        6.7.1 pnstress.m - To solve the Peierls stress via discrete dislocation energy approach.
	        6.7.2 pnstress_analysis.m - To solve the Peierls stress via analytical formula.
	    6.8/ Folder <Pressure_Field>
	        6.8.1 pressfield.m - To solve the hydrostatic stress around dislocation core 
                      (GPa) of a dislocation.
	    6.9/ Folder <Solute_Strengthening>
	        6.9.1 Einact.m - The solute/dislocation interaction energy.
	        6.9.2 Epoten.m - The potential energy decrease due to favorable solute fluctuations.
	        6.9.3 Etotal.m - The total energy change.
	        6.9.4 pressfield_Einact.m - To solve the hydrostatic stress around dislocation 
	              core (GPa) of a dislocation.
	        6.9.5 Solstrengthen.m - To start the calculation of solid solution strengthening.
	        6.9.6 CRSS.m - To solve the zero-temperature energy barrier and corresponding CRSS.

	Folder <docs>

	1/ manual_v1.0.0.pdf - The manual of PNADIS code.

	Folder <example>

	1/ infile_1d.m - One sample infile.m file for 1D P-N model.
	2/ infile_2d.m - One sample infile.m file for 2D P-N model.
	3/ Folder <1d_PN model> - Several examples of 1D PN model for complex materials.
	4/ Folder <2d_PN model> - Several examples of 2D PN model for FCC and HCP metals.
	5/ Folder <Pressure Field> - Example of the pressure field around dislocation 
	   core for both the components along x and z axes of Al (111)[1-10] edge and
	   screw dislocations.
	6/ Folder <Solution strengthening> - Example of the solid solution strengthening 
	   for Al alloys with (111)[1-10] edge and screw dislocaitons and for Mg alloys with
           (0001)[11-20] edge dislocation.


	>>>>>>>>>>>>>>>>>>>   INSTALL   <<<<<<<<<<<<<<<<<<

	Before install and run PNADIS code, MATLAB version 2015a or later is required. 
	After you download the archive with PNADIS, you need to unpack it and the current 
	directory is PROJECT_SOURCE_DIR. Run the following command in the MATLAB to 
	install PNADIS: 
	    >> run PROJECT_SOURCE_DIR/PNADIS_x.x.x/src/install.m
	Note that the installer may require root privileges.



	>>>>>>>>>>>>>>>>>>   HOW TO RUN   <<<<<<<<<<<<<<<<<

	To set up your calculation, find an example in the folder 
	PROJECT_SOURCE_DIR/PNADIS_x.x.x/example (see Appendix 7.1 for a list of example), 
	which is similar to what you want to do, and start by editing the input file 
	infile.m. Then move the infile.m file to the folder INFILE_DIR and run the 
	PNADIS as follows:
	o Run PNADIS in the MATLAB on the Windows/Linux/Mac
	    >> cd INFILE_DIR
	    >> PNADIS
	o Run PNADIS on the cluster
	    $ cd INFILE_DIR
	    $ nohup matlab -r PNADIS > output.log &

C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
