GilsonLabUCSD / pAPRika

Advanced toolkit for binding free energy calculations
BSD 3-Clause "New" or "Revised" License
31 stars 14 forks source link

correct way to run amber MPI executables? #200

Closed camattelaer closed 2 months ago

camattelaer commented 2 months ago

Hi all

I've been trying to run sander.MPI within a pAPRika workflow, but unsuccessful.

my minimization run is defined as follows (according to the tutorial):

for window in window_list: 
    simulation = AMBER()
    simulation.executable = "mpirun -np 32 sander.MPI"

    simulation.path = f"windows/{window}/"
    simulation.prefix = "minimize"

    simulation.topology = "../../../03_buildLeap/complex_setup.prmtop"
    simulation.coordinates = "../../../03_buildLeap/complex_setup.inpcrd"
    simulation.ref = "../../../03_buildLeap/complex_setup.inpcrd"
    simulation.restraint_file = "disang.rest"

    simulation.config_gb_min()
    simulation.cntrl["ntr"] = 1
    simulation.cntrl["restraint_wt"] = 50.0
    simulation.cntrl["restraintmask"] = "'@DUM'"
    simulation.cntrl["igb"] = 8

    logging.info(f"Running minimization in window {window}...")
    simulation.run()

When i run this, a minimization takes about 5 min for my particular system. If i only write the input and manually run the mpirun -np 32 sander.MPI -O -i minimization.in -o minimization.out ... command in the respective window folder, it only takes a couple of seconds - which is more according to expectations.

I've also tried:

for window in window_list: 
    simulation = AMBER()
    simulation.executable = "sander.MPI"
    simulation.n_threads = 32
...

but this gives the same - slow - result.

My current workaround would be to use simulation._write_input_file() and then write a couple of lines to do the simulations manually in each folder, but would be interested to know what i am doing wrong.

Thanks in advance

Charles-Alexandre Mattelaer

camattelaer commented 2 months ago

Screenshot from 2024-08-21 18-21-25

After a bit more messing around, i don't think this issue is entirely related to pAPRika...

I tried looping through the folders and submitting jobs directly through my queue (task-spooler) and it ends up taking also quite some time.

If i add a wrapper for submitting to my queue, it runs just as expected...

I'll close this now as this does not seem related to pAPRika, but more towards amber/my system.

Kind regards