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
import numpy as np | |
def cgsolve_dir_sym(get_A, get_b, x, thresh=1e-10, max_cycles=10_000): | |
"""Solve 'Ax = b for x' for SYMMETRIC matrix A. | |
For the case of density matrix projection b would correspond to the mixed | |
overlap matrix S_21 w/ shape (dim2, dim1) and A would be the SYMMETRIC overlap | |
matrix in the new basis set w/ shape (dim2, dim2). |
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 | |
import argparse | |
import io | |
from math import sqrt | |
from pathlib import Path | |
import struct | |
import sys | |
import numpy as np |
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
import numpy as np | |
def is_linear(coords3d: np.ndarray, rad_thresh: float = 1e-12) -> bool: | |
"""Determine linearity of points in R³. | |
Linearity is checked by comparing dot products between | |
successive point pairs. Coinciding points are NOT checked. | |
""" |
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 asyncio | |
import datetime | |
import functools | |
from pathlib import Path | |
import numpy as np | |
import matplotlib.pyplot as plt |
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
import argparse | |
import itertools as it | |
from pathlib import Path | |
import psutil | |
import sys | |
import time | |
import numpy as np | |
import scipy as sp | |
from scipy.spatial.distance import pdist |
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
! gfortran -lblas fkill.f90 && ./a.out | |
program fkill | |
use iso_fortran_env, only: int32, int64, real64 | |
implicit none | |
integer(kind=int32) :: i | |
integer(kind=int64) :: mat_sizes(5) = (/ 10, 50, 100, 200, 250 /) | |
integer(kind=int64) :: ms | |
real(kind=real64), allocatable, dimension(:, :) :: mat, res |
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 | |
from pathlib import Path | |
import shutil | |
import traceback | |
from pysisyphus.calculators import ORCA | |
from pysisyphus.helpers import geom_loader |
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 argparse | |
import sys | |
from pysisyphus.Geometry import Geometry | |
from pysisyphus.helpers import geom_loader | |
def parse_args(args): |
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 | |
import os | |
from pathlib import Path | |
import subprocess | |
import sys | |
import tempfile | |
import yaml |
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
import numpy as np | |
from pysisyphus.Geometry import Geometry | |
from pysisyphus.optimizers.Optimizer import Optimizer | |
from pysisyphus.optimizers.LBFGS import LBFGS | |
from pysisyphus.optimizers.RFOptimizer import RFOptimizer | |
from pysisyphus.optimizers.closures import small_lbfgs_closure | |
from pysisyphus.optimizers.restrict_step import scale_by_max_step | |
from pysisyphus.helpers_pure import highlight_text |
NewerOlder