Skip to content

Commit

Permalink
Skip un-prepped receptors
Browse files Browse the repository at this point in the history
  • Loading branch information
jchodera committed Mar 29, 2020
1 parent 2168cf9 commit b2c1729
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/02-dock-ligands-to-all-receptors-multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def read_csv_molecules(filename):
#prefix = 'mpro_fragments_03_25_2020'
molecules = read_csv_molecules(os.path.join('../molecules', prefix + '.csv'))


def dock_molecules_to_receptor(receptor_filename):
"""
Dock the specified molecules, writing out to specified file
Expand Down Expand Up @@ -119,6 +120,9 @@ def dock_molecules_to_file(fragment):
fragment_molecules = read_csv_molecules(os.path.join('../molecules', 'mpro_fragments_03_25_2020.csv'))
all_fragments = [ oechem.OEGetSDData(molecule, "fragments") for molecule in fragment_molecules ]

# filter fragments
all_fragments = [ fragment for fragment in all_fragments if os.path.exists(os.path.join(f'../receptors/Mpro-{fragment}-receptor.oeb.gz')) ]

# Dock molecules in parallel
print('Processing in parallel...')
from multiprocessing import Pool
Expand Down

0 comments on commit b2c1729

Please sign in to comment.