MATLAB scripts

Matlab scripts can be downloaded from the following .zip file: Federica_Computations_folder.zip.
The scripts then runs the discrete energy minimization for all combinations of models and boundaries.
The initial guesses are read from the "Initial_guesses" folder.

The function that runs the minimization is the find_min_e function, for bBDNA initial guess, and find_min_e_inters function, for bBDNA with gd intras. The function to compute the energy, its gradient and Hessian is discrete_dna_penalty_en_grad_hess. The definitions of both funcitons can be found in the .m files with the corresponding names.
Before running the following codes it is necessary to set in the find_min_e and find_min_e_inters functions, in particular in fminunc function, the chosen optimization algorithm, that can be Trust Region or Quasi-Newton.

Kahn_Crothers.m

  Inputs bBDNA initial guesses read from 'Initial_guesses' folder
  guesses must be named: _guess.txt
  Parameters   model for DNA:   models "cgDNA+min"
  sequence: range_guesses:   list of ‹guess_nb›
  Outputs   3D views of bBDNA solution, name: Results/3D_views/‹seq_name›_guess‹guess_nb›_‹model›.png
  3D views of bBDNAgd solution, name: Results/3D_views/‹seq_name›_3Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  MATLBAL variables: Energy, Gradient, Hessian eigenvalues, Hessian condition number, Difference of the two obtained solutions

Widom_601_94bp.m

  Inputs bBDNA initial guesses read from 'Initial_guesses' folder
  guesses must be named: _guess.txt
  Parameters   model for DNA:   models "cgDNA+min"
  sequence: range_guesses:   list of ‹guess_nb›
  Outputs   3D views of bBDNA solution, name: Results/3D_views/‹seq_name›_guess‹guess_nb›_‹model›.png
  3D views of bBDNAgd solution, name: Results/3D_views/‹seq_name›_3Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  MATLBAL variables: Energy, Gradient, Hessian eigenvalues, Hessian condition number, Difference of the two obtained solutions

Noy_251bp.m

  Inputs bBDNA initial guesses read from 'Initial_guesses' folder
  guesses must be named: _guess.txt
  Parameters   model for DNA:   models "cgDNA+min"
  sequence: range_guesses:   list of ‹guess_nb›
  Outputs   3D views of bBDNA solution, name: Results/3D_views/‹seq_name›_guess‹guess_nb›_‹model›.png
  3D views of bBDNAgd solution, name: Results/3D_views/‹seq_name›_3Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  MATLBAL variables: Energy, Gradient, Hessian eigenvalues, Hessian condition number, Difference of the two obtained solutions

Noy_339bp.m

  Inputs bBDNA initial guesses read from 'Initial_guesses' folder
  guesses must be named: _guess.txt
  Parameters   model for DNA:   models "cgDNA+min"
  sequence: range_guesses:   list of ‹guess_nb›
  Outputs   3D views of bBDNA solution, name: Results/3D_views/‹seq_name›_guess‹guess_nb›_‹model›.png
  3D views of bBDNAgd solution, name: Results/3D_views/‹seq_name›_3Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  2D plots of solution, name: Results/2D_plots/‹seq_name›_2Dsol‹guess_nb›_‹model›.png
  MATLBAL variables: Energy, Gradient, Hessian eigenvalues, Hessian condition number, Difference of the two obtained solutions

The script reads the stored variables of the computed solution and creates the figures. The bBDNA software can be found on the LVCMM software page: link.