Skip to content

Commit

Permalink
save a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Sep 24, 2024
1 parent 5e15688 commit 7647721
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/nomad_simulations/schema_packages/force_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ def normalize(self, archive, logger) -> None:
)
if np.all([x < tol for x in energies_diff]):
print('consistent energies')
# logger.warning(
# f'Forces were generated from energies in {self.name},'
# f' but appear to be roughly consistent, with rtol={tol}. '
# )
logger.warning(
f'Forces were generated from energies in {self.name},'
f' but appear to be roughly consistent, with rtol={tol}. '
)
else:
# logger.warning('inconsistent energies')
print('inconsistent energies')
Expand Down Expand Up @@ -670,3 +670,4 @@ def normalize(self, archive, logger) -> None:
super().normalize(archive, logger)

self.name = 'ForceField'
logger.warning('in force field')
6 changes: 4 additions & 2 deletions tests/test_force_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
from nomad_simulations.schema_packages.numerical_settings import ForceCalculations

from nomad.datamodel import EntryArchive
from structlog.stdlib import BoundLogger

# from structlog.stdlib import BoundLogger
from . import logger
from nomad.units import ureg


Expand Down Expand Up @@ -621,7 +623,7 @@ def test_potentials(
populate_parameters(sec_potential, parameters)

sec_FF.contributions.append(sec_potential)
sec_FF.contributions[-1].normalize(EntryArchive, BoundLogger)
sec_FF.contributions[-1].normalize(EntryArchive, logger) # BoundLogger)

potential_dict = sec_FF.contributions[-1].m_to_dict()
potential_dict = {
Expand Down

1 comment on commit 7647721

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/nomad_simulations
   __init__.py4250%3–4
   _version.py11282%5–6
src/nomad_simulations/schema_packages
   __init__.py14286%53–55
   atoms_state.py1902189%31–33, 219–222, 246, 301–302, 370–371, 373, 555, 567–568, 629–633, 648–652, 659
   basis_set.py2402888%8–9, 122–133, 172–185, 208, 391–395, 417–418, 462–465, 584, 615, 617
   force_field.py1917461%135, 141, 191, 200, 214–215, 219, 223–224, 261–270, 273–296, 331–332, 336, 349–355, 375–381, 410–421, 440–446, 505–517, 528–534, 562–564, 670–673
   general.py89891%22–25, 139, 203, 313–314, 324
   model_method.py2667771%28–30, 198–201, 204–211, 303–304, 324, 345–364, 380–406, 409–426, 780, 791, 833–840, 878, 897, 977, 1034, 1109, 1223
   model_system.py2612292%43–45, 520–523, 570–577, 751–752, 974–978, 984–985, 993–994, 999, 1022
   numerical_settings.py2676277%30–32, 235, 237–238, 241–244, 248–249, 256–259, 268–271, 275–278, 280–283, 288–291, 297–300, 487–514, 589, 624–627, 651, 654, 699, 701–704, 708, 712, 759, 763–784, 839–840, 907, 990
   outputs.py1201092%27–28, 270–273, 313–316, 341, 343, 380, 399
   physical_property.py102793%38–40, 220, 349–351
   variables.py861286%26–28, 116, 139, 163, 185, 207, 229, 251, 274, 294
src/nomad_simulations/schema_packages/properties
   band_gap.py51590%26–28, 153–154
   band_structure.py1232580%27–29, 250–283, 296, 303, 339–340, 343, 390–391, 396
   energies.py42979%25–27, 54, 75, 100, 121, 137, 152
   fermi_surface.py17476%25–27, 58
   forces.py25676%26–28, 62, 82, 105
   greens_function.py991387%25–27, 228–229, 232, 253–254, 257, 278–279, 282, 418
   hopping_matrix.py29583%25–27, 76, 112
   permittivity.py48883%25–27, 115–123
   spectral_profile.py26012851%27–29, 75–78, 113–116, 217–318, 374–386, 411–414, 434, 439–442, 484–520, 544, 591–594, 610–611, 616–622
   thermodynamics.py752764%25–27, 53, 74, 90, 99, 108, 119, 128, 155, 165, 175, 190–192, 195, 211, 231–233, 236, 252, 272–274, 277
src/nomad_simulations/schema_packages/utils
   utils.py681479%26–29, 79–88, 97–98, 103, 106
TOTAL268957179% 

Tests Skipped Failures Errors Time
383 0 💤 2 ❌ 0 🔥 6.111s ⏱️

Please sign in to comment.