PyMol: select residues for which I have found hydrogen bonds - pymol

Using PyMol, I can show hydrogen bonds using Action -> Find -> Polar Contacts. This produces the contacts, but I want to show them clearly by only showing residues which have these contacts and nothing else (currently, the view is very unclear due to the rest of the protein ).
I want to select all residues that have the hydrogen bonds that I found. How can I do that?
Alternatively, what is a good way to show hydrogen bonds between two chains in a pocket, so that they are clearly visible?

You can find contacts around a ligand or a part of a molecule by defining those contacts as a new selection. Please read about selections here (https://pymolwiki.org/index.php/Select) or select with the mouse and then go to (sele) and rename it. Use the name myligand. Then, in the command line, you can search for contacts in 3.5 Å distance and name this selection contacts:
select contacts, myligand around 3.5
Note that I chose 3.5 Å assuming you have a PDB file where hydrogen atoms are not mapped due to low resolution.
Of course, you will get all contacts in this distance and not just hydrogen bonds, therefore you'd create a selection within myligand before that only contain your atoms that would potentially participate in H-bonds.
In the next step you create a new selection contactsfull containing the whole residues of contacts using byres:
select contactsfull, byres contacts
Now you can independetly style contactsfull and your protein. To display the H-bonds, I would then use Find -> Polar Contacts, wich creates another selection with only the H-bonds that you can style as you like.

Related

Remove inside geometry of a model

For a project I'm currently working on I'm looking for a quick and easy way to get rid of inside geometry of a house model.
This house model has everything in it, floors, inner walls, stairs, kitchen, you name it, but I want to remove all geometry on the inside so I'm basically left with just the "shell" of the house. say if you would "submerge" the house underwater, everything touched by the water I want to keep, the rest I want to be removed (maybe a weird explanation but I hope it's rather clear what I mean).
Because I need to do this process on a lot of different house types, it's simply too much work to do this manually by hand, and I'm therefore looking for a method which can do this quickly.
I use 3ds Max for my modeling, but solutions in different software, for instance Meshlab, are fine too!
Thanks in advance,
Maik Bentlage, iBuild
For a MeshLab solution, this blog entry describes a method to use ambient occlusion to remove interior vertices. In MeshLab 2016.12:
Filters > Color Creation and Processing > Ambient Occlusion
Filters > Selection > Select by Vertex Quality. Play with sliders to select low quality values, i.e. all the interior vertices that are not visible (try min 0, max 0.1).
Filters > Selection > Delete Selected Vertices
This isn't a perfect solution, but may be good enough for your needs. If you can determine a max quality value that works consistently for your models, you could easily script this for batch processing.
It really depends upon how each house was created.
If it’s a hierarchical approach, i.e., the house is a parent and models inside (kitchen, floors…) are children, then you can easily use a simple MaxScript such as this one to delete all children from your scene (inspired by this thread from cgsociety) :
global meshes_list=#()
fn selecting_children ancestors =
(
for i in ancestors do
(
counting = i.children
if counting.count>0 then
(
for x in counting do
(
append meshes_list x
)
)
)
return meshes_list
)
rollout hierarchy_rollout "Hierarchy Operations"
(
checkbox Checkbox_DeleteSelection "Delete Selection" checked:false
button select_children "Select All Children"
on select_children pressed do
(
select objects
sel = selection as array
x = selecting_children sel
select x
if Checkbox_DeleteSelection.state == true do
( delete selection )
)
)
createDialog hierarchy_rollout 200 150
Just make sure that you don’t end up deleting other meshes or houses as well!
If they are not hierarchically ordered, then you can Select by Name (press H) and delete everything manually, but more quickly than selecting them one by one with your mouse.
If the whole house is a single mesh (including props inside), then I am not aware of any existing way to automatically delete everything inside. You can still select by Element (after converting it to an Editable Poly/Mesh) and, after selecting the house (assuming it's a single mesh), pressing Ctrl + I for inverting selection and delete everything. But it’ll still be time consuming.
A workaround might be to attach every house into one gigantic mesh (just open the attach list to select everything at once) and to use the rectangular selection to select only the highest part (which should isolate props or most of them) of everything, in the Left or Right Wireframe Viewport, and then press Ctrl + I.

Can I get Blue Prism to read search engine results based off key terms?

I am a Blue Prism novice and need help!
I am searching on some key terms in Google - when the first page results open, I want to have Blue Prism pick out the link titles which have "Key Term 1" and "Key Term 2" in the titles, then open the links. Meaning that, there could be a handful of results in the Google search results which may (or may not) contain the 2 Key Terms.
Is there any way I can do this in Blue Prism?
Yes, many different ways in fact.
Basic Solution:
First
Have the bot pass "Key Term 1" and "Key Term 2" into the Google search input box proceed by "allintitle:" and linked together with "AND". This will tell Google to only return results with "Key Term 1" and "Key Term 2" in the title.
The search will then look like this: allintitle: "Key Term 1" AND "Key Term 2" (Image Example)
This basically makes Google do the title work and saves you from having to grab the returned page and do a string value comparison between the titles and your key terms.
Second
Spy the appropriate on-page HTML location for the returned links in your Google Search objects Application Model.
The links themselves are held in the <cite class="iUh30">{URL}</cite> HTML element, so your Application Model element will look something like this:
Tag - 'Equals' - CITE
Class - 'Equals' - iUh30
Index - 'Dynamic' -
Third
You can then pass in the number value of the index of the link you want the bot to click on in a Navigate stage. Should this be more than one just have the bot loop over the Navigate stage, but simply add 1 to the current index number before the end of the loop. In order for this to work you will have to setup your bot resources browser options to open links in a new tab, otherwise this will not work.
Another strategy you could pursue would be to have the bot grab the Google search return pages entire HTML and store it in a Data Item. You could then use the XML VBO to parse out everything but the returned links and then do with them as you please.
Grabbing the whole DOM and pulling it into Blue Prism is inadvisable though, as it's always bad practice to introduce the possibility of unknown live scripts being pulled in as well.

Need help in custom screen

I have two GI screens, which takes CustomerID as input and show data from different screens. My question is, I want to create a custom screen and add tabs Sales Orders, Invoices, and want to display that GIs data in these tabs. The main purpose is instead of checking data in multiple GI screens want to display all information on one screen.
I have one ways maybe it can help, but i'm not sure.
First, you create virtual view like usrGI_CD or GI_CD in CacheExtension<GI-DAC>
Next, you handle it in your code like:
GI-Graph graph = CreateInstance<GI-Graph>();
GI-DAC giResult = PXSelect<GI-DAC, Where<Field1, Equal<Required<Field1>>>>.Select(graph, valueField1,......);
You can add a lots field you want same with Field1. After that you will have row of value that you want and you can use PXUIFieldAttribute.SetValue(cache, giResult.value) to set value in your DataView.
Hope this help!

Show Solr Autosuggest results with types/categories

we are configuring solr for an e-commerce site which features a range of products across multiple categories and brands. In addition to that there is also a number of landing pages which can be reached through the search. So overall, we have 4 types of possible results, I'll use an electronics site as an example:
Categories (i.e. "Smartphones")
Brands (i.e. "Samsung"
Products (i.e. "Samsung Galaxy S4")
Pages (i.e. "How-To Guide to your Samsung")
What we would like solr to do is
a) show those things in autosuggest (right now it shows the first three, but doesn't show pages as they aren't part of the product catalog through which it searches)
b) show the "type" of the result in the box next to the result. To illustrate, if I would type "Sam", the autosuggest box would look something like this:
Samsung Brand
Samsung Galaxy S4 Product
Samsung Galaxy S5 Product
How-To Guide to your Samsung Page
Android Smartphones Category
Particularly the last point is really important and we couldn't find any way to do this yet. Any help would be greatly appreciated.
You can create a separate core for all the stuff you want to be able to auto complete on, where you keep both the type and the value. That way you get the flexibility of adding new auto complete features later, and you'll avoid introducing a wide set of different documents in your main core.
Another option is to add a type field to your main schema, and create documents for Page objects as well (depending on how you create the existing auto complete categories - if you have three different types of documents in the index already, it would be quick to add a new field that just contains the type of the document as well).

How do I modify the Magento Search to check child skus?

Currently, the site search will search all of the skus of the items marked as being visible in search. This is all well and good.
The problem arises when the customer knows a sku of the individual child item. So, let's say a product comes in both a 20 foot and 25 foot variation. We would put those into a configurable product and have a single product page where a customer could then choose which of those two lengths.
What happens is, a customer invariably knows that the sku of the 20 ft variation is RDB-20, while the other is RDB-25. A search for RDB-25 then, comes back with no results since the simple product is not visible in search - it doesn't realize there is a match.
How do I get the search to search an item with visibility "Not Visible Individually", when it's parent is visible in search?
The desired effect is that, if a child SKU is searched for, the parent should show up in the results.
There really is no good way of doing it without extending the default search, but at that point you might as well look for other options.
Here's a workaround that might be doable depending on how you manage your products and it worked for me until I moved on from the default search.
Rather than altering the search, try adding an attribute to all products and make it hidden concatenating all the skus into this field. The search should find the text attribute and show the configurable.
Its a bit of a workaround but works for me.
This is untested, but I did a bit of perusing in our attributes and I think I found something that might help.
Currently since our child products don't show up in our search, we have the parent populate with the children product's attributes.
However, things like brand, taxable amount, description, populate for every child product while our SKU does not.
The only difference I can see between the two attributes is under manage attributes -> click on attribute -> and then under properties go to frontend properties and select
Use In Search Results Layered Navigation: YES
Used in Product Listing: YES
Use In Layered Navigation: Filterable (with results)
I'm not sure which of these do what, but in the population of the fulltext search data table, somewhere it is being told to populate for the children and I believe that the admin panel is where.
I hope this helps!

Resources