You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'm using bespoke to parametrize ligands for relative free energy calculations. I successfully parametrized tens of ligands. I'm currently struggling to efficiently integrate bespoke within our cluster, which is using slurm for job scheduling. Best case scenario would be if I could run executor on login node that would run permanently and upon ligand submition, it would spawn slurm jobs for fragmentation, and then separate job for each torsion qc data generation, etc. This way, it would be efficient in terms of cluster resources alocation. Is it possible to do this using current bespoke code? Or do you have some other suggestion how to effectively parametrize ligands on HPC cluster? My ligands are quite big and flexible, so I need to reuse generated parameters. I also want to be able to submit ligands to executor, which is processing some ligands. I also need short jobs (<4h) for efficient cluster usage.
For parametrizing batch of ligands, I'm currently using this script:
from openff.bespokefit.executor import BespokeExecutor, BespokeWorkerConfig, wait_until_complete
from openff.toolkit import ForceField, Molecule
from openff.units import unit
from openff.interchange import Interchange
import argparse
factory = BespokeWorkflowFactory(initial_force_field="openff-2.0.0.offxml")
parser = argparse.ArgumentParser(description='Applies openff forcefield with custom bespoke dihedral parameters')
parser.add_argument('--ligs',
dest='ligs',
type=str,
nargs="+",
help='list of input ligand folders. lig_ will be automaticaly prepended')
args, unknown = parser.parse_known_args()
print (args)
inMols=[]
for lig in args.ligs:
inMols.append(Molecule.from_file("lig_%s/mol_gmx.sdf"%lig))
workflow_schemas = factory.optimization_schemas_from_molecules(molecules=inMols)
with BespokeExecutor(
n_fragmenter_workers = len(inMols),
n_optimizer_workers = 8,
n_qc_compute_workers = 16,
qc_compute_worker_config=BespokeWorkerConfig(n_cores='4'),
directory="/home2/jurajdobias/gromacs/md/ligands_bespoke/executor"
) as executor:
ids=[]
# Submit our workflow to the executor
for workflow_schema in workflow_schemas:
task_id = executor.submit(input_schema=workflow_schema)
ids.append(task_id)
# Wait until the executor is done
for idd in ids:
output = wait_until_complete(idd)
if output.status == "success":
# Save the resulting force field to an OFFXML file
for lig, input_molecule in zip (args.ligs, inMols):
output.bespoke_force_field.to_file("lig_%s/mol_gmx.offxml"%lig)
topology = input_molecule.to_topology()
topology.box_vectors = unit.Quantity([4, 4, 4], unit.nanometer)
out = Interchange.from_smirnoff(force_field=output.bespoke_force_field, topology=topology)
system = out.to_openmm()
out.positions = input_molecule.conformers[0]
out.to_top("lig_%s/system.top"%lig)
out.to_pdb("lig_%s/system.pdb"%lig)
elif output.status == "errored":
# OR the print the error message if unsuccessful
print(output.error)
It is working fine, but I experienced issues after rerunning script if calculation was canceled due to time limit. Problem is also, that I have to wait until this finishes before submitting new ligands.
Thank you for your response and all the effort you put into bespoke.
Juraj
Software versions
Which operating system and version are you using? AlmaLinux release 9.1
How did you install BespokeFit? mamba install -c conda-forge openff-bespokefit
Are you using Apple Silicon? If so, are you running BespokeFit in Rosetta or directly? no
Description
Hello. I'm using bespoke to parametrize ligands for relative free energy calculations. I successfully parametrized tens of ligands. I'm currently struggling to efficiently integrate bespoke within our cluster, which is using slurm for job scheduling. Best case scenario would be if I could run executor on login node that would run permanently and upon ligand submition, it would spawn slurm jobs for fragmentation, and then separate job for each torsion qc data generation, etc. This way, it would be efficient in terms of cluster resources alocation. Is it possible to do this using current bespoke code? Or do you have some other suggestion how to effectively parametrize ligands on HPC cluster? My ligands are quite big and flexible, so I need to reuse generated parameters. I also want to be able to submit ligands to executor, which is processing some ligands. I also need short jobs (<4h) for efficient cluster usage.
For parametrizing batch of ligands, I'm currently using this script:
It is working fine, but I experienced issues after rerunning script if calculation was canceled due to time limit. Problem is also, that I have to wait until this finishes before submitting new ligands.
Thank you for your response and all the effort you put into bespoke.
Juraj
Software versions
conda list
?Output of
conda list
The text was updated successfully, but these errors were encountered: