Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Thermal Expansion Coefficient #107

Draft
wants to merge 24 commits into
base: dev
Choose a base branch
from

Conversation

galjos
Copy link
Collaborator

@galjos galjos commented Jul 30, 2024

No description provided.

1. finite difference feature is implemented
   - new input key: temperature_points_key, finite_difference_points_key, std_points_key
   - new parser _parse_lists
   - cli and api are implemented
2. thermal expansion coefficient analysis is implemented
   -  BoxFileReader class and Box class are implemented
   - new input key: box_files_key
   - cli and api are implemented
3. Debugging and Testing
- This feature can analyse linear and volumetric thermal expansion coefficients.
- The feacture can be used either as api or as cli.
- As an input temperture_points, box_files and out_file are required.
- Log_file is an optional keyword.
- Temperture points contain all temperatures on which the corrosponding box files are executed.
- For that new keyword are defined in the
`pqanalysis_input_file_reader.py`: `box_files_key`,
`temperature_points_key`, `unit_key`.
- The mixin funciton for box_files is implemented in the `_file_mixin.py`.
- The mixin functions for `temperature_points_key` and `unit_key` are
implemented in the new mixin class: `_thermal_expansion_mixin.py`.
Note: the `unit_key` is not really used for the thermal expansion
calculation. It is a keyword for new box class.
- Further a new class Box in `box.py`in the physical_data module is introduced to store the box data:
a, b, c, alpha, beta, gamma.
- To read in a file.box a BoxFileReader class is introduced in `box_file_reader.py` io module.
- To pares a list of floats for the tempeature_points in `_parse.py`
`_parse_list`is defined.
- First test for thermal_expansion module are added.
- TODO: More testing, also the new introduced classes `_parse.py`,
  `box.py`and so on.
@galjos galjos marked this pull request as draft July 30, 2024 10:50
@galjos galjos added the feature New feature or request label Jul 30, 2024
@97gamjak
Copy link
Collaborator

I know the work is still in progress. But I have seen one important aspect that should be fixed asap: The formatting differs from the general formatting of the package. This would result in a lot more code to review than necessary: So we should solve this issue within the next days.

@galjos
Copy link
Collaborator Author

galjos commented Aug 6, 2024

Same here as in #108 @stkroe

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 67.25664% with 111 lines in your changes missing coverage. Please review.

Project coverage is 84.41%. Comparing base (a1b8e6e) to head (9fdcb9c).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
..._expansion/thermal_expansion_output_file_writer.py 35.59% 38 Missing ⚠️
PQAnalysis/analysis/thermal_expansion/api.py 27.50% 29 Missing ⚠️
PQAnalysis/io/box_file_reader.py 80.35% 11 Missing ⚠️
...nalysis/io/input_file_reader/pq_analysis/_parse.py 16.66% 10 Missing ⚠️
PQAnalysis/cli/thermal_expansion.py 74.28% 9 Missing ⚠️
...is/analysis/thermal_expansion/thermal_expansion.py 93.67% 5 Missing ⚠️
...QAnalysis/analysis/thermal_expansion/exceptions.py 77.77% 2 Missing ⚠️
...ile_reader/pq_analysis/_thermal_expansion_mixin.py 77.77% 2 Missing ⚠️
PQAnalysis/physical_data/exceptions.py 50.00% 2 Missing ⚠️
...l_expansion/thermal_expansion_input_file_reader.py 93.33% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #107      +/-   ##
==========================================
- Coverage   85.43%   84.41%   -1.03%     
==========================================
  Files         125      134       +9     
  Lines        5027     5364     +337     
==========================================
+ Hits         4295     4528     +233     
- Misses        732      836     +104     
Flag Coverage Δ
unittests 84.41% <67.25%> (-1.03%) ⬇️
Files with missing lines Coverage Δ
PQAnalysis/analysis/__init__.py 100.00% <100.00%> (ø)
PQAnalysis/analysis/rdf/api.py 29.03% <ø> (ø)
PQAnalysis/analysis/rdf/rdf.py 77.24% <ø> (ø)
PQAnalysis/analysis/rdf/rdf_input_file_reader.py 80.00% <ø> (ø)
PQAnalysis/analysis/thermal_expansion/__init__.py 100.00% <100.00%> (ø)
PQAnalysis/cli/main.py 65.51% <100.00%> (+1.23%) ⬆️
PQAnalysis/io/__init__.py 100.00% <100.00%> (ø)
PQAnalysis/io/box_writer.py 100.00% <ø> (ø)
PQAnalysis/io/energy_file_reader.py 100.00% <ø> (ø)
PQAnalysis/io/exceptions.py 100.00% <100.00%> (ø)
... and 14 more

