Giter Site home page Giter Site logo

number of frames is 0 about vmd-python HOT 3 OPEN

eigenstate avatar eigenstate commented on August 16, 2024
number of frames is 0

from vmd-python.

Comments (3)

jvermaas avatar jvermaas commented on August 16, 2024

Have you looked at the docs? What you are doing in VMD depends on behavior described in the user guide, where molecule.load in VMD 1.9.3 (or I think 1.9.4) will basically wait until all frames are loaded before returning. I think in the rejiggering to get this to work for python3, this side effect disappeared.

from vmd-python.

sjzhao avatar sjzhao commented on August 16, 2024

I just want to load the topo and mdcrd file, then get the total number of frames, and do a for loop base on the frames.
I add a sleep(20) after the load function, but it does not work at all.

from vmd-python.

sjzhao avatar sjzhao commented on August 16, 2024

This is the example from the docs:
from vmd import molecule

molid = molecule.load("parm7", "system.prmtop")
molecule.read(molid, "netcdf", "simulation.nc", skip=5, waitfor=-1)
last_frame = molecule.numframes - 1
molecule.write(molid, "pdb", "last_frame.pdb", first=last_frame)

However, molecule.numframes is a function which require molecule id.
I did molecule.numframes(molid), which return 0

from vmd-python.

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.