Contrast .bash_profile and .profile which are only run at the start of a new login shell.
The purpose of setting environmental variables is create system wide variables (at least within your user shell) available to programs. This is a more elegant way of being able to determine where resources are on a system.
Environment variables can be created
export PYTHONPATH=$(cd ~/repos/pyflamestk;pwd):$(cd ~/repos/pypospack;pwd)export PATH=$(cd ~/bin;pwd):$PATHexport LAMMPS_SERIAL_BIN=$(cd ~/;pwd)/bin/lmp_serialexport LAMMPS_MPI_BIN=$(cd ~/;pwd)/bin/lmp_mpiexport GULP_BIN=/home/eugene/bin/gulpexport VASP_MPI_BIN=/home/eugene/bin/vaspexport VASP_GGA_DIR=/home/eugene/opt/vasp/GGAexport VASP_LDA_DIR=/home/eugene/opt/vasp/LDAExample for OSC
# load pythonmodule load python/3.6-conda5.2# load gitmodule load git/2.18.0# supress GTK-ASKPASS ERRORSunset SSH_ASKPASS#bathexport PATH=/users/PAA0028/eragasa/.local/bin:$PATHexport PATH=$HOME/bin:$PATHexport HOSTNAME# .bash_profileexport LAMMPS_SERIAL_BIN=$HOME/bin/lmp_serialif [[ $(hostname -s) = owens* ]]; then export LAMMPS_MPI_BIN=$HOME/bin/owens/lmp_mpi export VASP_STD_BIN=$HOME/bin/owens/vasp_stdelif [[ $(hostname -s) = pitzer* ]]; then export LAMMPS_MPI_BIN=$HOME/bin/pitzer/lmp_mpi export VASP_STD_BIN=$HOME/bin/pitzer/vasp_stdelif [[ $(home -s) = ruby* ]]; then export LAMMPS_MPI_BIN=$HOME/bin/ruby/lmp_mpi export VASP_STD_BIN=$HOME/bin/ruby/vasp_stdfi# potpaw filesexport VASP_POTPAW_LDA=$HOME/usr/local/vasp/potpaw/potpaw_LDA.54export VASP_POTPAW_GGA=$HOME/usr/local/vasp/potpaw/potpaw_PBE.54# python pathexport PYTHONPATH=$HOME/repos/mexm-base/src:$PYTHONPATHexport PYTHONPATH=$HOME/repos/pymatmc2/src:$PYTHONPATH# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi