On 10/01/14 02:30, Seth Harris wrote:
Hi all & Paul,

Sometime back I found or was taught or given this:

(add-key-binding "Add Water" "w" (lambda () (place-typed-atom-at-pointer "Water")))

(Probably from "Pauls-key-bindings-for-coot"...)

I was looking for a quick way while browsing map peaks to add waters that the 'find waters' algorithms had overlooked for one reason or another.

It fell into disuse, however, as I'd end up with all these waters in the "Pointer Atoms" object, and it would be a chore to reunite them with the primary pdb in question, accounting for numbering differences of already existing waters.

I'd much rather replicate what the "Place atom at pointer..." + icon dialogue does, where you tell it which molecule you want to add to and it takes care of the numbering appropriately.

So, is it simple to do this on key binding where function would be "put water at pointer but add it to mol 0 with appropriate incremental residue numbering"?

I see.

I guess (without testing) that adding the following should do what you want:

(set-pointer-atom-molecule 0)



(I tend to fire coot up from scripts, so can guarantee that mol number 0 is the one I want to use...)

Coot is designed so that you can capture the molecule number and work with it:

(let ((imol (read-pdb "refine.pdb"))

   (set-pointer-atom-molecule imol)
   (set-rotation-centre 1 2 3)
   (placed-typed-atom-at-pointer "Water"))



Thanks for any tips/guidance (or flat out working answer!) or suggestions I go read the scheme scripting manual...

Let's not be hasty.... :)


Paul.

Reply via email to