Example #1
0
def hl_diff_calc(all_mol_coords):
    '''controls h**o lumo difference workflow'''
    com_files = ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    job = group([run_gausshl.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
Example #2
0
def max_dipole_calc(all_mol_coords):
    '''controls the max dipole workflow'''
    com_files = ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    job = group([run_gaussmd.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
Example #3
0
def max_dipole_calc(all_mol_coords):
    '''controls the max dipole workflow'''
    com_files = ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    job = group([run_gaussmd.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
Example #4
0
def hl_diff_calc(all_mol_coords):
    '''controls h**o lumo difference workflow'''
    com_files = ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    job =  group([run_gausshl.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
Example #5
0
def reorg_en1(all_mol_coords):
    '''runs initial reorganisation energy calculations'''
    com_files_neut = ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    com_files_neg = ga_setup_selection.com_generator_neg_mol_neg_geom(all_mol_coords)
    com_files = com_files_neut + com_files_neg
    job = group([run_gauss.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
Example #6
0
def reorg_en1(all_mol_coords):
    '''runs initial reorganisation energy calculations'''
    com_files_neut = ga_setup_selection.com_generator_neutral_grndst(
        all_mol_coords)
    com_files_neg = ga_setup_selection.com_generator_neg_mol_neg_geom(
        all_mol_coords)
    com_files = com_files_neut + com_files_neg
    job = group([run_gauss.s(com) for com in com_files])
    run_job = job.apply_async()
    result1 = run_job.get()
    return result1
gen_counter = 1
gen_name = str(args.population_size)+"_"+str(gen_counter)
smiles_string = 'c1ccc2cc3cc4cc5ccccc5cc4cc3cc2c1'
#temp_list = list(smiles_string)
#mutant = ga_setup_selection.mutator(temp_list, mutation_factor = 10, N_number=5)
#mutant_string = ''.join(mutant)
#m3 = Chem.MolFromSmiles(mutant_string)
#print mutant_string
#if args.setup_ga_run == "Y":
    pop = ga_setup_selection.generate_initial_population(smiles_string,args.population_size,args.nitrogen_number)
    print len(pop)
    mol_lst = ga_setup_selection.mol_name_maker(pop)
    all_mol_coords = ga_setup_selection.coords_generator(mol_lst)
    print len(all_mol_coords)
    ga_setup_selection.com_generator_neutral_grndst(all_mol_coords)
    #ga_setup_selection.com_generator_neg_mol_neg_geom(all_mol_coords)
    dump_list = []
    for m in mol_lst:
        name = m.GetProp("_Name")
        pm = AllChem.PropertyMol(m)
        pm.SetProp("_Name", name)
        pm.SetProp("_Energy", None)
        dump_list.append(pm)
    cPickle.dump(dump_list, open(gen_name)+"_gen.p", "w+")

#if args.setup_ga_run == "N":
   #getting right pickle, should always be the latest one
   gen_picks = glob.glob("*_gen.p")
   sorted_gen = sorted(gen_picks, key=lambda gen: int(gen.split("_")[1]))
   latest_gen = sorted_gen[-1]