function Set_My_Paths

%----------------------------------------------------------------------
% Set all path names required to run MolDynSim simulations
%----------------------------------------------------------------------
%  Erkennt eigentlich selber den Usernamen
%  unter Unix kann man mit dem Befehl "pwd" den pfad
%  zum home anzeigen lassen
%  WINDOWS: zunächst unter C:/Users/BENUTZERNAME/Dokumente
%  Fy Nov 2014
%
result = license('inuse', 'matlab');
user_name = result.user;

disp('****************************************')
disp('')
disp(['Setting path variables for user : ' user_name])
disp('')
disp('****************************************')

if ispc %  PC (Windows) version of MATLAB
    HomeDir = fullfile('C:','Users',user_name,'Documents');
    disp (['Home directory (Windows) : ' HomeDir])
end
if isunix % UNIX version of MATLAB
    HomeDir = fullfile('/homes/irgendeinverzeichnis',user_name);
    disp (['Home directory (Linux)   : ' HomeDir])
end
if ismac % Mac OS X version of MATLAB
    error ('Path string for Mac OS X not yet implemented')
end

%% MolDynSim (TrajLab)
PathName = fullfile('Matlab','MolDynSim');
addpath(fullfile(HomeDir,PathName,'Sources'      ));
disp (['Adding MolDynSim path    : ' PathName])


