Hello all!
What I need to my extension is to save a PDB relative to a map and then open it to the model panel.
Copying it to the model panel does not make sense to me because I need to fix the positions of the moved PDB relative to the map.
Could it be something like this?
# Get opened molecule (the one selected in the menu)
m = self.object_menu.getvalue()
# Make copy using the copy_molecule native functionality from Chimera
from Molecule import copy_molecule
mc = copy_molecule(m)
# Set copy name
mc.name = m.name.split('.')[0] + '_' + self.chosen_solution + '.pdb'
from Midas import open, write
write(mc, self.map_menu.volume(), self.cwd)
open(self.cwd)
Thank you in advance!