MCPcopy Create free account
hub / github.com/SINGROUP/dscribe / test_sparse

Function test_sparse

tests/test_kernels.py:107–123  ·  view source on GitHub ↗

Tests that sparse features may also be used to construct the kernels.

()

Source from the content-addressed store, hash-verified

105
106
107def test_sparse():
108 """Tests that sparse features may also be used to construct the kernels."""
109 # Create SOAP features for a system
110 desc = SOAP(
111 species=[1, 8],
112 r_cut=5.0,
113 n_max=2,
114 l_max=2,
115 sigma=0.2,
116 periodic=False,
117 compression={"mode": "off"},
118 sparse=True,
119 )
120 a = molecule("H2O")
121 a_feat = desc.create(a)
122 kernel = AverageKernel(metric="linear")
123 K = kernel.create([a_feat])
124
125
126def test_difference():

Callers

nothing calls this directly

Calls 5

createMethod · 0.95
SOAPClass · 0.90
AverageKernelClass · 0.90
REMatchKernelClass · 0.90
createMethod · 0.45

Tested by

no test coverage detected