Coder Social home page Coder Social logo

Problems running adaptive MD script about htmd HOT 16 OPEN

smar966 avatar smar966 commented on June 12, 2024
Problems running adaptive MD script

from htmd.

Comments (16)

stefdoerr avatar stefdoerr commented on June 12, 2024

Hi, how are you running this script? In a crontab maybe?

In any case, set htmd.config.config(njobs=2, ncpus=1) so that it doesn't parallelize anything just to be sure

from htmd.

smar966 avatar smar966 commented on June 12, 2024

Hi Stefan.
Your suggestion did not change much. Now, in the log file I'm getting the warning: "The ncpus config option has been renamed to njobs. Please use njobs instead."

To run the script I specify the singularity file, and then execute it it like this:
#######
HTMD3=/storage/brno1-cerit/home/sergio/HTMD3_home/htmd_2022_10_19.sif
singularity exec -H pwd $HTMD3 python adaptive.py > adaptive.log 2>&1

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

ok could you set njobs then to 1? I have the feeling singularity is not allowing it to create new processes so let's just run it all single threaded

from htmd.

smar966 avatar smar966 commented on June 12, 2024

Unfortunately, either specifying 1 or 2 CPUs (njobs) the results are the same. :(
The adaptive script works if I use HTMD2, but then the MD jobs from the new epoch all crash, I believe due some incompatibility...

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

What versions are HTMD2 / HTMD3?

from htmd.

smar966 avatar smar966 commented on June 12, 2024

HTMD2 is a very old version from 4+ years ago (available to me via "module").
HTMD3 is a recent version from October 2022, operating via singularity

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

Can you upload here the latest log file from when we specified single njobs/ncpu?

from htmd.

smar966 avatar smar966 commented on June 12, 2024

Sure. Here is one of my many attempts
adaptive.3.log

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

The errors which draw my attention are the following two:

htmd.projections.metric - WARNING - Error while projecting simulation id: 2. "Cannot align molecules. The two selections produced different number of atoms"

and

  File "/mnt/storage-brno1-cerit/nfs4/home/sergio/apoE/apoE4-dimer_6NCO+lig_adaptive/adaptive_meta.py", line 16, in <module>
    md.projection = MetricRmsd(trajrmsdstr='protein and name CA', refmol=Molecule('reference.pdb'))
  File "/opt/conda/lib/python3.9/site-packages/moleculekit/molecule.py", line 343, in __init__
    self.read(filename, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/moleculekit/molecule.py", line 1189, in read
    mol = rr(fname, frame=frame, topoloc=tmppdb, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/moleculekit/readers.py", line 1185, in PDBread
    sequenceID(parsedtopo.serial) + 1
  File "/opt/conda/lib/python3.9/site-packages/moleculekit/util.py", line 238, in sequenceID
    raise RuntimeError("An empty array was passed to sequenceID")
RuntimeError: An empty array was passed to sequenceID

I think your reference.pdb file is broken. Can you try just loading it with:

from moleculekit.molecule import Molecule
mol = Molecule("reference.pdb")

It will probably throw the same error

from htmd.

smar966 avatar smar966 commented on June 12, 2024

reference.pdb seems fine and that code did not generate any error. But the molecules all trajectories from epoch 1 are "broken", in the sense of the PBC. I thought this was due to some change in the default setting in htmd3, which would not wrap the molecules in one periodic box. Do you think this could be source of the problem?

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

I don't see how that could be the case because the error is quite specific that it cannot read the reference.pdb. I am a bit suspicious because you use a relative path to read the file so it might not be the reference.pdb file you tried which is giving the error if there are multiple ones?

What you consider broken in sense of PBC is probably just unwrapped trajectories. Can you load one in VMD and send me a screenshot if it's not confidential? That's not an issue and should not affect adaptive sampling. It calculates wrapped distances internally.

from htmd.

smar966 avatar smar966 commented on June 12, 2024

Hi. No, the reference.pdb seems fine.
The simulations are definitely unwrapped. I don't know why, because every time before they were wrapped by default. Unless something changed in the new defaults of the new HTMD. But should this be a problem?
Anyway, in the link below you can find one of the filtered MDs, the reference.pdb and the adaptive script that I'm using.

https://mega.nz/folder/d1owAT5J#nu6zd0K_rVZodnmlNzAaTA

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

Hi again and sorry for the delay. Could you please try to run the script outside of a singularity container? Just create a new conda env with the latest HTMD version.
I am quite sure that what happened is that multiple jobs started the same script, the one started writing the reference.pdb file, the second script tried to read the reference.pdb while the other one was still writing it and everything crashed and burned.
If you manually execute from a console that adaptive_meta.py script I have a feeling it will work fine.

from htmd.

smar966 avatar smar966 commented on June 12, 2024

Hi Stefan. The problem here is that I am using a grid environment on a supercomputer and we don't have permissions to install any software there. So I need to convince someone who is really busy to install HTMD with conda, and I'm not sure I will succeed. But I'll try.

from htmd.

stefdoerr avatar stefdoerr commented on June 12, 2024

the alternative is finding out why your singularity container got started multiple times

from htmd.

smar966 avatar smar966 commented on June 12, 2024

ok, I'll discuss with my colleague and I'll let you know. thank you!

from htmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.