Giter Site home page Giter Site logo

Comments (2)

mattwthompson avatar mattwthompson commented on June 10, 2024

I noticed the version of MDTraj you're reading the example from is pretty out of date (sometime in 2016). In this case it shouldn't matter since the file hasn't been updated since around then, but you should try to use a more recent version (1.9.x). That being said, the actual source code you're running up against is even older, so I'm not sure why this is failing for you. My guess is you're using your own trajectory, not the ala2.h5 file provided?

It's probably be best to just set leaders.unitcell_vectors to whatever unitcell vectors you have in your production trajectory.

from mdtraj.

averysader avatar averysader commented on June 10, 2024

Hi Matt, thanks for replying quickly.
I'm using version 1.9.7 for analysis, but the docs are not loading for me. Anyway, I am in fact using my own trajectory.
If I understand the documentation correctly, the unitcell_vectors method takes a 3x3 array of XYZ coordinates generated by the MD program and the number of frames in the trajectory as input? At which point in the code would I have to append the unit cell vectors? Right after 'leaders' is defined as a set of XYZ coords?

leaders = md.Trajectory(xyz=np.empty((0, subsampled.n_atoms, 3)),
topology=subsampled.topology)
leaders.unitcell_vectors(array, shape = (n_frames, 3, 3)) <--- Here?
leader_labels = []

Please forgive my ignorance as I'm trying to work through this as best I can. In my case, I suppose my number of frames that will go into 'leaders' is dictated by other parameters in the code, right? I hope this is clearly stated.

Thanks again,

  • Avery

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.