... and 1 file with indirect coverage changes

Copy link
Contributor

github-actions bot commented Sep 4, 2024

PYLINT REPORT

Your code has been rated at 9.81/10 (previous run: 9.83/10, -0.03)

Full report

Raw metrics

type number % previous difference
code 8465 40.40 7901 +564.00
docstring 9142 43.63 8660 +482.00
comment 280 1.34 267 +13.00
empty 3067 14.64 2930 +137.00

Duplication

now previous difference
nb duplicated lines 0 0 0
percent duplicated lines 0.000 0.000 =

Messages by category

type number previous difference
convention 10 1 1
refactor 56 51 51
warning 15 10 10
error 3 3 3

% errors / warnings by module

module error warning refactor convention
PQAnalysis.type_checking 66.67 0.00 0.00 0.00
PQAnalysis 33.33 0.00 0.00 0.00
PQAnalysis.io.box_file_reader 0.00 20.00 0.00 20.00
PQAnalysis.atomic_system.atomic_system 0.00 13.33 10.71 0.00
PQAnalysis.topology.init 0.00 13.33 0.00 0.00
PQAnalysis.tools.traj_to_com_traj 0.00 13.33 0.00 0.00
PQAnalysis.io.moldescriptor_reader 0.00 13.33 0.00 0.00
PQAnalysis.io.input_file_reader.pq_analysis._parse 0.00 6.67 3.57 0.00
PQAnalysis.io.input_file_reader.pq_analysis._thermal_expansion_mixin 0.00 6.67 0.00 10.00
PQAnalysis.utils.custom_logging 0.00 6.67 0.00 0.00
PQAnalysis.io.write_api 0.00 6.67 0.00 0.00
PQAnalysis.io.nep.nep_writer 0.00 0.00 14.29 10.00
PQAnalysis.io.traj_file.trajectory_reader 0.00 0.00 8.93 0.00
PQAnalysis.tools.add_molecule 0.00 0.00 7.14 0.00
PQAnalysis.analysis.rdf.rdf_output_file_writer 0.00 0.00 7.14 0.00
PQAnalysis.analysis.rdf.rdf 0.00 0.00 5.36 0.00
PQAnalysis.topology.topology 0.00 0.00 3.57 0.00
PQAnalysis.topology.bonded_topology.dihedral 0.00 0.00 3.57 0.00
PQAnalysis.io.traj_file.frame_reader 0.00 0.00 3.57 0.00
PQAnalysis.core.residue 0.00 0.00 3.57 0.00
PQAnalysis.atomic_system._standard_properties 0.00 0.00 3.57 0.00
PQAnalysis.analysis.thermal_expansion.thermal_expansion 0.00 0.00 3.57 0.00
PQAnalysis.traj.formats 0.00 0.00 1.79 0.00
PQAnalysis.topology.selection 0.00 0.00 1.79 0.00
PQAnalysis.topology.bonded_topology.bonded_topology 0.00 0.00 1.79 0.00
PQAnalysis.topology.bonded_topology.bond 0.00 0.00 1.79 0.00
PQAnalysis.topology.bonded_topology.angle 0.00 0.00 1.79 0.00
PQAnalysis.io.restart_file.restart_reader 0.00 0.00 1.79 0.00
PQAnalysis.io.input_file_reader.pq.pq_input_file_reader 0.00 0.00 1.79 0.00
PQAnalysis.io.input_file_reader.input_file_parser 0.00 0.00 1.79 0.00
PQAnalysis.io.info_file_reader 0.00 0.00 1.79 0.00
PQAnalysis.io.formats 0.00 0.00 1.79 0.00
PQAnalysis.core.cell.cell 0.00 0.00 1.79 0.00
PQAnalysis.analysis.thermal_expansion.api 0.00 0.00 1.79 0.00
PQAnalysis.analysis.thermal_expansion.init 0.00 0.00 0.00 30.00
PQAnalysis.cli.thermal_expansion 0.00 0.00 0.00 20.00
PQAnalysis.io.input_file_reader.pq_analysis.pqanalysis_input_file_reader 0.00 0.00 0.00 10.00

Messages

message id occurrences
too-many-arguments 18
too-many-instance-attributes 10
inconsistent-return-statements 10
fixme 9
line-too-long 7
unused-import 4
too-many-locals 4
too-complex 4
duplicate-code 4
too-many-branches 3
missing-kwoa 2
invalid-name 2
unused-variable 1
too-many-statements 1
too-many-return-statements 1
too-many-public-methods 1
too-many-lines 1
possibly-used-before-assignment 1
arguments-differ 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants