On 03/04/14 04:45, Oliver Clarke wrote:
Hi all,

Is the functionality of ‘Calculate-->Merge Molecules’ available from the 
scripting interface?

Yes.

I couldn’t find it in the manual. There is a function named merge_molecules, 
but I don’t know what arguments it takes and it does not do what I would expect 
- I’d like it to take two mol_ids and merge the second one with the first, but 
that does not seem to be the case.

Recall that you can merge many molecules with a "first" molecule, then you're golden.

merge_molecules(imol_ref, [imol_daughter])

Although not written in python, I believe that the documentation hints that the second argument is a list of molecule numbers.


I’d like this function so I can write a little shortcut that will allow me to 
click on two fragments and join them, rather than having to scroll through the 
list of mol_ids of various newly placed helices etc.

I guess I could use replace_fragment if I add a dummy atom to the first 
molecule and then replace it with the second -

Yikes! :-)

HTH,

Paul.

Reply via email to