Hi Georg,
Sorry for the late reply but I am currently a bit handicapped...(*)
> I updated to Wincoot 1.1.11.
>
> There are few things which causes issues.
>
> 1. I changed mouse button for View Rotation from default right to left in the
> preferences. In coot 9.XX keeping the right button hold let's one zoom in and
> out which is super handy.
This works with Shift now. Hol Shift and "rotate" will zoom.
Was there a 2. missing?
> 3. You also sent me last time a triple_refine scripts. However it does not
> work
> and even breaks the shortcuts. (I used Caluclate --> Run scripts). I guess it
> is
> not compatible with Windows11?
The script works for me. What messages do you see in the DOS window?
> 4. I want to write a "hide hydrogens" script and add it also as a button to
> the
> above toolbar (next to Grab focus for example). What is the code for adding
> a button to the toolbar?
Buttons can be added with:
>>
# If a toolbutton with label button_label is not found in the coot main
# toolbar, then create it and return it.
# If it does exist, the icon will be overwritten. The callback function wont!
# [NOTE: if its a Coot internal Toolbar you can
# only add a function but not overwrite its internal function!!!]
#
# return False if we cannot create the button and/or wrong no of arguments
#
# we accept 6 arguments:
# button_label
# callback_function (can be a string or callable function, or list
# with first element fucntion, then args, i.e.
# [function, arg1, arg2, ...])
# gtk-stock-item (or icon_widget, whatever that is)
# tooltip a text to present as tooltip
# toggle_button_flag toggle button instead of normal button
# use_button pass the button widget onto the function
#
def coot_toolbar_button(button_label, cb_function,
icon_name=False, tooltip=False,
toggle_button_flag=False, use_button_flag=False):
>>
e.g.
import coot_gui
coot_gui.coot_toolbar_button(...
> 4. Where in the folders do I have to add the scripts so coots reads them on
> startup?
On Windows they are under %LOCALAPPDATA%/COOT. Put it in the config subdir and
it should be run. Documenting this is on my list to do but it may have to wait
until I am less handicapped…
HTH,
B
(*) Only have the non-dominant hand for typing since I broke my other arm.
> As always many thanks in advance.
>
> Br, Georg.
>
> import coot
> import coot_utils
>
> def long_residues_refine(n_residues=3):
> active_atom = coot.closest_atom_simple_py()
> if not active_atom:
> print("No active atom")
> else:
> imol = active_atom[0]
> chain_id = active_atom[1]
> res_no = active_atom[2]
> ins_code = active_atom[3]
> atom_name = active_atom[4]
> alt_conf = active_atom[5]
> specs = []
> try:
> for ires in range(res_no-n_residues, res_no+n_residues+1):
> # test if the residue exists by looking for a residue name
> rn = coot.residue_name(imol, chain_id, ires, ins_code)
> if rn:
> specs.append([chain_id, ires, ins_code])
> coot.refine_residues_py(imol, specs)
> except TypeError as e:
> print(e)
>
> def triple_refine_residues():
> long_residues_refine(1)
>
> # t
> coot.add_key_binding_gtk4_py(116, 0, triple_refine_residues, "Triple Refine
> Residues")
>
>
> Am 2024-12-15 um 7:07 PM schrieb Paul Emsley:
> >
> > On 13/12/2024 21:19, Georg Mlynek wrote:
> >>
> >>
> >> Hi Bernhard, many thanks for the fast reply.
> >>
> >> I have CCP4 installed. Doing what you suggested and putting set
> >> CLIBD_MON=C:\Users\georg\Documents\ccp4\CCP4\lib\data\monomers
> in the
> >> "wincoot.bat" as below works.
> > OK, good.
> >>
> >> I have two more things. How can I change that clicking and holding
> >> leftmouse button I can rotate the map? In wincoot 1 it works with
> >> right mouse button.
> > Right-mouse view rotate is just better because it untangles atom
> > dragging from view rotation. Having said that, there is a Preferences
> > option for this in 1.1.11 - which I forgot to mention in the Release
> > Notes dagnabbit.
> >>
> >> The classic keybindings seems to have been exchanged with shortcuts.
> >>
> >> Can you add a refine, a triplerefine shortcut?
> >>
> > Yes. See attached.
> >
> > Paul.
> >
***************************************************
Dr. Bernhard Lohkamp | Associate Professor/Lektor/Docent
Teaching Unit/Biomedicum D9
Dept. of Medical Biochemistry and Biophysics (MBB) |
Karolinska Institutet
SE-171 77 Stockholm
Sweden
+46 8 52487055
[email protected] | ki.se
När du skickar e-post till Karolinska Institutet (KI) innebär detta att KI
kommer att behandla dina personuppgifter. Här finns information om hur KI
behandlar personuppgifter<https://ki.se/om-ki/integritetsskyddspolicy>.
Sending email to Karolinska Institutet (KI) will result in KI processing your
personal data. You can read more about KI’s processing of personal data
here<https://staff.ki.se/data-protection-policy>.
########################################################################
To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1
This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list
hosted by www.jiscmail.ac.uk, terms & conditions are available at
https://www.jiscmail.ac.uk/policyandsecurity/