• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

globus-labs / cascade / 17808755921

17 Sep 2025 07:39PM UTC coverage: 25.34% (-70.0%) from 95.34%
17808755921

push

github

miketynes
initial agentic implementation

261 of 1030 relevant lines covered (25.34%)

0.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/cascade/learning/utils.py
1
"""Tools used by many types of surrogates"""
2
from ase import Atoms
1✔
3
import numpy as np
1✔
4

5

6
def estimate_atomic_energies(data: list[Atoms]) -> dict[str, float]:
1✔
7
    """Estimate the energy offset
8

9
    Args:
10
        data: List of atomic configurations that include energy
11
    Returns:
12
        List of energies per atom type
13
    """
14

15
    # Determine the available species
16
    species = set()
×
17
    for atoms in data:
×
18
        species.update(atoms.symbols)
×
19
    species = sorted(species)
×
20

21
    x = np.zeros((len(data), len(species)))
×
22
    for i, a in enumerate(data):
×
23
        symbols = a.symbols
×
24
        for j, s in enumerate(species):
×
25
            x[i, j] = symbols.count(s)
×
26
    y = [a.get_potential_energy() for a in data]
×
27
    b = np.linalg.lstsq(x, y, rcond=None)[0]
×
28

29
    return dict(zip(species, b))
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc