setting up a connection with PyMOL python - python

I have created a Contact Map using matplotlib in wxpython, now what i want to do is set up a 'connection' with pyMOL. i want my program to be like CM-View where when you hover over points on the contact map, it shows the 2 contacts on PyMOL showing a line between them. Also things like, telling pyMOL to only select 1 chain.
So basically I want to send data from my GUI to pyMOL to make it do something, like the hovering over the contacts or telling pyMOL to do something.

If you are not Venkatramanan Krishnamani, you may want to have a look of his code for a PyMOL extension CMPyMOL.
Hey, his extension/plugin is also for visualizing contact map!
In his plugin, the residues are not highlighted upon mouse hovering over contact map, rather mouse clicking on contact map. But that's close enough to what you want, I guess.

Related

Modify Tooltips in Pygal

I am creating an interactive World Map, where you can hover over different countries to see which one you are hovering over, and click them to link to a seperate HTML page with info on them. The problem is, when I hover over smaller countries like Switzerland, the tooltip itself covers the entire hitbox of the country, and I am not able to click on it.
I have already asked about moving the Tooltip elsewhere, or providing a link on the tooltip itself, but got no answers for those questions. So now I am asking; is it possible to completely hide a tooltip in pygal maps? Or perhaps change it to a toggle that activates on click? Or perhaps even render the tooltip relative to the cursor instead of relative to the Datapoint itself? My code is so close to being finished but is being held back by this rather infuriating issue.
Please let me know if I should also provide my code that I have for this issue.

How can I do instructions (like with a messagebox.showinfo) but using icons inside it?

Basically I am building a program and I have a message box that shows the instructions. However, since the program is based on icons, such as, when we have a ruler, it means it does distances, I want to put in that message box the ruler icon in order to explain what it does, but I am not being able to insert the icon in the messagebox.showinfo. How can I do it?

PyCharm - always show inspections

PyCharm displays little bars on the scroll bar for things like code warnings. This feature is called "inspection".
If you move the mouse cursor over a bar, it shows a preview of the code annotated with the inspection.
I find this really fiddly, and I'd actually like full inspection notices to be displayed all the time in the normal editor, just like it appears in the small preview.
Is there any way I can achieve this?
Using the default keymap, you can use F2 to jump to the next highlighted error and then Ctrl+F1 to show the tooltip.
According to this PyCharm's documentation there seems to be an Inspection Tool Window which displays inspection results on separate tabs..
You can access the tool window through menu Code | Inspect Code.
I just tried it and it showed a tab like this:
Press Alt+6
Or, click "Problems" on the bottom-left
Or click the error icons at the top-right of the text editor.
This gives a list of problems for the file open in the currently active tab. It automatically updates when you change tabs:

python show tooltip window on click

There is command In the AutoHotKey that shows tooltip with some message on the top of the screen. I want to do it on python.
In more details I need to make an application, that will work in background, always tracking a keyboard. On the specific hotkey it should show on the top of the screen a message without grabbing focus from other application. And it should remove this message after some conditions (e.g. mouse moving). It should work with full screen apps too.
I couldn't find how to do it on python, or what libraries should I use. Need your help.
Global tooltips are created via WINAPI CreateWindowEx with TOOLTIPS_CLASS for window class. There are some examples which you can adapt. See also the Autohotkey implementation.
Shell tray tooltips are created via Shell_NotifyIcon.
A working example: wontoncc/balloontip.py and the Autohotkey implementation.

How to use Idapython to add custom pop-up hints on operands in IDA Pro?

In IDA Pro, by default, for some operands like destination addresses / jump targets, when my mouse cursor hovers around it, a pop-up box will appear and give a preview of the instructions in those destination program addresses.
I want to do the same thing for other operands, such as for registers that I want to give some contextual information in a pop-up box to help analysis. For example, in this function, what are the possible values this register can take due to earlier initialization etc. I will only need this pop up box will only show textual information.
Does IDAPython have something to allow me to do add 'hints' or such pop-up boxes? Does it allow me to replace or append the existing pop-up boxes for destination addresses?
the closest i found is UI_Hooks (https://www.hex-rays.com/products/ida/support/idapython_docs/idaapi.UI_Hooks-class.html) and (http://www.hexblog.com/?p=886). But I cannot find any examples to help me on that. Ideas, anyone?

Categories