Code Monkey home page Code Monkey logo

Comments (7)

kyleabeauchamp avatar kyleabeauchamp commented on September 20, 2024

+1

I have a DCD that is too big for me to read.

What do you want this to look like? Arbitrary slicing for reads? Append for writes?

from mdtraj.

rmcgibbo avatar rmcgibbo commented on September 20, 2024

no arbitrary slicing. something like

class DCDFile(object):
    def __init__(self, filename, mode='r'):
        """Open a DCD file"""

    def read_frames(n_frames=1):
        """Return the next n frames of the trajectory"""

    def close():
        """Close the file"""

from mdtraj.

kyleabeauchamp avatar kyleabeauchamp commented on September 20, 2024

I suppose a related feature would be to read only a subset of the atoms.

from mdtraj.

rmcgibbo avatar rmcgibbo commented on September 20, 2024

I need to look in the source, but I don't think that's possible with the DCD binary format. If you're doing a streaming analysis on a small number of frames at a time, then thats really how you're going to get the memory win.

from mdtraj.

kyleabeauchamp avatar kyleabeauchamp commented on September 20, 2024

Well, to me there's no reason why we couldn't implement this on the (c/p)ython side of things. I agree it might require an extra copy...

from mdtraj.

rmcgibbo avatar rmcgibbo commented on September 20, 2024

Yeah, it's not possible to actually load (and malloc space for) only some of the atoms. The DCD reader can give you the appearance of this by pre-slicing the results, but I don't think this is a good idea.

from mdtraj.

rmcgibbo avatar rmcgibbo commented on September 20, 2024

Okay, I take that back. You could, but you have to hack the binary format of the DCD file, instead of using the c-level dcd file reader functions. This is not worth it.

from mdtraj.

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.