This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shift_bit_length(n): | |
return 1 << (n - 1).bit_length() | |
def sample_one_sphere(coords, radius, n, sobol=True): | |
if sobol: | |
m = int(np.log2(shift_bit_length(n))) | |
x = norm.ppf(qmc.Sobol(d=3, scramble=True).random_base2(m)) | |
else: | |
x = np.random.normal(size=(n, 3)) | |
ssq = np.sum(x**2, axis=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# In[3]: | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import numpy as np | |
import ase | |
# New official implementation | |
from tblite.ase import TBLite as XTB3 |