attentionbydesign / tymera

Custom Scripts
GNU General Public License v3.0
0 stars 0 forks source link

Ideas for pdbclean & pdbwriter #12

Open attentionbydesign opened 2 weeks ago

attentionbydesign commented 2 weeks ago

started working on pdbjoin() within the pdbwriter module of PDB_Manager

attentionbydesign commented 2 weeks ago

Interestingly, the standard accelerator 'op' that opens the "Open File in Chimera" dialog is defined as such

def open_file(): 'Show the main Chimera open file dialog' import chimera.tkgui chimera.tkgui._importModel()

attentionbydesign commented 2 weeks ago

So it looks like the key method here is

chimera.openModels.open('path/to/file')

which seems to be the only code that would open anything within the openPath() method of the chimera.tkgui module.

the Apply() method of of the _ImportDialog class in tkgui ends with a loop that applies openPath() over what seems like all the selected files in the Open File dialog

_ImportDialog is what is returned by the importDialog() function in tkgui

and _importModel() simply calls importDialog().enter()

and that takes us back to the beginning pretty much.


Unfortunately, openModels is really just a python alias for _chimera.OpenModels, meaning I can't see the source code, I don't think...

for now,

attentionbydesign commented 1 week ago

chimera.openModels.open('path/to/file.ext', openAs = 'filetype')

turned out to be the appropriate syntax, with 'filetype' = 'PDB'.

attentionbydesign commented 1 week ago

Remaining Issues for PDB Clean/Write:

PDBWriter

PDBClean

attentionbydesign commented 1 week ago