def test_systematic_search_multiplicity(self): self.conformer_3rad.ase_molecule.set_calculator(ase.calculators.emt.EMT()) self.conformer_4rad.ase_molecule.set_calculator(ase.calculators.emt.EMT()) confs_3rad = systematic_search(self.conformer_3rad, delta=180.0, energy_cutoff = "default", rmsd_cutoff = "default", multiplicity = True) confs_4rad = systematic_search(self.conformer_4rad, delta=180.0, energy_cutoff = "high", rmsd_cutoff = "loose", multiplicity = True) self.assertTrue(confs_3rad[0].rmg_molecule.multiplicity == 2) self.assertTrue(confs_3rad[1].rmg_molecule.multiplicity == 4) self.assertTrue(confs_4rad[0].rmg_molecule.multiplicity == 1) self.assertTrue(confs_4rad[1].rmg_molecule.multiplicity == 3) self.assertTrue(confs_4rad[2].rmg_molecule.multiplicity == 5)
def generate_conformers(self, ase_calculator=None): """ A method to generate an ensemble of low energy conformers. Currently only supports a systematic search with the goal of adding evolutionary searches Variables: - method (str): the method of the conformer search. Currently only systematic is supported - calculator (ASECalculator): the calculator you want to evaluate your conformers with. Returns: - ts (dict): a dictionary containing an ensemble of low energy transition state geometries in the forward and reverse direction """ assert ase_calculator, "Please provide an ASE calculator object" from autotst.conformer.systematic import systematic_search for direction, conformers in self.ts.items(): conformer = conformers[0] conformer.ase_molecule.set_calculator(ase_calculator) conformers = systematic_search(conformer, delta=120) for conformer in conformers: conformer.direction = direction self.ts[direction] = conformers return self.ts
def generate_conformers(self, ase_calculator): from autotst.conformer.systematic import systematic_search, find_all_combos for smiles, conformers in self.conformers.items(): conformer = conformers[0] conformer.ase_molecule.set_calculator(ase_calculator) conformers = systematic_search(conformer) self.conformers[smiles] = conformers return self.conformers
def generate_conformers(self, method="systematic", calculator=None): possible_methods = [ "systematic", # "ga", # "es" ] assert calculator, "Please provide an ASE calculator object" assert method in possible_methods, "Please provide a valid conformer search method." from autotst.conformer.systematic import systematic_search, find_all_combos for smiles, conformers in self.conformers.items(): conformer = conformers[0] conformer.ase_molecule.set_calculator(calculator) conformers = systematic_search(conformer) self.conformers[smiles] = conformers return self.conformers
def generate_conformers(self, method="systematic", calculator=None): """ This isn't working right now... """ possible_methods = [ "systematic", # "ga", # "es" ] assert calculator, "Please provide an ASE calculator object" assert method in possible_methods, "Please provide a valid conformer search method." from autotst.conformer.systematic import systematic_search, find_all_combos for direction, conformers in self.ts.iteritems(): conformer = conformers[0] conformer.ase_molecule.set_calculator(calculator) #print conformer.ase_molecule.get_calculator() _, conformers = systematic_search(conformer) self.ts[direction] = conformers return self.ts
def test_systematic_search(self): self.conformer.ase_molecule.set_calculator(EMT()) confs = systematic_search(self.conformer, delta=180) self.assertTrue(0 < len(confs) <= 3)
def test_systematic_search(self): "Test that the systematic search can find more than 1 conformer" self.conformer.ase_molecule.set_calculator(ase.calculators.emt.EMT()) confs = systematic_search(self.conformer, delta=180.0) self.assertTrue(1 < len(confs) <= 3)