Source code for example_workflow

from obelix.run_workflow import *
import chemspax

[docs] ligand_excel_file = os.path.join(os.getcwd(), 'test_mace.xlsx')
[docs] ligand_df = pd.read_excel(ligand_excel_file).dropna()
[docs] ligand_name = ligand_df['Name']
[docs] ligand_smiles = ligand_df['smiles']
[docs] auxiliary_ligands = ['CC#[N:1]', 'CC#[N:1]']
[docs] substrate = ['CC#[N:1]']
[docs] geom = 'SP'
[docs] central_atom = '[Rh+]'
# MACE input
[docs] mace_input = {'bidentate_ligands': ligand_smiles, 'auxiliary_ligands': auxiliary_ligands, 'names_of_xyz': ligand_name, 'central_atom': central_atom, 'geom': geom, 'substrate': substrate}
# The data files packaged along withchemspax can be accessed by pointing to the path where chemspax is installed in the local mahcine
[docs] chemspax_directory = os.path.dirname(chemspax.__file__)
[docs] path_to_substituents = os.path.join(chemspax_directory, "substituents_xyz")
[docs] path_to_database = os.path.join(path_to_substituents, "manually_generated", "central_atom_centroid_database.csv")
[docs] substituent_df = pd.read_excel(os.path.join(os.getcwd(), 'test_chemspax.xlsx'), sheet_name='Sheet1').dropna()
[docs] substituent_list = np.array(substituent_df[['R1', 'R2', 'R3', 'R4']])
# print(substituent_list)
[docs] names = substituent_df['Name']
[docs] func_list = substituent_df['Functionalization']
# print(skeleton_list) # path_to_hand_drawn_skeletons = os.path.join(os.getcwd(), "skeletons") # path_to_output = os.path.join(os.getcwd(), "complexes")
[docs] chemspax_input = {'substituent_list' : substituent_list}
# 'path_to_database' : path_to_database, # 'path_to_substituents' : path_to_substituents}
[docs] workflow = Workflow(mace_input = mace_input, chemspax_input=chemspax_input, path_to_workflow = os.getcwd() + '/wf_test5', geom='BD')
workflow.prepare_folder_structure() workflow.run_mace() workflow.run_chemspax(names=names, functionalization_list=func_list)