How to use the smact.benchmarking.utilities.timeit function in SMACT

To help you get started, we’ve selected a few SMACT examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WMD-group / SMACT / smact / benchmarking / smact_benchmark.py View on Github external
@timeit(delim=True, n=100)
def mutator_test_run():
    MutatorBenchmarker().run_tests()
github WMD-group / SMACT / smact / benchmarking / pymatgen_benchmark.py View on Github external
@timeit(delim=True, n=100)
def probability_test_run():
    ProbabilityBenchmarker().run_tests()
github WMD-group / SMACT / smact / benchmarking / pymatgen_benchmark.py View on Github external
    @timeit
    def __pair_corr(self):
        """Get pair correlation."""
        pairs = cwr(self.sp.species, 2)

        for s1, s2 in pairs:
            self.sp.pair_corr(s1, s2)
github WMD-group / SMACT / smact / benchmarking / smact_benchmark.py View on Github external
    @timeit
    def run_tests(self):
        """Initialize Mutator and perform tests."""
        self.__cm_setup()
        self.__pair_corr()
github WMD-group / SMACT / smact / benchmarking / pymatgen_benchmark.py View on Github external
    @timeit
    def __sp_setup(self):
        """Set up SubstitutionProbability."""
        self.sp = SubstitutionProbability()
github WMD-group / SMACT / smact / benchmarking / pymatgen_benchmark.py View on Github external
    @timeit
    def run_tests(self):
        """Run all tests."""
        self.__sp_setup()
        self.__pair_corr()
github WMD-group / SMACT / smact / benchmarking / smact_benchmark.py View on Github external
    @timeit
    def __pair_corr(self):
        """Get pair correlations."""
        self.cm.complete_pair_corrs()
github WMD-group / SMACT / smact / benchmarking / smact_benchmark.py View on Github external
    @timeit
    def __cm_setup(self) -> CationMutator:
        """Create a CationMutator."""
        self.cm = CationMutator.from_json()