This file contains hidden or 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
from typing import Union | |
import numpy as np | |
import openmm | |
from openmm import unit | |
class CSVRIntegrator(openmm.CustomIntegrator): | |
""" |
This file contains hidden or 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 typing as t | |
import math | |
def combination(n: int, k: int, m: int) -> t.Generator[int, None, None]: | |
""" | |
Return the m-th combination (in lexicographic order) of the n integers from 0 to | |
n-1, taken k at a time. | |
""" | |
a, b, x = n, k + 1, math.comb(n, k) |