
Forgot to mention that you do not need to read all frames at startup, though for performance reasons it is usually good to memory map your coordinate file, like this code snippet from the DCD-handling code: self.file = open(dcdfile,'rb') if hasattr(self.file, 'fileno'): print "using memory mapping" from mmap import mmap, ACCESS_READ self.file = mmap(self.file.fileno(), 0, access=ACCESS_READ) else: print "not using memory mapping" --Eric On May 20, 2013, at 10:18 PM, Eric Pettersen wrote:
Hi Denny, Hardly a newbie question! Anyway, there actually is documentation for adding a format at the end of the MD Movie help page:
http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/movie/movie...
You should read that and see how far it gets you. Feel free to send any questions here or directly to me -- that will help me determine where the documentation needs more detail. BTW, you were certainly on the right track in that you need to add a folder to Trajectories/formats that supports your format. Though unless your format is based on DCD files, Gromacs is probably a better example to look at than Charmm. Anyway, like I said, don't be shy with the questions!
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
On May 17, 2013, at 9:37 PM, Dennis N Bromley <dbromley@uw.edu> wrote:
Hi,
I apologize if this is a newbie question - I've searched for material but didn't seem to find any answers.
I would like to write a plugin that allows chimera to parse up my own trajectory format. I would like it to be seekable rather than loading the whole shebang into memory at once. Is there an example trajectory parser out there or maybe someone could point me in the right direction? I saw charmm.py, which might be a good place to start, but I am not sure of which bits I need to replicate. Any pointers on a good place to begin looking would be very appreciated.
thank you! -denny-
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev