maccallumlab / meld

Modeling with limited data
http://meldmd.org
Other
51 stars 28 forks source link

MELD-DNA #161

Open stianale opened 5 months ago

stianale commented 5 months ago

Hi,

This looks like a very good software. However, I have no clue how to run it, much less MELD-DNA. The documentation that exists seems very intricate and not easily reproducible, and I find no walkthrough, examples etc. on how to use MELD-DNA. I cloned this repo and downloaded the Zenodo zip file in the same directory. After having installed MELD using conda-forge, and following the walkthrough on how to install mpi4py, I guessed trying python setupMELD.py would be a start but get this error:

Traceback (most recent call last):
  File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/MELD/meld/MELD-DNA-Zenodo/P1-General-Binding/input-files/setupMELD.py", line 9, in <module>
    from meld.system.restraints import LinearRamp,ConstantRamp
ImportError: cannot import name 'LinearRamp' from 'meld.system.restraints' (/home/stian/miniconda3/envs/my-meld-project/lib/python3.9/site-packages/meld/system/restraints.py)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
GoldEagle93 commented 5 months ago

Hello Stianale,

The error you are getting is most likely due having a newer version of MELD compared to when those scripts were generated. See if the problem exists with simple protein systems. I'll try to reproduce the script with newer versions and update in the coming days. I'll also try to post an updated walkthrough.

Reza

stianale commented 5 months ago

Thanks. I tried the simple protein script in getting_started.rst, but get this error:

Traceback (most recent call last):
  File "/media/stian/hgst6tb/OneDrive/DUS/PhD/All_Neis/Representative_genomes/meld/test_setup.py", line 13, in <module>
    builder = system.AmberSystemBuilder(build_options)
NameError: name 'system' is not defined
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
stianale commented 5 months ago

I substituted the line builder = system.AmberSystemBuilder(build_options) for builder = meld.AmberSystemBuilder(build_options), which seems to have fixed the "NameError: name 'system' is not defined" problem. The output now:

$ python test_setup.py 
/home/stian/miniconda3/envs/meld/lib/python3.9/site-packages/openmm/app/internal/amber_file_parser.py:1102: UserWarning: Non-optimal GB parameters detected for GB model GBn2
  warnings.warn(
WARNING: No velocities found, setting to zero

So I went on doing launch_remd_multiplex --debug --platform Reference, because I have no GPUs, and I get this error:

Traceback (most recent call last):
  File "/home/stian/miniconda3/envs/meld/bin/launch_remd_multiplex", line 32, in <module>
    main()
  File "/home/stian/miniconda3/envs/meld/bin/launch_remd_multiplex", line 28, in main
    launch.launch_multiplex(args.platform, console, args.debug)
AttributeError: module 'meld.remd.launch' has no attribute 'launch_multiplex'
MPI node 1/1 raised exception.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

I then noticed that there are no scripts named "launch_remd_multiplex" in the github repo. I changed launch_remd_multiplex to launch_remd:

$ launch_remd --debug --platform CPU
loading data store
initializing communicator
Warning: importing 'simtk.openmm' is deprecated.  Import 'openmm' instead.

It seems to me that the conda-forge installation of MELD does not actually match the current state of this repo???

GoldEagle93 commented 5 months ago

It sounds like a mismatch but these errors are out of my expertise. I'd wait for MELD developers to take care of this case.

jlmaccal commented 5 months ago

Yes, the last version of MELD with a conda release is 0.6.1. Cutting on a new release is on the list of things to do, but finding time is difficult.

stianale commented 5 months ago

Do you know which version of MELD was used in the original MELD-DNA publication?

I do not have GPUs, nor access to any HPC cluster. I read that MELD-DNA needs 30 GPUs, running for perhaps two days. That sounds extensive. Maybe there is a way to use all my 16 CPU cores, speeding it up somewhat, or maybe running MELD-DNA locally is just not feasible?

GoldEagle93 commented 5 months ago

I think it was 0.4.19.

The reason we use 30 GPUs is that MELD runs replica exchange, so one simulation on each GPU. While I don't think you will be able to run any significant amount on CPU, even if you could, you will be limited to 16 replicas which might not be enough depending on your system of interest.

stianale commented 5 months ago

Thanks for the helpful answers.

I can't envision getting access to 30 GPUs even on a cluster, sounds excessive. I understand it is necessary for the exhaustive molecular dynamics, but due to this is very hard to replicate for others. Maybe the scripts could benefit from a rewrite. For GROMACS, for example, I am able to run up to 70 nanoseconds of protein-DNA complexes in a day on my desktop that does not even have GPUs.

stianale commented 2 months ago

Hello again,

Maybe I misunderstood the GPU requirement... is it 30 GPU cores or strictly speaking 30 GPUs that are needed?

GoldEagle93 commented 2 months ago

It is around 30 separate GPUs that are needed (each GPU has thousands of cores). The exact number of GPUs required depends on the system size and how you set up the replica exchanging system but most of what we do is fine with 30.

alberto99 commented 2 months ago

hi, You should also be able to run the different number of replicas in 1 GPU. if you want to run 30 replicas, it will take 30 times longer than running a 30 GPU job. Best,