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

NLESC-JCER / QMCTorch / 14928183883

09 May 2025 11:44AM UTC coverage: 84.285%. First build
14928183883

Pull #187

github

web-flow
Merge 7318ce1b4 into 20fe7ebf9
Pull Request #187: Clean up Main

952 of 1326 branches covered (71.79%)

Branch coverage included in aggregate %.

224 of 290 new or added lines in 27 files covered. (77.24%)

4551 of 5203 relevant lines covered (87.47%)

0.87 hits per line

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

58.33
/qmctorch/wavefunction/orbitals/backflow/kernels/backflow_kernel_autodiff_inverse.py
1
import torch
1✔
2
from torch import nn
1✔
3
from .backflow_kernel_base import BackFlowKernelBase
1✔
4
from .....scf import Molecule
1✔
5

6
class BackFlowKernelAutoInverse(BackFlowKernelBase):
1✔
7
    def __init__(self, mol: Molecule, cuda: bool, weight: float = 0.0) -> None:
1✔
8
        """Compute the back flow kernel, i.e. the function
9
        f(rij) where rij is the distance between electron i and j
10
        This kernel is used in the backflow transformation
11
        .. math:
12
            q_i = r_i + \\sum_{j\\neq i} f(r_{ij}) (r_i-r_j)
13
        """
14
        super().__init__(mol, cuda)
×
NEW
15
        self.weight = nn.Parameter(torch.as_tensor([weight]))
×
16

17
    def _backflow_kernel(self, ree:torch.Tensor) -> torch.Tensor:
1✔
18
        """Computes the kernel via autodiff
19

20
        Args:
21
            ree ([type]): [description]
22

23
        Returns:
24
            [type]: [description]
25
        """
26
        eye = torch.eye(self.nelec, self.nelec).to(self.device)
×
27
        mask = torch.ones_like(ree) - eye
×
28
        return self.weight * mask * (1.0 / (ree + eye) - eye)
×
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