Molara-Lab / Molara

Molara is a Python package for the visualization of chemical structures such as molecules or crystals. It provides a graphical user interface for importing structures from output files of popular computational chemistry software as well as for creating custom structures.
GNU General Public License v3.0
14 stars 0 forks source link

Orthographic projection #322

Closed adrianusler closed 6 months ago

adrianusler commented 6 months ago

Closes #311. I need to fix the coverage; once this is done, it is ready to merge!

  1. One can now toggle between perspective and orthographic projection
  2. I have implemented that the zoom of the window (distance_to_target) is set automatically to match the dimensions of the loaded structure. Before this, the camera was often much too close to the structure (or within it) when it was loaded.
codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 71.42857% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 68.11%. Comparing base (cd671e4) to head (5afb79c). Report is 9 commits behind head on main.

Files Patch % Lines
src/molara/Gui/structure_widget.py 51.85% 26 Missing :warning:
src/molara/Gui/trajectory_dialog.py 42.85% 4 Missing :warning:
src/molara/Gui/builder.py 0.00% 1 Missing :warning:
src/molara/Gui/crystal_dialog.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #322 +/- ## ========================================== + Coverage 67.09% 68.11% +1.01% ========================================== Files 38 38 Lines 3158 3227 +69 ========================================== + Hits 2119 2198 +79 + Misses 1039 1029 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Michel-Heinz commented 6 months ago

I found a bug! When I load a trajectory move the camera around, and then load the next step, the camera resets. This does not happen in the main branch. It must has something to do with your changes in the camera module.

adrianusler commented 6 months ago

Thanks, I will take care of this.

Michel-Heinz commented 6 months ago

I am fine with merging now!