Tests that sparse features may also be used to construct the kernels.
()
| 105 | |
| 106 | |
| 107 | def 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 | |
| 126 | def test_difference(): |
nothing calls this directly
no test coverage detected