text:
Two weeks ago I attended API Strat in Boston where I gave a talk on cognitive APIs and conversational interfaces and showed and explained an e-commerce chatbot that I built. My presentation is on slideshare. I have learned a lot about chatbots and now I feel an urge to write about it.

Intents

My bot is using the intent dialog from the Microsoft Bot Framework:

The intent dialog associates a user’s intent like Explore or Checkout with a specific dialog that knows how to respond.

It feels very much like routing in a web framework where given a specific URL pattern, the request will be routed to a controller that knows how to handle it.

Users don’t spell out their intents like that though. And so the first thing my bot needs to do is to learn to recognize them. The simplest way to trigger a dialog handler in response to a users utterance is by matching it with a regex. A more sophisticated logic requires an intent recognizer.

Intent Recognizers

An intent recognizer is basically a service that can understand users’ utterances. Given a text message it will return a list of intents that it inferred from it along with supporting entities. Here’s how it looks in LUIS (language understanding service from Microsoft):

The Explore intent was recognized along with two supporting entities that I trained it for. Here’s another way of looking at it:

And the response:

Microsoft Bot Framework comes with built-in support for LUIS in the form of LuisRecognizer

Custom Recognizers

Not every thing your users say has to be sent to a natural language service to extract the intent. Buttons and tappable images can post back bot-specific commands like /show:123456789, for example, that you can easily recognize with a regex. Also, if you want your bot to smile back at a smile sent to it, you don’t need to train a linguistic model either.

It turns out, building your own recognizer is not hard at all. I have built a few for my e-commerce bot and here’s how it works.

First, know that the Bot Framework supports sending a message through a number of recognizers at the same time. You can chain them or run them all in parallel:

The recognizer itself is a very simple interface with only one method - recognize. Here’s how you would detect a smile, for example:

And here’s another one that understands commands:

That’s it for now but there is more to come. Stay tuned!


text:
# Supporting Competing APIs in Scala -- Can Better Package Factoring Help?

| Feedback

On and off over the last year, I’ve been working on a library of tree and map classes in Scala that happen to make use of some algebraic structures (mostly monoids or related concepts). In my initial implementations, I made use of the popular algebird variations on monoid and friends. In their incarnation as an algebird PR this was uncontroversial to say the least, but lately I have been re-thinking them as a third-party Scala package.

This immediately raised some interesting and thorny questions: in an ecosystem that contains not just algebird, but other popular alternatives such as cats and scalaz, what algebra API should I use in my code? How best to allow the library user to interoperate with the algebra libray of their choice? Can I accomplish these things while also avoiding any problematic package dependencies in my library code?

In Scala, the second question is relatively straightforward to answer. I can write my interface using implicit conversions, and provide sub-packages that provide such conversions from popular algebra libraries into the library I actually use in my code. A library user can import the predefined implicit conversions of their choice, or if necessary provide their own.

So far so good, but that leads immediately back to the first question – what API should I choose to use internally in my own library?

One obvious approach is to just pick one of the popular options (I might favor cats, for example) and write my library code using that. If a library user also prefers cats, great. Otherwise, they can import the appropritate implicit conversions from their favorite alternative into cats and be on their way.

But this solution is not without drawbacks. Anybody using my library will now be including cats as a transitive dependency in their project, even if they are already using some other alternative. Although cats is not an enormous library, that represents a fair amount of code sucked into my users’ projects, most of which isn’t going to be used at all. More insidiously, I have now introduced the possiblity that the cats version I package with is out of sync with the version my library users are building against. Version misalignment in transitive dependencies is a land-mine in project builds and very difficult to resolve.

A second approach I might use is to define some abstract algebraic traits of my own. I can write my libraries in terms of this new API, and then provide implicit conversions from popular APIs into mine.

This approach has some real advantages over the previous. Being entirely abstract, my internal API will be lightweight. I have the option of including only the algebraic concepts I need. It does not introduce any possibly problematic 3rd-party dependencies that might cause code bloat or versioning problems for my library users.

Although this is an effective solution, I find it dissatisfying for a couple reasons. Firstly, my new internal API effectively represents yet another competing algebra API, and so I am essentially contributing to the proliferating-standards antipattern.

Secondly, it means that I am not taking advantage of community knowledge. The cats library embodies a great deal of cumulative human expertise in both category theory and Scala library design. What does a good algebra library API look like? Well, it’s likely to look a lot like cats of course! The odds that I end up doing an inferior job designing my little internal vanity API are rather higher than the odds that I do as well or better. The best I can hope for is to re-invent the wheel, with a real possibility that my wheel has corners.

Is there a way to resolve this unpalatable situation? Can we design our projects to both remain flexible about interfacing with multiple 3rd-party alternatives, but avoid effectively writing yet another alternative for our own internal use?

I hardly have any authoritative answers to this problem, but I have one idea that might move toward a solution. As I alluded to above, when I write my libraries, I am most frequently only interested in the API – the abstract interface. If I did go with writing my own algebra API, I would seek to define purely abstract traits. Since my intention is that my library users would supply their own favorite library alternative, I would have no need or desire to instantiate any of my APIs. That function would be provided by the separate sub-projects that provide implicit conversions from community alternatives into my API.

On the other hand, what if cats and algebird factored their libraries in a similar way? What if I could include a sub-package like cats-kernel-api, or algebird-core-api, which contained only pure abstract traits for monoid, semigroup, etc? Then I could choose my favorite community API, and code against it, with much less code bloat, and a much reduced vulnerability to any versioning drift. I would still be free to provide implicit conversions and allow my users to make their own choice of library in their projects.

Although I find this idea attractive, it is certainly not foolproof. For example, there is never a way to guarantee that versioning drift won’t break an API. APIs such as cats and algebird are likely to be unusually amenable to this kind of approach. After all, their interfaces are primarily driven by underlying mathematical definitions, which are generally as stable as such things ever get. However, APIs in general tend to be significantly more stable than underlying code. And the most-stable subsets of APIs might be encoded as traits and exposed this way, allowing other more experimental API components to change at a higher frequency. Perhaps library packages could even be factored in some way such as library-stable-api and library-unstable-api. That would clearly add a bit of complication to library trait hierarchies, but the payoff in terms of increased 3rd-party usability might be worth it.

format: plain


text:
How is it that lead can block radiation, and things are lead lined. In the Indiana Jones 4 movie he climbs inside a lead-lined fridge and he somehow survives the blast and radiation?

1. It is very dense. This means that the number of interactions that a radiation particle will undergo is higher over a fixed distance which causes the radiation to attenuate.
2. It has a high proton number Z. This means that the charged radiation particles will scatter through large angles, also causing attenuation.
• High Z means there is a high probability of photo-electric interaction for gamma rays: in that interaction, the incident photon is completely absorbed, not scattered. On the other hand, charged particles (alpha, beta, ions) get stopped over much smaller distances than gammas - so gammas (uncharged) and neutrons are the ones to worry about in a blast. Your answer seems incomplete (missing neutrons) and even inaccurate (the scatter cross section per unit mass is smaller for high Z materials - see Rutherford scatter formula ) – Floris Aug 3 '14 at 20:58
• Im not sure if you're answer is completely accurate either - the nuclei are shielded by an electron cloud of equal charge to the nucleus (Z) so photons interact less strongly with the nucleus by a factor of 1/r compared the orbiting electrons. The photo-electric interaction is dominated by the density of the material (ie the density of electrons), not the proton number. In fact, in my answer I don't mention any probabilities or cross-sections. Furthermore I don't even refer to any specific particles, opting instead to keep the answer general. – kd88 Aug 4 '14 at 15:58

According to Table 3 in http://iopscience.iop.org/0022-3700/8/12/014/pdf/jbv8i12p2015.pdf, there is a strong relationship between the atomic number of a material, and the photoelectric cross section (the probability of a PE interaction).

Plotting the numbers for incident gammas of 25 keV, with the $$Z^4$$ on the X axis and the cross section (in barns) on the Y axis, gives the following plot:

As you can see, the $$Z^4$$ relationship works reasonably well (over this range of atomic numbers, from Carbon = 6 to Argon = 18).

This effect dominates the effectiveness of shielding materials in the range where photoelectric effects are important (roughly up to the binding energy of the innermost electrons). At higher energies, Compton scatter takes over - at that point, the electron density is the thing that matters (closely related to the density of the material - although hydrogen is an exception with roughly twice the number of electrons per unit mass compared to any other materials). Note that density and atomic number don't necessarily scale: tungsten has a lower Z than lead, but is much more dense. For my money, I will take 10 mm of tungsten shielding over 10 mm of lead shielding.

If you need a thin shield, there is nothing quite like density: lead, tungsten, gold, platinum, iridium... but of these lead is the cheapest by far (and easy to machine / mould). If you need a cheap shield, and size doesn't matter, then water is a much better bet (lots of electrons for very little money). This is why spent fuel is usually stored in pools of water (with the added benefit of cooling).

In an atomic blast, the gamma rays and neutrons are the thing to worry about. Lead is not a particularly effective neutron shield - light atoms are much better since the neutron will lose more energy in each collision (momentum transfer).

Ordinary people will not survive an atomic blast at close range because of a few mm of lead. But this is movie physics...


text:
# Fisher's exact test in 3x2 contingency table

I have two groups of patients (A and B) with a congenital malformation which might present itself in 3 forms (a or b or c). Sample sizes are small as you can see, so I think the best test to check whether there's a statistically significant difference between the 3 forms in the 2 groups is a Fisher's exact test in a following 3x2 contingency table:

group A: 2 a, 12 b, 1 c
group B: 5 a,  3 b, 1 c

My question is: how should I interpret the p value? I don't understand what is that referred to. Having the p value, how can I say that one of the three forms is statistically significantly more represented than the others (if true)?

• On the final question, I'd just look at the Pearson residuals or the (signed square roots of) the contribution to chi-square to decide where the main 'causes' of the difference come from. Aug 14 '13 at 22:42

## 1 Answer

It sounds like you are asking a lot of different questions here.

My question is: how should I interpret the p value? I don't understand what is that referred to.

The null hypothesis for Fisher's Exact test is that the groups do not affect the outcome, i.e. that they are independent. Rejection of the null hypothesis indicates the outcome (a, b, or c) is dependent on group.

> fisher.test(matrix(c(2, 12, 1, 5, 3, 1), nrow=2, ncol=3, byrow=TRUE))
Fisher's Exact Test for Count Data

data:  dta
p-value = 0.05082
alternative hypothesis: two.sided

In this case your $p$ value is approximately 0.05082. I will let you decide whether to reject the null.

Having the p value, how can I say that one of the three forms is statistically significant more represented than the others (if true)?

This is a separate question and I'm not sure what you are trying to ask.

• Hi Ellis, thanks, you right there were 2 questions. Let's say i consider the difference significant, it means the null hypothesis is not true and the outcomes depend on the group, but then how can i say something more about the 3 forms a,b,c? They depend on the group ok, but in which way? How can I see for instance if the form b is statistically more reported in the group A? Aug 14 '13 at 14:05
• @Gabriele look at this in a table form, calculate proportions and see if that helps. Aug 14 '13 at 14:14
• Make sure you really want to use this test as it is less powerful than the Pearson $\chi^2$ test. Aug 14 '13 at 16:12
• Pearson $\chi^2$ is now known to work well when expected cell frequencies exceed 1.0, not the 5.0 originally uttered by Pearson without checking. Aug 14 '13 at 21:03
• @Frank Harrell +1. A rule of thumb that frequencies be >1 was cited by Harold Jeffreys, Theory of probability, 1939, pp.88-9, anticipating the modern consensus. Jeffreys did a lot of calculating as well as being a first-rate mathematician. Aug 14 '13 at 21:58


text:
Additions and corrections to Orchidaceae of Tasmania

Nicholls, WH and Olsen, AM (1940) Additions and corrections to Orchidaceae of Tasmania. Papers and Proceedings of the Royal Society of Tasmania. pp. 71-74. ISSN 0080-4703

 Preview
PDF


text:
Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Structural insight into host plasma membrane association and assembly of HIV-1 matrix protein

Abstract

Oligomerization of Pr55Gag is a critical step of the late stage of the HIV life cycle. It has been known that the binding of IP6, an abundant endogenous cyclitol molecule at the MA domain, has been linked to the oligomerization of Pr55Gag. However, the exact binding site of IP6 on MA remains unknown and the structural details of this interaction are missing. Here, we present three high-resolution crystal structures of the MA domain in complex with IP6 molecules to reveal its binding mode. Additionally, extensive Differential Scanning Fluorimetry analysis combined with cryo- and ambient-temperature X-ray crystallography and GNM-based transfer entropy calculations identify the key residues that participate in IP6 binding. Our data provide novel insights about the multilayered HIV-1 virion assembly process that involves the interplay of IP6 with PIP2, a phosphoinositide essential for the binding of Pr55Gag to membrane. IP6 and PIP2 have neighboring alternate binding sites within the same highly basic region (residues 18–33). This indicates that IP6 and PIP2 bindings are not mutually exclusive and may play a key role in coordinating virion particles’ membrane localization. Based on our three different IP6-MA complex crystal structures, we propose a new model that involves IP6 coordination of the oligomerization of outer MA and inner CA domain’s 2D layers during assembly and budding.

Introduction

Viruses are one of the most harmful pathogens to humanity. With their limited number of genes, they can tactfully utilize the host-cell machinery for replication via interaction between viral proteins and host-cell targets1. Human immunodeficiency virus type 1 (HIV-1), which carries only nine genes, replicates in T4-helper cells2, thus causing acquired immunodeficiency syndrome (AIDS) by utilizing components of the host cell in each step of its life cycle. Group-specific antigen (gag) encodes polyprotein precursor (Pr55Gag) which initiates the assembly of viral proteins and viral genomic RNA for the budding of virions. Pr55Gag contains the p6 domain that hijacks requisite host proteins (Supplementary Fig. 1). Virus release has (1) Gag membrane binding (2) Gag-assembly and (3) the budding process, encompassing multimerization of viral proteins and their assembly at the host’s cellular membrane. This process involves the recruitment of key host proteins to allow for viral budding and facilitates the recruitment of other essential components necessary for viral infection such as lipids and nucleic acids3,4. Therefore, Pr55Gag is an important molecule which can be targeted for the treatment of HIV.

At the beginning of the HIV-1 replication cycle, Pr55Gag is synthesized from a viral genomic RNA transcript inside the host cell. Pr55Gag consists of four domains: the matrix domain (MA), capsid domain (CA), nucleocapsid domain (NC) and p6 domain respectively. In addition, Pr55Gag has two small spacer peptides SP1 between CA and NC, and SP2 between NC and p6 which influence viral release and infectivity (Supplementary Fig. 2). Pr55Gag is directed to the plasma membrane through the MA domain and is incorporated into viral envelope (Env) glycoproteins to create virion particles5,6. Moreover, MA is crucial for the proper conformation of HIV-1 Gag protein. The N-terminal domain of MA conjugated with the C-terminal domain of NC forms a horseshoe-like conformation of Gag protein7. Virion maturation is the final step of late stage infection and is initiated by the cleavage characterized by separation of Gag domains through the action of a specific viral protease3,4.

The MA domain of Pr55Gag contains five α-helices: four of which form an N-terminal globular head while the fifth α-helix forms a C-terminal helix that is connected to the CA domain8. The MA domain has two signals for Gag integration into the host plasma membrane. One is the "highly basic region" (HBR), which includes residues 18–33. As the other signal, the assembly of Pr55Gag at the plasma membrane requires myristoylation of the MA domain at its N-terminus9. Moreover, 1-D-myo-phosphatidylinositol 4,5-bisphosphate [PI(4,5)P2] (PIP2) is a native host membrane phospholipid recognized via the MA domain of Pr55Gag during the localization of membrane proteins10. The HBR within the N-terminus of MA has an essential role, leading hotspot activity by providing necessary interaction between MA and PIP211,12. In addition, MA has different observed oligomeric states: trimer, hexamer and higher-order oligomers on the host plasma membrane13. As any structural ablation of the higher-order state will lead to viral release inhibition, it makes the N-terminus amino acid sequence critical14.

Detailed high-resolution structural studies of MA-inositol complexes are still not available and impedes the further understanding of the assembly of Pr55Gag at the plasma membrane. Unlike previous studies15,16,17, high-resolution studies in this direction will offer invaluable opportunities for the molecular design of lead high-efficiency compounds that may inhibit the completion of the HIV cycle by blocking the Pr55Gag-PIP2 interaction18. Studies such as the solution NMR structure of MA-PIP2 complex with shorter lipophilic chains revealed that a basic pocket of the MA domain accommodates acidic inositol phosphate moieties by electrostatic interactions19. Previous studies suggested that the other inositol molecules such as inositol hexakisphosphate (phytic acid, IP6) in addition to PIP2 are essential for the canonical HIV-1 particle assembly process20. IP6 is an abundant endogenous molecule in organisms and has critical roles in biological activities such as the IP signaling cascade. Although it was thought previously to be present only in plants, it has been discovered that IP6 is also very common within the animal kingdom21. As an abundant host metabolite, IP6 is hijacked for the benefit of HIV-1 through interaction with amino acid residues within the SP1 region of Pr55Gag 7,22. Furthermore, IP6 is involved in the assembly of Pr55Gag by binding to both MA and NC domains, each of which are responsible for the encapsidation of the viral genome into virions and facilitate assembly and encapsidation23. The binding of IP6 to the CA domain increases HIV-1 capsid stability and RNA accumulation, leading to viral production. Therefore, the endogenous concentration of IP6 is critical for HIV-1 assembly22. In the presence of IP6, HIV-1 Gag performs conformational transition into virus-like particles (VLPs). During the assembly process of Pr55Gag, Inositol phosphates (IPs) are generated to correct the radius of curvature. This leads to alteration of VLPs to achieve mature conformation7,23.

It is essential to determine the high-resolution structures of the MA-IP6 complexes to obtain molecular insight into the dynamic interaction between MA and IP6 at the molecular level. Here we employed both synchrotron cryo X-ray crystallography and ambient-temperature Serial Femtosecond X-ray crystallography (SFX) at an X-ray Free Electron Laser (XFEL) to obtain MA-IP6 co-crystal structures. We report three crystal forms and resulting X-ray structures of MA in complex with IP6 molecule (MA_IP6). One of our crystal structures reveals a novel form of a hexameric state of MA in the presence of IP6. Our data demonstrate that the binding site of MA-IP6 is different from the PIP2-binding site and through this interaction, IP6 shows significant importance in the oligomerization of MA. Our results are also supported by extensive net Transfer Entropy (nTE) analysis of monomeric, trimeric, hexameric and dodecamer structures of MA protein. Accordingly, the IP6 binding site directly affects trimerization, PIP2 binding, envelope interaction, and myristoylation sites in a monomeric state. Moreover, IP6, PIP2, myristoyl group, and the C-terminal of the domain interact with trimerization sites mutually in both trimeric and hexameric states. In conclusion, our data suggest that IP6 binding of MA regulates Gag protein localization and higher-order oligomerization on the host membrane even in the monomeric or hexameric state of MA. These findings may provide a better understanding of the HIV-1 replication mechanism besides a novel insight into the interaction between MA and IP6.

Materials and methods

Reagents

IP6 was purchased from Merck (Merck, Darmstadt, Germany). The reagents used for the crystallographic studies were ultrapure molecular biology grade and purchased from Sigma-Aldrich, USA.

Cloning and overexpression of the HIV-1 Gag MA domain

A protocol for bacterial expression and purification of the MA domain is previously described26. A gene encoding MA fusion with Tobacco Etch Virus (TEV) protease cleavage site at the N-terminus site was subcloned between KpnI (5’-terminus) and HindIII (3’-terminus) restriction enzyme sites in the pRSF-1b vector (Merck, Darmstadt, Germany) to express His-TEV protease site-MA protein (pRSF-1b_MA) (10His-tagged MA).

Protein expression and purification

10His-tagged MA gene was expressed in Escherichia coli (E. coli) strain BL21 (DE3) (Merck, Darmstadt, Germany). 10His-tagged MA protein was initially purified with nickel-NTA affinity column chromatography followed by TEV cleavage, denaturation, refolding, and size exclusion column chromatography. E. coli BL21 (DE3) transformed with pRSF-1b_MA was cultured in LB broth supplemented by 50 mg/mL kanamycin at 37 °C. When the culture reached OD600 of approximately 0.6, target protein expression was induced by 0.1 mM Isopropyl β-D-1-thiogalactopyranoside (IPTG) at 16 °C overnight. Harvested cells were resuspended in a lysis buffer containing 20 mM Tris–HCl (pH 8.0), 500 mM NaCl, 30 mM Imidazole, 5 mM β-mercaptoethanol and lysed by sonication (ULTRA5 HOMOGENIZER VP-305, TAITEC, Output 7, Duty 50%, 2 min). The lysate was separated into pellet and supernatant by centrifugation at 15,000 g for 30 min at 4 °C, and the supernatant was applied to a nickel-NTA affinity column containing a total of 4 ml bed volume of nickel-NTA superflow resin (Qiagen, Venlo, Netherlands). After washing with a washing buffer containing 20 mM Tris–HCl, pH 8.0, 1 M NaCl, 1 M (NH4)2SO4, 30 mM Imidazole, 5 mM β-mercaptoethanol, the target protein was eluted with 15 ml of an elution buffer that contains 20 mM Tris–HCl (pH 8.0), 500 mM NaCl, 1 M (NH4)2SO4, 5 mM β-mercaptoethanol, 300 mM Imidazole. The eluent was concentrated to 2 ml, and 10His tag was removed by 0.1 mg/ml 6His-tagged TEV protease while dialyzed overnight in dialysis buffer containing 20 mM Tris–HCl (pH 8.0), 500 mM NaCl, 5% glycerol, 1 mM dithiothreitol (DTT). The mixture was diluted to 50 ml, and the His-tagged TEV protease, cleaved 10His tag and uncleaved 10His-tagged MA were separated by the reverse Ni–NTA affinity chromatography. The cleaved un-tagged product was collected at the flow-through fraction of the affinity chromatography. 2 ml of fraction was mixed with 10 ml of denaturation buffer containing 20 mM Tris–HCl (pH 8.0), 1 M NaCl, 1 M (NH4)2SO4, 1 mM DTT, 6 M urea and the protein was denatured overnight during dialysis in the denaturing buffer. After concentrating to a final volume of 1 ml, polypeptides were purified with size exclusion chromatography (SEC) column Superdex 200 10/300 increase (GE Healthcare, Little Chalfont, United Kingdom) which equilibrated with the SEC buffer containing 20 mM Tris–HCl (pH 8.0), 150 mM NaCl, 1 mM DTT using Akta FPLC system (GE Healthcare) at 0.2 mL/min. Peak fractions containing refolded MA were collected and concentrated to a final concentration of 10 mg/ml for crystallization.

Crystallization for cryo synchrotron studies

200 mM Phosphatidylinositol-6-phosphate (IP6) was mixed with 10 mg/ml MA protein solution. Protein Crystallization System (PXS) was used for the initial crystallization screening of the MA-IP6 complex26. In total, 384 conditions were examined using Crystal Screen 1 & 2 (Hampton Research), Index (Hampton Research), PEG-Ion (Hampton Research), and PEG-Ion2 (Hampton Research), and Wizard I & II (Molecular Dimensions). First crystallization condition contained 25% (w/v) PEG 3350 and 100 mM MES (pH 6.0) (MA_IP6_1), and the second one contained 5% (w/v) PEG 4000, 20% (v/v) 2-propanol and 100 mM MES (pH 6.5).

Cryogenic data collection and processing

Crystals were harvested with the proper size of MicroLoops (MiTeGen, New York, United States of America), flash frozen by plunging into liquid nitrogen and transferred in Uni-pucks for automated data collection. Diffraction data were collected at the beamline BL-1A in the Photon Factory. The diffraction data sets were automatically processed and scaled using XDS27, POINTLESS28, and AIMLESS29. Crystallographic statistics are summarized in Supplementary Table 1.

Crystal structure determination and refinement of cryogenic synchrotron structures

Phases for all three MA_IP6 structures’ data were determined by the molecular replacement method using the crystal structure of MA (PDB ID: 1HIW) as a search model with MOLREP30. Molecular models were initially refined with REFMAC531 and further refined by PHENIX.refine32. Molecular models were manually built by COOT33. mFo—DFc omit-maps for ligands were calculated using PHENIX with a simulated annealing protocol. Interaction between MA and IP6 was analyzed by PISA34. All molecular graphics in this manuscript were prepared by the PyMOL Molecular Graphics System, Version 2.3.0 Schrödinger, LLC.

Batch crystallization of the HIV-1 Gag MA domain for SFX

Purified HIV-1 Gag MA proteins were used in co-crystallization with IP6 at room temperature by the hanging-drop method using a crystallization buffer containing 20% (w/v) polyethylene glycol 3350 (PEG 3350) as a precipitant and 100 mM MES-NaOH (pH 6.5)35. Microcrystals were harvested in the same mother-liquor composition, pooled to a total volume of 3 ml and filtered through a 40-micron Millipore mesh filter. The concentration of crystal was around 1010–1011 per milliliter viewed by light microscopy.

X-ray free electron laser data collection parameters

An average of 2.64 mJ was delivered in each 40-fs pulse containing approximately 1012 photons with 9.51 keV photon energy with 1 × 1 mm2 focus of X-rays. Single-pulse diffraction patterns from HIV-1 MA-IP6 microcrystals were recorded at 120 Hz on a CSPAD36 detector positioned at a distance of 217 mm from the interaction region.

Sample delivery of MA-IP6 microcrystals into an XFEL and data collection

A crystalline slurry of MA-IP6 microcrystals kept at ambient-temperature flowing at 2 µl/min was injected into the interaction region inside the front vacuum chamber at the LCLS CXI instrument using the coMESH injector37. Large size crystals were present in the MA-IP6 sample slurry, prior to the experiment. The coMESH injector required filtered samples before injection through a 100-micron inner diameter capillary size to prevent clogging.

Hit finding and indexing

SFX diffraction data collected from rod-shaped crystals at LCLS were processed using Psocake38,39, yielding a complete dataset. A diffraction pattern was deemed a hit if at least 15 peaks were found. A total of 126,434 diffraction patterns for MA-IP6 microcrystals were recorded as crystal hits. CrystFEL’s indeximajig program40,41 was used to index the crystal hits (Supplementary Fig. 2). Two rounds of indexing were performed on the dataset. Initial indexing results indicated that the space group was most likely triclinic P1 with a = 96.73 Å, b = 96.97 Å, c = 91.76 Å and α = 90.05°, β = 90°, γ = 120°. Given the target unit cell, the indexing results were accepted if the unit cell lengths and angles were within 5% and 1.5°, respectively. The final iteration yielded 56,861 (45%) indexed patterns for the MA-IP6 dataset.

Differential scanning fluorimetry assay

A protocol for Differential Scanning Fluorimetry (DSF) was employed according to the previous procedures42,43. SYPRO® Orange (Thermo Fisher Scientific, Massachusetts, United States of America) solution (× 5000) was diluted by 50 times with a buffer containing 50 mM MOPS-NaOH (pH 7.0), 50 mM NaCl (100 × SYPRO® Orange solution). A buffer solution containing purified His10-tagged MA protein was exchanged to the 50 mM MOPS-NaOH, 50 mM NaCl buffer (pH 7.0) with ultrafiltration using Amicon® Ultra-15 Centrifugal Filter Unit (10 kDa MWCO) (Merck, Darmstadt, Germany). With the prepared 100 × SYPRO® Orange solution and the protein solution, 50 μl of a reaction mixture were prepared to be 5.4 µM MA-His10 protein, 5 × SYPRO® Orange in presence of or in absence of the indicated concentration of compounds to evaluate the contribution of IP6 to the thermostability of MA protein, or 32.4 µM IP6 for MA point-mutant analysis. The temperature of the reaction system was increased 0.5 °C per 30 s from 20 to 95 °C stepwise, and fluorescence intensity at each temperature was measured by Single-Color Real-Time PCR Detection System, MyiQ (Bio-Rad, California, United States of America), and analyzed with iQ5 (Bio-Rad).

Gaussian network model (GNM)-based transfer entropy calculations

The Gaussian Network Model (GNM) is the most minimalist isotropic elastic network model of Cα atoms with harmonic interactions for the dynamics of proteins and their complexes44,45. GNM-based Transfer Entropy (TE) calculations46,47 reveal causal interrelations of residues in a given structural topology by considering a certain time delay τ between the fluctuations ∆Ri (t) of residue i at time t and ∆Rj (t + τ) of residue j at time t + τ. Using these fluctuations, TE(i,j) (τ) provides an estimate for the direction of information flow from residue i to residue j in time delay τ; i.e. TE(i,j) (τ) describes how much the present movement of residue i decreases the amount of uncertainty for the future movement of residue j within time interval τ. If TE(i,j)(τ) > TE(j,i)(τ), the dynamics of residue i affects the dynamics of residue j, indicating a causal directional interrelation from residue i to j in time delay τ.

The transfer entropy TE(i,j) (τ) from each residue pairs of i at time t and j at time t + τ was formulated 46 (Hacisuleyman and Erman, 2017) as:

$$TE(i,j)(\tau ) = S(\Delta R_{j} (t + \tau )\left| {\Delta R_{i} (t)} \right.) - S(\Delta R_{j} (t + \tau )\left| {\Delta R_{i} (t),} \right.\Delta R_{j} (t))$$
(1)

where the conditional entropies are:

$$(\Delta R_{i} (t + \tau )\left| {\Delta R_{i} (t)} \right. = - \left\langle {\ln p(\Delta R_{j} (0),\Delta R_{j} (\tau ))} \right\rangle + \left\langle {\ln p(\Delta R_{j} (0))} \right\rangle$$
(2)
$$S(\Delta R_{j} (t + \tau )\left| {\Delta R_{i} (t),} \right.\Delta R_{j} (t) = - \left\langle {\ln p(\Delta R_{j} (0),\Delta R_{j} (\tau ))} \right\rangle + \left\langle {\ln p(\Delta R_{i} (0),\Delta R_{j} (0),\Delta R_{j} (\tau ))} \right\rangle$$
(3)

Each term in Eqs. (2) and (3) could be obtained using GNM46, which mainly bases the calculations on the topology of the structure by computing the connectivity/Kirchoff matrix from cartesian coordinates. Time delay τ between fluctuations ∆Ri and ∆Rj is used as the four-fold of the defined time variable that maximizes mean transfer entropies over all residue pairs i and j.

GNM decomposes the motions into a spectrum of dynamic modes, from global/slow (low frequency) modes to local/fast (high frequency) modes. TE values in Eq. 1 could be calculated using all or a subgroup of dynamic modes47. As the global modes of motion are highly relevant for functional dynamics48, here we considered the slowest end of the dynamic mode spectrum with and without the slowest mode; average ten slowest and average two to ten slowest dynamic modes.

To emphasize the dynamically affecting and affected residues of each residue pair i and j, netTE (nTE) values is defined as

$$nTE_{ij} \left( \tau \right) = TE_{ij} \left( \tau \right) - TE_{ji} \left( \tau \right)$$
(4)

nTE is displayed in color (from blue to red as transfer entropies ascend) for each residue pair i and j on transfer entropy heat maps (Supplementary Fig. 812). For representative residues (highlighted in grey), their causal interrelation with the rest of residues is color-coded from highest positive (red) to lowest negative (blue) nTE values on all used topologies, given next to the nTE heat maps.

To identify affecting residues as entropy sources with the capacity to affect the others at the most, i.e. transfer information to the others, the cumulative net transfer entropy (cnTE) values of residue i over all j residues were also calculated as

$$cnTE\left( {i,\tau } \right) = \Sigma_{j} \left( {TE_{ij} \left( \tau \right) - TE_{ji} \left( \tau \right)} \right)$$
(5)

(cnTE) values of residue pairs are given as a line plot on the left of transfer entropy heatmaps (Supplementary Fig. 610). The maximally affected residues are defined as entropy sinks.

Using the first ten global modes reveals the main network of bidirectional causal interrelations among IP6 and PIP2 binding sites, envelope protein and myristoyl interaction sites, trimeric and further oligomerization sites of MA domains. The exclusion of the slowest mode discloses the subtler causal interactions. Please note that IP6 molecules were not considered explicitly in the calculations, which thus mostly reflect the intrinsic behavior of monomers and oligomers.

Results

Crystal structures of MA-IP6 complexes

We employed X-ray crystallography to reveal the molecular mechanism of interaction between the MA domain and IP6 molecules. MA protein and IP6, which is the most abundant inositol in vivo, were co-crystallized. From three crystal forms, different crystal structures of MA complexed with IP6 (MA_IP6) were determined. Cryogenic MA_IP6_R32 structure is at 2.40 Å, Cryogenic MA_IP6_C2 extends to 2.72 Å, and ambient-temperature MA_IP6_SFX structure is determined at 3.5 Å resolution, respectively (Figs. 1 and 2, Supplementary Figs. 3 and 4). Our overall MA_IP6 complex structures are consistent with the previous NMR and crystal structures (PDB IDs: 2HMX and 1HIW, respectively) with the MA domain composed of 5 alpha-helices (Supplementary Table 2 and 3). Compared to the previous structures, a globular domain composed of the 1st to 4th helices did not show significant conformational change, whereas the C-terminal 5th helix did and will be further discussed later. Trimeric assembly of MA showed no significant overall structural differences between the MA_IP6 complexes and MA Apo form (PDB ID: 1HIW). However, a superposition of chains A of MA_IP6_C2, MA_IP6_R32 and MA_IP6_SFX_P1 with 1HIW form showed side-chain conformational changes within the HBR (18–33) of the N-terminus specifically residues Lys18, Arg20, Arg22, Lys26, Lys27, Gln28, Lys30, Leu31, Lys32, and His33 (Fig. 3). These conformational changes are involved in the interaction between MA and IP6 (Arg20, Gln28, Lys18) in our monomeric structure. Based on the density map of MA_IP6_C2, the B-factors of each IP6 molecule are notably high compared to MA (Fig. 3A and Supplementary Table 4). This suggests that the binding modes of IP6 molecules are not well-defined and that the affinities of MA with each IP6 varies. In our MA_IP6_R32 crystal form, the density map derived from IP6 was also observed at the same binding sites (Fig. 1). The observed differences of individual IP6 molecule interactions in each MA structure will be further explained below.

IP6-binding sites of MA

In the MA_IP6_C2 structure, a single chain of oligomeric MA interacts with three IP6 molecules, when considering symmetry mates of IP6. Three IP6 molecules were observed on chain A (Fig. 4A–E); one is on the asymmetric molecule of chain A (Fig. 5E, IP6_1), another is mainly in contact with chain D and visualized on chain A (Fig. 4D, IP6_2), and the last one is on the asymmetric molecule of chain A (Fig. 4C, IP6_3). Lys18, Arg20 and Glu28 formed hydrogen bonds with IP6_1. Lys27, Lys30, Lys32 and His33 are located close to IP6_2 and two hydrogen bonds were observed between Lys27, Lys30 and IP6_2. Ala3, Arg4 and Arg39 are near IP6_3 and Ala3, Arg4 interacts with this IP6 molecule. Additionally, when the MA_IP6_R32 structure was superposed with the MA_IP6_C2 structure, the binding position of IP6 molecules in each chain was detected in the same binding surface for both crystal forms (Supplementary Fig. 5). The interactions between IP6_1 and MA in the two crystal forms were analyzed to investigate differences of non-covalent interactions, but the same interacted residues were observed for both structures (Supplementary Fig. 6). To evaluate and dissect the contribution of these interactions, we employed Differential Scanning Fluorimetry (DSF).

IP6 has an alternative binding site for MA non-overlapping with a PIP2 binding pocket

IP6 and PIP2 are both involved in the viral life-cycle as cofactors. Previous work suggests that IP6 has a similar function with PIP2 in the viral life-cycle (Supplementary Fig. 1)25. To test this, we have compared the MA binding sites for both IP6 and PIP2 molecules (Fig. 5 and Supplementary Table 4). We superposed our high-resolution X-ray structure of the MA_IP6_C2 complex with an existing PIP2 bound model (PDB ID: 2H3Q) (Fig. 5C, E and F). As a result, a comparison of MA_IP6_C2 structure with MA_PIP2 complexes indicated the different binding positions for PIP2 and IP6 within the HBR. For instance, PIP2 interacts with residues Arg22, Lys27, Arg76 (PDB ID: 2H3Q) (Fig. 5C); and Arg22, Arg76 (PDB ID: 2H3Z) (Fig. 5D) respectively. Whereas IP6_1 interacts with Lys18, Arg20 and Gln28 through the hydrogen bonds in our MA_IP2_C2 structure. Furthermore, symmetry mates of chain A of MA showed that IP6 (IP6_2 and IP6_3) can bind to MA with different residues within the HBR, leading to a potential competition as a cofactor between IP6 and PIP2 (Fig. 4). One of the residues Lys27 which interacts with both IP6 and PIP2 with Myr presence, this competition may play an important role during the envelope incorporation process for making equilibrium between MA assembly on the membrane by IP6 and anchoring by PIP2-Myr interactions. In addition, the different conformation states on the C-terminus were observed between MA_IP6_C2 and MA_IP6_R32 (Supplementary Figs. 5 and 6). Our structures demonstrate that IP6 binds to MA from the nearby region but not the same amino acid residues involved in PIP2 binding (Fig. 5). These observations collectively suggest that both IP6 and PIP2 can simultaneously bind the MA. This intricate interplay of these binding events of these two host molecules may orchestrate the membrane binding and assembly either simultaneously or sequentially.

DSF assay

For understanding the underpinnings of possible binding sites of IP6 on MA domain several single and multiple mutants were performed and then melting temperatures (Tm) of the wild-type (WT) MA domain and its mutants were determined by DSF (Fig. 4F). In addition to that, the effect of IP6 presence and absence on the WT and its mutants were observed. In the absence of IP6, R4A, K15A, R20A, R22A, Q28A and Q65R single mutations affected the Tm less than 2 °C while K18A, K27A, K30A, K32A, R39A and Q63R single mutations caused the notable change. Among them, K18A, K27A, K32A and R39A mutations increased the Tm according to WT-MA whereas, K30A and Q63R mutations decreased the Tm. We preferred to use ΔTm (ΔTm: Tm difference between the presence and absence of IP6) in comparisons because there is more than one factor affecting Tm in mutations in the presence of IP6 (Supplementary Fig. 7). K18A, K27A, K30A and R39A mutations decreased the Tm of MA protein in the presence of IP6, while Q65R mutation increased it. To test these residues’ combined effects, we combined these mutations and formed new triple mutants and determined their Tm. We generated two mutation sets based on these single mutation results: K18-R20-R22 and K27-K30-K32. These amino acid sets were mutated to alanine and aspartate for each mutant combination. K18A-R20A-R22A, K18E-R20E-R22E, K27A-K30A-K32A and K27E-K30E-K32E triple mutants have higher Tm than WT-MA domain in the absence of IP6. In the presence of IP6 within the DSF reaction medium, K18A-R20A-R22A, K18E-R20E-R22E and K27A-K30A-K32A triple mutations were observed to have a decreased MA Tm than the wild type. Single-residue mutants K27A, K32A, R39A and all the multiple mutants show little to no change between the presence and absence of IP6. Based on these findings, we can deduce that the mutations on IP6 binding sites inhibit IP6 interaction with MA. Finally, we conclude that presence of IP6 enhances the thermal stability of MA protein.

Dynamic causal interrelations in the assembly of MA

We explored time-dependent structural fluctuations and dynamic causal residue interrelations in the hierarchical assembly of HIV-1 MA domain through its monomeric, trimeric, hexameric and dodecameric structures by utilizing their global dynamic modes. GNM based transfer entropy TE calculations disclosed an interplay of dynamic allosteric interactions among IP6, PIP2, membrane (envelope protein and myristoyl) and trimeric and higher oligomeric interaction sites, presented in Fig. 6 & Supplementary Figs. 812 and detailed in Supplementary Results, suggesting a dynamic order in the oligomerization of the MA domain.

Order of events predicted by GNM-based transfer entropy calculations

To identify predominant directional communication paths, an average of the ten slowest GNM modes of motion were used while an average of two to ten slowest dynamic modes were used to disclose subtler interaction paths. The presence of the slowest mode suggests a more collective and dominant dynamic behavior. Figure 7 features a plausible order of events as follows. 1–3. IP6 binding on sites Lys18, Arg20 and Gln28 of the monomer facilitates trimerization, possibly via trimerization site I (42–48) first, since its entropy receiving role from the IP6 binding sites is embedded in the slowest mode. For trimerization site II (64–72), similar facilitation by IP6 (Arg20) appears when we remove the slowest mode. The occupation of either trimerization sites might dynamically affect each other since there is evident information entropy transfer between these two sites of the monomer. On the other hand, PIP2 binding might trigger interactions with the envelope protein initially via Arg76, which is a prominent entropy source to the envelope interaction sites (Leu12, Glu16 and Leu30) in the presence of the slowest mode. As PIP2 and MA’s Arg76 is farther from the IP6 site, it could potentially generate a unique PIP2-specific response in the presence of PIP2. IP6 binding and trimerization state of the monomer at trimerization site II (bound to another monomer or not) might also affect envelope protein interactions with the entropy transfer from the first two sites to the latter in the presence of the slowest mode. 4. The interaction status with the envelope protein, hence membrane, affects further oligomerization. Envelope interaction sites drive the movement of the oligomerization region residues Arg20, Lys27, Gln28 and Lys30 overlapping with IP6 sites in the slowest mode of the trimer. This might indicate that the presence of a membrane affects oligomerization in higher order (as hexamer or higher forms). 5 & 6. PIP2 via Arg76 and trimerization sites might have a role in higher state oligomerization since these sites drive the movement of oligomerization sites in the slowest mode of the hexamer. On the other hand, oligomerization state (bound to another trimer or not) and IP6 and PIP2 binding might also affect trimer stability. The higher oligomerization site residues (Arg20, Lys27, Gln28 and Lys30) also transfer entropy to trimerization sites without the slowest mode, i.e. in average two to ten slow modes, of the hexamer. This bidirectional communication might ensure the organization of higher-order assemblies with optimum parameters, such as curvature radius, to enable the eventual formation of proper capsids. After 6. IP6-monomer binding that occurs at a greater than one-to-one ratio might affect further oligomerization and envelope/membrane binding. Extra IP6 binding sites (for IP6_2 and IP6_3) were seen in higher oligomerization states affecting oligomerization sites and envelope protein binding sites. Additionally, interactions among the trimers via trimerization sites affect the further oligomerization possibly via adjusting the trimer components (assuming flexible interactions instead of a rigid behavior for trimers) in response to the need of relevant higher-order oligomerization state.

Discussion

Different HIV-1 proteins, enzymes and metabolic steps from the first contact with the host to the production of new viral particles have crucial roles in the HIV-1 life cycle and have been potential drug targets. Pr55Gag protein regulates HIV-1 assembly, budding and maturation of virions. Working with this essential protein and its complexes may provide a further understanding of the formation of virions4. Pr55Gag contains MA, CA, NC, and p6 domains, where the MA domain regulates Pr55Gag membrane binding and assembly49,50. Given the key importance of the MA domain in the virion cycle, inhibition of this protein may provide an effective treatment against HIV and makes it an important drug target18,51.

Previous studies revealed the physical interaction between both PIP2-MA and IP6-MA in vitro10,25,52,53,54,55. It is shown that inositol phosphates are crucial cofactors involved in the complex HIV-1 assembly process7,25. The need for the presence of IP6 in the viruses, even in "encapsidation" alone, is a milestone for HIV virion formation. On the other hand, IP6 has a strong influence on not only CA but also MA trimerization and has a key role in assembly and encapsidation25. Additionally, IP6 has been shown to interact with MA at the highest level among inositol phosphates species51. The requirement of IP6 in the different steps of the viral life-cycle makes IP6 the target of the study. Therefore, any high-resolution structural information about the IP6-MA complex will provide invaluable details of the assembly process. Our study demonstrates that IP6 and PIP2 binding is not mutually exclusive, but rather they co-localize on non-overlapping binding site residues and alter the conformation of MA domain on the plasma membrane. The C-terminus of the MA domain is crucial for CA domain binding. Additionally, the conformation of Gag was determined with various of conformational states by different oligomeric structures including trimers and hexamers (Supplementary Fig. 5). The different conformations of C-terminal by trimer or hexamer MA with IP6 interaction can induce an overall conformational change of Gag protein assembly by squeezing and bending the proteins’ opposite terminals. Our hexamer structure with IP6 binding displays these possible conformations (Supplementary Fig. 13).

Our high-resolution MA_IP6_C2 structure demonstrates critical interactions of IP6 with MA explains how IP6 may favor trimeric state (Fig. 6). It may also provide an explanation for the previous observation that the presence of IP6 favors the higher-order oligomeric state of MA trimers25. These interactions are largely mediated through H-bonds by the basic side chain residues Lys and Arg together with polar uncharged Gln residues. Importantly, two nearby IP6 molecules are present at the site where the two MA trimers forming the hexamer are involved in pivotal intermolecular interactions. Based on crystal packing and contact patterns, the interaction between IP6 and MA at the selected trimer-trimer interaction site is mediated by the chain A residues Arg20, Lys27, Gln28, Lys30 and the chain D residues Lys18, Arg20, Lys30, Lys32 (Fig. 6). Lys27 is important for the comparison of IP6 and PIP2 binding because this residue interacts with both of these molecules, revealing a plausible mechanism for the connectivity between PIP2 and IP6 (Figs. 5 and 6). This result suggests that after the induction of Gag oligomerization, IP6 attached to this region may be replaced with PIP2 when Gag reaches the membrane; and IP6 binding helps the MA domain for higher-order oligomerization, showing that IP6 and PIP2 binding may be compatible. Besides, chain B, C, E and F form interactions with IP6 molecules by Lys18, Arg20 and Gln28 residues in varying binding angles, distances and conformations (Fig. 6). This result may show that H-bond interactions gave specificity but electrostatic interaction of side chains resulted in different angles, distances, and conformations for IP6 and MA binding in each of the trimers. The main distinction of the MA trimer dimerization interface is the involvement of three different amino acid interactions at Lys27, Lys30 and Lys32 besides monomer level MA and IP6 interactions. We have noticed that the residues mutated in DSF analysis (Fig. 4F) are not directly related to the monomeric level binding of MA to IP6; therefore, they either have a role in oligomerization (likely Lys27, Lys30 and Lys32) or structural stability of MA domain (Gln63 and Gln65). Another possible explanation for this situation is that there is more than one location where IP6 can bind and interact with the MA domain, each site responsible for different kinetic pathways in the assembly process (Figs. 4 and 6).

Our data explain the previous in vitro results in which they showed that in the presence of IP6, MA enhances the formation of trimers25. Acidic IP6 molecules occupy corners of the MA protein promoting the protein trimerization from the sides by attracting their basic charges (Supplementary Figs. 14 and 15). Trimerization of the MA may provide more stability and binding of IP6, thereby increasing the Tm of the MA protein. The IP6 molecules present in our structures allowed us to provide a model for high-order oligomerization of MA and suggest a role for IP6 in these multistep structural rearrangement events (Supplementary Fig. 13). It was shown that not delivery of Gag to the membrane but virion assembly during budding is perturbed by reduced cellular IP6 levels22. This may suggest that MA-IP6 complex occurs during virion assembly and budding. Here, we suggest a new model for the formation of higher-degree MA oligomers, induced and stabilized by IP6 binding. IP6 binding stabilizes the expanded conformations of an oligomeric and more organized state on the plasma membrane (Supplementary Fig. 13B–D). Although the role of IP6 on budding mechanisms is still unclear, it is possible that the interactions of PIP2 and IP6 binding can occur simultaneously in this mechanism, since they have non-overlapping binding sites on MA.

To explain the effect of IP6 on the MA protein, its membrane interaction and higher-order oligomerization, causal dynamic interactions in different oligomerization states of MA were explored by using transfer entropy TE calculations for directional allosteric interactions (Supplementary Fig. 812). While some residues convey information as entropic sources, some receive it as entropic sinks. With their interchangeable roles as entropic sources and sinks, IP6/PIP2 binding sites and trimeric interfaces of MA display a dynamic interplay among each other, resulting in a bidirectional information flow manifested with the dissection of slow modes of motion/informational entropy. In the trimer, the interactions between the envelope protein and myristoyl molecules are the major entropic sources. The dynamic fluctuations of these sites will possibly lead to the conformational and/or dynamic changes in the various regions of the trimer including trimerization sites along with IP6 and PIP2 binding sites. At this early oligomerization step as a trimer, envelope protein and myristoyl interaction sites might be more important due to the membrane attachment, relaying information regarding the membrane presence toward the trimerization regions along with IP6 and PIP2 binding sites. On the other hand, a similar bidirectional causality among IP6 and PIP2 sites and trimeric interfaces (interfaces of the MA domains) are observed in both structures of the hexamers despite their distinct structural organizations. Here, PIP2 and trimeric interfaces appear as the main drivers (i.e., entropic sources) with IP6 causing subtler allosteric interactions. In conclusion, allosteric signals are bidirectional, and the dynamic information is conveyed in opposite directions by recruiting different modes of motion. These movements form a dynamic repertoire for the protein. It provides functional conformation and dynamical changes in response to the perturbations and environment by exerting certain relevant modes of motion. Those results verified the previous findings of IP6 effect on MA trimerization; PIP2 and myristoyl interactions on membrane attachment supported the concepts of IP6 on higher-order oligomerization; and alteration of membrane localization and binding with PIP2. Still, further molecular dynamics studies must be carried out for higher degree oligomerization of MA in the presence of IP6. These studies can be divided into two subtopics: (1) trimer dimerization; (2) simulation of dissecting different binding modes of IP6 on MA and its effect on the stability of the larger oligomeric state.

Dynamic interaction of PIP2 and IP6 on MA is crucial for promoting Gag localization to the plasma membrane during the viral maturation. That is why, targeting MA through these two small molecules carries significant importance for molecular design of next generation anti-HIV-1 agents to block membrane localization of Pr55Gag and virion formation. The data presented here adds a new structural perspective to the predicted interaction between MA-IP6 for further studies. Our suggested model reveals potential new target sites to develop novel therapies for the treatment of HIV-AIDS.

References

1. 1.

Chinchar, V. G. Replication of Viruses. Encycl. Virol. 1471–1478 (1999).

2. 2.

Walker, B. & Mcmichael, A. The T-Cell Response to HIV. 1–19 (2012).

3. 3.

Freed, E. O. HIV-1 assembly, release and maturation. Nat. Rev. Microbiol. 13, 484–496. https://doi.org/10.1038/nrmicro3490 (2015).

4. 4.

Sundquist, W. I. & Kra, H. HIV-1 Assembly, Budding, and Maturation. 1–24 (2012).

5. 5.

Ghanam, R. H., Samal, A. B., Fernandez, T. F. & Saad, J. S. Role of the HIV-1 matrix protein in Gag intracellular trafficking and targeting to the plasma membrane for virus assembly. Front. Microbiol. 3, 1–15. https://doi.org/10.3389/fmicb.2012.00055 (2012).

6. 6.

Gaines, C. R. et al. HIV-1 matrix protein interactions with tRNA: implications for membrane targeting. J. Mol. Biol. 430, 2113–2127. https://doi.org/10.1016/j.jmb.2018.04.042 (2018).

7. 7.

Dick, R. A. et al. Inositol phosphates are assembly co-factors for HIV-1. Nature 560, 509–512. https://doi.org/10.1038/s41586-018-0396-4 (2018).

8. 8.

Massiah, M. A. et al. Three-dimensional structure of the human immunodeficiency virus type 1 matrix protein. J. Mol. Biol. 244, 198–223. https://doi.org/10.1006/jmbi.1994.1719 (1994).

9. 9.

Tang, C. et al. Entropic switch regulates myristate exposure in the HIV-1 matrix protein. Proc. Natl. Acad. Sci. U. S. A. 101, 517–522. https://doi.org/10.1073/pnas.0305665101 (2004).

10. 10.

Ono, A., Ablan, S. D., Lockett, S. J., Nagashima, K. & Freed, E. O. Phosphatidylinositol (4,5) bisphosphate regulates HIV-1 Gag targeting to the plasma membrane. Proc. Natl. Acad. Sci. U. S. A. 101, 14889–14894. https://doi.org/10.1073/pnas.0405596101 (2004).

11. 11.

Freed, E. O., Englund, G. & Martin, M. A. Role of the basic domain of human immunodeficiency virus type 1 matrix in macrophage infection. J. Virol. 69, 3949–3954. https://doi.org/10.1128/jvi.69.6.3949-3954.1995 (1995).

12. 12.

Murray, P. S. et al. Retroviral matrix domains share electrostatic homology: Models for membrane binding function throughout the viral life cycle. Structure 13, 1521–1531. https://doi.org/10.1016/j.str.2005.07.010 (2005).

13. 13.

Alfadhli, A. et al. Trimer enhancement mutation effects on HIV-1 matrix protein binding activities. J. Virol. 90, 5657–5664. https://doi.org/10.1128/jvi.00509-16 (2016).

14. 14.

Sanford, B. et al. Deletions in the fifth alpha helix of HIV-1 matrix block virus release. Virology 468, 293–302. https://doi.org/10.1016/j.virol.2014.08.017 (2014).

15. 15.

Freed, E. O., Orenstein, J. M., Buckler-White, A. J. & Martin, M. A. Single amino acid changes in the human immunodeficiency virus type 1 matrix protein block virus particle production. J. Virol. 68, 5311–5320. https://doi.org/10.1128/jvi.68.8.5311-5320.1994 (1994).

16. 16.

Freed, E. O. HIV-1 gag proteins: diverse functions in the virus life cycle. Virology 251, 1–15. https://doi.org/10.1006/viro.1998.9398 (1998).

17. 17.

Zhou, W., Parent, L. J., Wills, J. W. & Resh, M. D. Identification of a membrane-binding domain within the amino-terminal region of human immunodeficiency virus type 1 Gag protein which interacts with acidic phospholipids. J. Virol. 68, 2556–2569. https://doi.org/10.1128/jvi.68.4.2556-2569.1994 (1994).

18. 18.

Tateishi, H. et al. A clue to unprecedented strategy to HIV eradication: ‘Lock-in and apoptosis’. Sci. Rep. 7, 1–8. https://doi.org/10.1038/s41598-017-09129-w (2017).

19. 19.

Saad, J. S. et al. Structural basis for targeting HIV-1 Gag proteins to the plasma membrane for virus assembly. Proc. Natl. Acad. Sci. U. S. A. 103, 11364–11369. https://doi.org/10.1073/pnas.0602818103 (2006).

20. 20.

Campbell, S. et al. Modulation of HIV-like particle assembly in vitro by inositol phosphates. Proc. Natl. Acad. Sci. U. S. A. 98, 10875–10879. https://doi.org/10.1073/pnas.191224698 (2001).

21. 21.

Letcher, A. J., Schell, M. J. & Irvine, R. F. Do mammals make all their own inositol hexakisphosphate?. Biochem. J. 416, 263–270. https://doi.org/10.1042/BJ20081417 (2008).

22. 22.

Mallery, D. L. et al. Cellular IP6 levels limit HIV production while viruses that cannot efficiently package IP6 are attenuated for infection and replication. Cell Rep. 29, 3983-3996.e4. https://doi.org/10.1016/j.celrep.2019.11.050 (2019).

23. 23.

Siddhartha, A. K. D. et al. Interactions between HIV-1 gag molecules in solution: an inositol phosphate-mediated switch. Nat. Institutes Heal. 365, 799–811 (2007).

24. 24.

Sierra-Aragón, S. & Walter, H. Targets for inhibition of HIV replication: entry, enzyme action, release and maturation. Intervirology 55, 84–97. https://doi.org/10.1159/000331995 (2012).

25. 25.

Alfadhli, A. et al. Analysis of HIV-1 . J. Virol. 93, 1–10 (2019).

26. 26.

Hiraki, M. et al. Development of an automated large-scale protein-crystallization and monitoring system for high-throughput protein-structure analyses. Acta Crystallogr. Sect. D Biol. Crystallogr. 62, 1058–1065. https://doi.org/10.1107/S0907444906023821 (2006).

27. 27.

Kabsch, W. XDS. Acta Crystallogr. Sect. D Biol. Crystallogr. 66(Pt 2), 125–132. https://doi.org/10.1107/S0907444909047337 (2010).

28. 28.

Evans, P. Scaling and assessment of data quality. Acta Crystallogr. Sect. D Biol. Crystallogr. 62, 72–82. https://doi.org/10.1107/S0907444905036693 (2006).

29. 29.

Evans, P. R. & Murshudov, G. N. How good are my data and what is the resolution?. Acta Crystallogr. Sect. D Biol. Crystallogr. 69, 1204–1214. https://doi.org/10.1107/S0907444913000061 (2013).

30. 30.

Vagin, A. & Teplyakov, A. MOLREP: an automated program for molecular replacement. J. Appl. Crystallogr. 30, 1022–1025. https://doi.org/10.1107/S0021889897006766 (1997).

31. 31.

Murshudov, G. N., Vagin, A. A. & Dodson, E. J. Refinement of macromolecular structures by the maximum-likelihood method. Acta Crystallogr. Sect. D Biol. Crystallogr. 53, 240–255. https://doi.org/10.1107/S0907444996012255 (1997).

32. 32.

Afonine, P. V. et al. Towards automated crystallographic structure refinement with phenix.refine. Acta Crystallogr. Sect. D Biol. Crystallogr. 68, 352–367. https://doi.org/10.1107/S0907444912001308 (2012).

33. 33.

Emsley, P., Lohkamp, B., Scott, W. G. & Cowtan, K. Features and development of Coot. Acta Crystallogr. Sect. D Biol. Crystallogr. 66, 486–501. https://doi.org/10.1107/S0907444910007493 (2010).

34. 34.

Krissinel, E. & Henrick, K. Inference of macromolecular assemblies from crystalline state. J. Mol. Biol. 372, 774–797. https://doi.org/10.1016/j.jmb.2007.05.022 (2007).

35. 35.

Ciftci, H. I. et al. Serial femtosecond X-ray diffraction of HIV-1 gag MA-IP6 microcrystals at ambient temperature. Int. J. Mol. Sci. 20, 1–14. https://doi.org/10.3390/ijms20071675 (2019).

36. 36.

Herrmann, S. et al. CSPAD-140k: A versatile detector for LCLS experiments. Nucl. Instruments Methods Phys. Res. Sect. A Accel. Spectrometers, Detect. Assoc. Equip. 718, 550–553. https://doi.org/10.1016/j.nima.2013.01.057 (2013).

37. 37.

Sierra, R. G. et al. Concentric-flow electrokinetic injector enables serial crystallography of ribosome and photosystem-II. Nat. Methods 13, 59–62. https://doi.org/10.1038/nmeth.3667 (2016).

38. 38.

Damiani, D. et al. Linac coherent light source data analysis using psana. J. Appl. Crystallogr. 49, 672–679. https://doi.org/10.1107/S1600576716004349 (2016).

39. 39.

Thayer, J. et al. Data systems for the Linac coherent light source. Adv. Struct. Chem. Imaging https://doi.org/10.1186/s40679-016-0037-7 (2017).

40. 40.

White, T. A. et al. CrystFEL: A software suite for snapshot serial crystallography. J. Appl. Crystallogr. 45, 335–341. https://doi.org/10.1107/S0021889812002312 (2012).

41. 41.

White, T. A. Processing serial crystallography data with crystFEL: a step-by-step guide. Acta Crystallogr. Sect. D Struct. Biol. 75, 219–233. https://doi.org/10.1107/S205979831801238X (2019).

42. 42.

Mallery, D. L. et al. IP6 is an HIV pocket factor that prevents capsid collapse and promotes DNA synthesis. Elife https://doi.org/10.7554/eLife.35335 (2018).

43. 43.

Huynh, K. & Partch, C. L. Analysis of protein ligand-receptor binding by photoaffinity cross-linking. Curr. Protoc. Protein Sci. https://doi.org/10.1002/0471140864.ps2809s79 (2015).

44. 44.

Bahar, I., Atilgan, A. R. & Erman, B. Direct evaluation of thermal fluctuations in proteins using a single-parameter harmonic potential. Fold. Des. 2, 173–181. https://doi.org/10.1016/S1359-0278(97)00024-2 (1997).

45. 45.

Haliloglu, T., Bahar, I. & Erman, B. Gaussian dynamics of folded proteins. Phys. Rev. Lett. 79, 3090–3093. https://doi.org/10.1103/PhysRevLett.79.3090 (1997).

46. 46.

Hacisuleyman, A. & Erman, B. Causality, transfer entropy, and allosteric communication landscapes in proteins with harmonic interactions. Proteins Struct. Funct. Bioinforma. 85, 1056–1064. https://doi.org/10.1002/prot.25272 (2017).

47. 47.

Acar, B. et al. Distinct allosteric networks underlie mechanistic speciation of ABC transporters. Structure 28, 651-663.e5. https://doi.org/10.1016/j.str.2020.03.014 (2020).

48. 48.

Bahar, I., Cheng, M. H., Lee, J. Y., Kaya, C. & Zhang, S. Structure-encoded global motions and their role in mediating protein-substrate interactions. Biophys. J. 109, 1101–1109. https://doi.org/10.1016/j.bpj.2015.06.004 (2015).

49. 49.

Murakami, T. Roles of the interactions between Env and Gag proteins in the HIV-1 replication cycle. Microbiol. Immunol. 52, 287–295. https://doi.org/10.1111/j.1348-0421.2008.00008.x (2008).

50. 50.

Dubois, N. et al. The C-terminal p6 domain of the HIV-1 Pr55Gag precursor is required for specific binding to the genomic RNA. RNA Biol. 15, 923–936. https://doi.org/10.1080/15476286.2018.1481696 (2018).

51. 51.

Tateishi, H. et al. Design and synthesis of lipid-coupled inositol 1,2,3,4,5,6-hexakisphosphate derivatives exhibiting high-affinity binding for the HIV-1 MA domain. Org. Biomol. Chem. 12, 5006–5022. https://doi.org/10.1039/c4ob00350k (2014).

52. 52.

Mercredi, P. Y. et al. Structural and molecular determinants of membrane binding by the HIV-1 matrix protein. J. Mol. Biol. 428, 1637–1655. https://doi.org/10.1016/j.jmb.2016.03.005 (2016).

53. 53.

Saad, J. S. et al. Structure of the myristylated human immunodeficiency virus type 2 Matrix protein and the role of phosphatidylinositol-(4,5)- bisphosphate in membrane targeting. J. Mol. Biol. 382, 434–447. https://doi.org/10.1016/j.jmb.2008.07.027 (2008).

54. 54.

Ehrlich, L. S., Medina, G. N. & Carter, C. A. ESCRT machinery potentiates HIV-1 utilization of the PI(4,5)P 2-PLC-IP3R-Ca2+ signaling cascade. J. Mol. Biol. 413, 347–358. https://doi.org/10.1016/j.jmb.2011.08.038 (2011).

55. 55.

Ganser-Pornillos, B. K., Yeager, M. & Sundquist, W. I. The structural biology of HIV assembly. Curr. Opin. Cell Biol. 18, 1–24. https://doi.org/10.1016/j.sbi.2008.02.001 (2008).

Acknowledgements

HD acknowledges support from the National Science Foundation (NSF) Science and Technology Centers grant NSF-1231306 (Biology with X-ray Lasers, BioXFEL). This publication has been produced benefiting from the 2232 International Fellowship for Outstanding Researchers Program of TÜBİTAK (Project No: 118C270). However, the entire responsibility of the publication belongs to the owner of the publication. The financial support received from TÜBİTAK does not mean that the content of the publication is approved in a scientific sense by TÜBİTAK. HD would like to thank Michelle Young, Ritu Khurana, Lori Anne Love and Tracy Chou for their invaluable support and discussions. Authors would like to thank Jerome Johnson for his critical reading of the manuscript. The LCLS is acknowledged for beam time access under experiment no. cxils9717. Use of the Linac Coherent Light Source (LCLS), SLAC National Accelerator Laboratory, is supported by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences under Contract No. DE-AC02-76SF00515. This work was supported in part by Grant-in-Aid for Scientific Research (C) (17K08861), Grant-in-Aid for Research Activity Start-up (19K23802) and Grant-in-Aid for Scientific Research (B) (20H03365) from the Japanese Society for the Promotion of Science (JSPS), Grant-in and Aid for JSPS Research Fellow (17J11657), and the Platform for Drug Discovery, Informatics, and Structural Life Science (Ministry of Education, Culture, Sports, Science and Technology (MEXT), Japan Agency for Medical Research and Development (AMED)) and Basis for Supporting Innovative Drug Discovery and Life Science Research from Japan Agency for Medical Research and Development (AMED) under Grant Number JP20am0101071 (support number 2029). TH acknowledges TUBITAK (Project No: 115M418).

Author information

Authors

Contributions

H.D., M.F., T.S. and M.O. designed the project. H.I.C., H.T., K.K. and R.K. prepared the samples for cryo and S.F.X. studies. R.G.S. and H.D. build the coMESH injectors. C.H.Y. and Z.S. executed the S.F.X. data reduction and provided realtime X.F.E.L. data analysis. K.K., F.Y. and H.D. refined the cryo and S.F.X. structures. The experiments were executed by H.I.C., H.T., K.K., R.K., K.A., K.M., R.G.S., Z.S., M.L. G.N.M.-based transfer entropy calculations were performed by B.A. and T.H. Data were analyzed by H.D., T.S., M.O., M.F., T.H., B.A. and R.G.S. The manuscript was prepared by H.D., H.I.C., E.D., B.Y., E.A., C.D., G.Y., M.Y., F.B.E., A.S., O.G., S.O.B., T.H., M.O., M.F. and T.S. with input from all the coauthors.

Corresponding authors

Correspondence to Mikako Fujita, Toshiya Senda or Hasan DeMirci.

Ethics declarations

Competing interests

The authors declare no competing interests.

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

Ciftci, H., Tateishi, H., Koiwai, K. et al. Structural insight into host plasma membrane association and assembly of HIV-1 matrix protein. Sci Rep 11, 15819 (2021). https://doi.org/10.1038/s41598-021-95236-8

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41598-021-95236-8


text:
Add a column containing a simulation counter (irep). A new simulation is counted everytime a value in x is lower than its previous value.

irep(x, quiet = FALSE)

## Arguments

x The column to be used for computing simulation number, usually the ID column. Logical, if FALSE messages are printed to the console.

## Examples

xpdb_ex_pk_2 <- xpdb_ex_pk %>%
mutate(sim_id = irep(ID), .problem = 2)#> irep: 20 simulations found.


text:
# Happy 80th Birthday to the Turing Machine!

###### November 12, 2016 - San Francisco, CA

mark
0 1 *
state   0
1
2
3
4

speed

example rulesets

On this day in 1936, Alan Turing stood before the London Mathematical Society and delivered a paper entitled On Computable Numbers, with an Application to the Entscheidungsproblem, wherein he described an abstract mathematical device that he called a “universal computing engine” and which would later become known as a Turing machine, and used this device to prove that Hilbert’s Entscheidungsproblem (halting problem) was not solvable.

Although Alonzo Church beat the 24 year old Turing to that proof by a matter of months with his lambda-calculus approach, the two models of computation they used are equivalent - either can replicate the behavior of any given (non-quantum) algorithm - and Turing’s model is arguably more intuitive and elegant. And although it is an abstract and physically impossible device, it did help to inspire John von Neumann’s design of the architecture that underlies most of modern computing.

As a Stitch Fix tribute, we’ve melded a Turing machine and a 1936 Singer sewing machine. Although the tape is not infinite (you are limited to 500 entries in either direction), it otherwise functions as an actual Turing machine.

The current state of the machine (which is initialized to zero upon start) is shown at its base. At each step, the machine reads the mark on the tape directly below its needle and then follows the rule specified in the cell of the table that corresponds to that mark and to its current state. The syntax for the rules within each cell of the table is as follows (note that you can leave cells blank if they are never to be used):

1st character = mark to make, by overwriting the mark currently below the needle:
either 0 or 1 or *
(the * is a non-essential convenience for place-marking)

2nd character = direction to move after making that new mark:
"L", "R", "N" (no movement) or "T" (terminate)

3rd character = state to change to:
0-4 (ignored if "T" used as second character)

You can stop the machine to see the current output, then change the table (or try one of the suggested example tables), and click the start button again to watch it carry out your algorithm.

## Come Work with Us!

We’re a diverse team dedicated to building great products, and we’d love your help. Do you want to build amazing products with amazing peers? Join us!


text:
# Question involving beats and sound waves

insertnamehere
Hi, I have a question involving beats and sound waves.
When two sound waves (one with a MUCH LARGER Frequency than the other) combine, what would happen? Would there still be a beat pattern? Me, I think that if there still is a beat pattern, it would have the same frequency as that of the highest frequency of one of the combining waves. Am I right, or horribly wrong? I'm really puzzled by this. Thank you very much for your time.

Staff Emeritus
Gold Member
insertnamehere said:
Me, I think that if there still is a beat pattern, it would have the same frequency as that of the highest frequency of one of the combining waves. Am I right, or horribly wrong?

Check your book and find the formula for the beat frequency. It is not the higher of the two combining frequencies.

Mentor
If wave #1 has a much larger frequency than wave #2, then what you get is (approximately) a wave of frequency #1 whose amplitude varies according to frequency #2. This is the principle used in AM (amplitude modulation) radio signals.

$$y(t) = Acos(\omega_1t) + Acos(\omega_2t)$$
what does the addition of these two graph looks like if $\omega_1 << \omega_2$?


text:
Metal and Alloys

# What is the chemical formula of brass?

###### Wiki User

Copper and zinc as brass is an alloy

🙏
0
🤨
0
😮
0
😂
0

## Related Questions

### What is the chemical symbol for brass?

There isn't a chemical symbol for Brass. It is an alloy; a mixture of metals in various proportions, depending on what qualities are desired in the final product. Brass is an alloy of Copper (Cu) and Zinc (Zn). Its chemical formula is CuZn

### What the chemical formula for brass?

Because Brass is a mixture of mainly Zinc and Copper, it doesn't have a chemical formula. Unlike water where the atoms combine to make h2o in a chemical reaction, there is no chemical reaction when making Brass, so the atoms do not combine, so no new material is actually created. Making Brass is more like making a Martini, where you just add the ingredients with a stir, not an explosion.

### What is the chemical formula for brass?

AnswerThere is no chemical formula for brass because it is an alloy and not a chemical compound. Brass is made by combining copper and zinc in an approximately 2 to 1 ratio. But there are a ton of different alloys, each with its own ratio of copper to zinc and each with its own mechanical properties. A link is provided to the Wikipedia article on brass.YELLOW BRASS60 % copper 40 % Zinc RED BRASS 85% copper 15% Zinc as a mineral however it would be Cu3Zn2

### Why does brass not have a chemical symbol?

Brass is an allow of copper and zinc, only the two elements that make up brass would have their own chemical symbol.

### What is the chemical formula for 14 karat gold?

The Chemical formula for 14k soft yellow gold it is different kind of metal can be copper, silver , brass, bronze, if it's white gold is soft yellow alloys with rhodium plated formula, but in reality it's not the real white gold formula.

### What is the chemical composition of brass?

CHEMICAL COMPOSITION OF BRASS Cu-60%,Pb-2.5%,Fe-0.35%,Zn-REMINDER. *Since brass is an alloy and not a true compound, there is no chemical name for this metal.

### What chemical formula H20?

This chemical formula is for water.

### Which pop is more acidic?

what is the chemical formula of citric acid? what is the chemical formula of acetic acid? what is the chemical formula of formic acid? what is the chemical formula of Latic acid? what is the chemical formula of oxalic acid? what is the chemical formula of ascorbic acid? what is the chemical formula of tartaric acid?

### Chemical formula of algae?

Chemical formula of Algae: C106H263O110N16P Chemical formula of Algae: C106H263O110N16P Chemical formula of Algae: C106H263O110N16P

### What is the formula for chemical energy?

Energy has no chemical formula as it is not a chemical.

### Chemical formula for vanilla?

There is no chemical formula for vanilla. However, a chemical formula for vanillin does exist, and that formula is C8H8O3.

### Does a chemical formula show it solution?

A solution has not a chemical formula; only the solute has a chemical formula.

### What is the chemical formula of zirconium?

The chemical formula of zirconium is 'Zr'. The chemical formula of zirconium is 'Zr'.

### What is the chemical formula for octahydrate?

The chemical formula for an octahydrate is:(chemical formula of the compound).8 H2O.

### What is the chemical formula for SnCl4?

That is the chemical formula. SnCl4 is the chemical formula for tin(IV) chloride.

### What is the Formula to calculating the weight of BRASS?

You can use 8.5 as Brass density and work out the weight

### What is a example of chemical formula?

An example of a chemical formula is H2O, which is the chemical formula for water.

### What is the chemical formula of wood?

CH2O is the chemical makeup and formula of wood, this chemical formula is known as carbohydrate.

### What is chemical formula for soap nut powder?

it has no chemical formula. it is a mixture. only compounds have a chemical formula.

## Still have questions?

Trending Questions
How old is Danielle cohn? Asked By Wiki User
How many tens make 600? Asked By Wiki User
Previously Viewed


text:
# Cool Inequality 10 Trouble some

Algebra Level 4

${\sqrt { \left( xy+yz+zx \right) \left( \frac { 1 }{ \left( x+y \right) ^{ 2 } } +\frac { 1 }{ \left( y+z \right) ^{ 2 } } +\frac { 1 }{ { \left( z+x \right) }^{ 2 } } \right) } }$

If $x,y$ and $z$ are positive reals, find the minimum value of the expression above.

×


text:
# CircuiTikz: Inverter vs buffer logic gate dimensions

While running through the CircuiTikz Documentation I found that the buffer logic gate is not listed among the logic gates (§ 4.5). It is only listed among the amplifiers (§ 4.6). The problem i encountered is that the triangle of the inverter logic gate produced with CircuiTikz is a little different from the triangle of the buffer logic gate. However they should be exactly the same, according to bibliography. Am I doing something wrong? Is there any way to solve this?

Input

\documentclass[float=false, crop=false]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[american not port] (mynot) {};
\draw (mynot.in) node[anchor=east] {$x$};
\draw (mynot.out) node[anchor=west] {$F$};
\end{circuitikz} \\

\begin{circuitikz}
\draw (0,0) node[buffer] (mybuffer) {};
\draw (mybuffer.in) node[anchor=east] {$x$};
\draw (mybuffer.out) node[anchor=west] {$F$};
\end{circuitikz}
\end{document}

Output

Buffer and Inverter according to bibliography

You can set the default height and width of a buffer this way:

\ctikzset{bipoles/buffer/height/.initial=0.8}
\ctikzset{bipoles/buffer/width/.initial=0.9}

These values make the triangles the same.

\documentclass[float=false, crop=false]{standalone}
\usepackage{circuitikz}

\ctikzset{bipoles/buffer/height/.initial=0.8}
\ctikzset{bipoles/buffer/width/.initial=0.9}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[american not port] (mynot) {};
\draw (mynot.in) node[anchor=east] {$x$};
\draw (mynot.out) node[anchor=west] {$F$};
\end{circuitikz} \\

\begin{circuitikz}
\draw (0,0) node[buffer] (mybuffer) {};
\draw (mybuffer.in) node[anchor=east] {$x$};
\draw (mybuffer.out) node[anchor=west] {$F$};
\end{circuitikz}
\end{document}


text:
# Polytope in vertex representation (VPolytope)

LazySets.VPolytopeType
VPolytope{N, VN<:AbstractVector{N}} <: AbstractPolytope{N}

Type that represents a convex polytope in vertex representation.

Fields

• vertices – list of vertices

Examples

A polytope in vertex representation can be constructed by passing the list of vertices. For example, we can build the tetrahedron:

julia> P = VPolytope([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]]);

julia> P.vertices
4-element Vector{Vector{Int64}}:
[0, 0, 0]
[1, 0, 0]
[0, 1, 0]
[0, 0, 1]

Alternatively, a VPolytope can be constructed passing a matrix of vertices, where each column represents a vertex:

julia> M = [0 0 0; 1 0 0; 0 1 0; 0 0 1]'
0  1  0  0
0  0  1  0
0  0  0  1

julia> P = VPolytope(M);

julia> P.vertices
4-element Vector{Vector{Int64}}:
[0, 0, 0]
[1, 0, 0]
[0, 1, 0]
[0, 0, 1]
source
LazySets.dimMethod
dim(P::VPolytope)

Return the dimension of a polytope in vertex representation.

Input

• P – polytope in vertex representation

Output

The ambient dimension of the polytope in vertex representation. If P is empty, the result is $-1$.

Examples

julia> P = VPolytope();

julia> isempty(P.vertices)
true

julia> dim(P)
-1

julia> P = VPolytope([ones(3)]);

julia> P.vertices
1-element Vector{Vector{Float64}}:
[1.0, 1.0, 1.0]

julia> dim(P) == 3
true
source
LazySets.σMethod
σ(d::AbstractVector, P::VPolytope)

Return a support vector of a polytope in vertex representation in a given direction.

Input

• d – direction
• P – polytope in vertex representation

Output

A support vector in the given direction.

Algorithm

A support vector maximizes the support function. For a polytope, the support function is always maximized in some vertex. Hence it is sufficient to check all vertices.

source
Base.:∈Method
∈(x::AbstractVector{N}, P::VPolytope{N};
solver=default_lp_solver(N)) where {N}

Check whether a given point is contained in a polytope in vertex representation.

Input

• x – point/vector
• P – polytope in vertex representation
• solver – (optional, default: default_lp_solver(N)) the backend used to solve the linear program

Output

true iff $x ∈ P$.

Algorithm

We check, using linear programming, the definition of a convex polytope that a point is in the set if and only if it is a convex combination of the vertices.

Let $\{v_j\}$ be the $m$ vertices of P. Then we solve the following $m$-dimensional linear program.

$$$\max 0 \text{ s.t. } \bigwedge_{i=1}^n \sum_{j=1}^m λ_j v_j[i] = x[i] ∧ \sum_{j=1}^m λ_j = 1 ∧ \bigwedge_{j=1}^m λ_j ≥ 0$$$
source
Base.randMethod
rand(::Type{VPolytope}; [N]::Type{<:Real}=Float64, [dim]::Int=2,
[rng]::AbstractRNG=GLOBAL_RNG, [seed]::Union{Int, Nothing}=nothing,
[num_vertices]::Int=-1)

Create a random polytope in vertex representation.

Input

• VPolytope – type for dispatch
• N – (optional, default: Float64) numeric type
• dim – (optional, default: 2) dimension
• rng – (optional, default: GLOBAL_RNG) random number generator
• seed – (optional, default: nothing) seed for reseeding
• num_vertices – (optional, default: -1) upper bound on the number of vertices of the polytope (see comment below)

Output

A random polytope in vertex representation.

Algorithm

All numbers are normally distributed with mean 0 and standard deviation 1.

The number of vertices can be controlled with the argument num_vertices. For a negative value we choose a random number in the range dim:5*dim (except if dim == 1, in which case we choose in the range 1:2). Note that we do not guarantee that the vertices are not redundant.

source
LazySets.translate!Method
translate!(P::VPolytope, v::AbstractVector)

Translate (i.e., shift) a polytope in vertex representation by a given vector, in-place.

Input

• P – polytope in vertex representation
• v – translation vector

Output

The polytope P translated by v.

Notes

See translate(::VPolytope, ::AbstractVector) for the out-of-place version.

Algorithm

We add the vector to each vertex of the polytope.

source
LazySets.vertices_listMethod
vertices_list(P::VPolytope)

Return the list of vertices of a polytope in vertex representation.

Input

• P – polytope in vertex representation

Output

The list of vertices.

source
LazySets.remove_redundant_verticesMethod
remove_redundant_vertices(P::VPolytope{N};
[backend]=nothing,
[solver]=nothing) where {N}

Return the polytope obtained by removing the redundant vertices of the given polytope in vertex representation.

Input

• P – polytope in vertex representation
• backend – (optional, default: nothing) the backend for polyhedral computations; see default_polyhedra_backend(P) or Polyhedra's documentation for further information
• solver – (optional, default: nothing) the linear programming solver used in the backend, if needed; see default_lp_solver_polyhedra(N)

Output

A new polytope such that its vertices are the convex hull of the given polytope.

Notes

The optimization problem associated to removing redundant vertices is handled by Polyhedra. If the polyhedral computations backend requires an LP solver, but it has not been specified, we use default_lp_solver_polyhedra(N) to define such solver. Otherwise, the redundancy-removal function of the polyhedral backend is used.

source
LazySets.constraints_listMethod
constraints_list(P::VPolytope)

Return a list of constraints defining a polytope in vertex representation.

Input

• P – polytope in vertex representation

Output

A list of constraints of the polytope.

Algorithm

We use tohrep to compute the constraint representation of P.

source
LazySets.tohrepMethod
tohrep(P::VPolytope{N};
[backend]=default_polyhedra_backend(P)) where {N}

Transform a polytope in vertex representation to a polytope in constraint representation.

Input

• P – polytope in vertex representation
• backend – (optional, default: default_polyhedra_backend(P)) the backend for polyhedral computations; see Polyhedra's documentation for further information

Output

A HPolytope as the constraint representation of P.

Notes

The conversion may not preserve the numeric type (e.g., with N == Float32) depending on the backend.

source
LazySets.tovrepMethod
tovrep(P::VPolytope)

Return a vertex representation of the given polytope in vertex representation (no-op).

Input

• P – polytope in vertex representation

Output

The same polytope instance.

source
Polyhedra.polyhedronMethod
polyhedron(P::VPolytope;
[backend]=default_polyhedra_backend(P),
[relative_dimension]=nothing)

Return a VRep polyhedron from Polyhedra.jl given a polytope in vertex representation.

Input

• P – polytope in vertex representation
• backend – (optional, default: default_polyhedra_backend(P)) the backend for polyhedral computations; see Polyhedra's documentation for further information
• relative_dimension – (default, optional: nothing) an integer representing the (relative) dimension of the polytope; this argument is mandatory if the polytope is empty

Output

A VRep polyhedron.

Notes

The relative dimension (or just dimension) refers to the dimension of the set relative to itself, independently of the ambient dimension. For example, a point has (relative) dimension zero, and a line segment has (relative) dimension one.

In this library, LazySets.dim always returns the ambient dimension of the set, such that a line segment in two dimensions has dimension two. However, Polyhedra.dim will assign a dimension equal to one to a line segment because it uses a different convention.

source
LazySets.linear_mapMethod
linear_map(M::AbstractMatrix, P::VPolytope; [apply_convex_hull]::Bool=false)

Concrete linear map of a polytope in vertex representation.

Input

• M – matrix
• P – polytope in vertex representation
• apply_convex_hull – (optional, default: false) flag for applying a convex hull to eliminate redundant vertices

Output

A polytope in vertex representation.

Algorithm

The linear map $M$ is applied to each vertex of the given set $P$, obtaining a polytope in vertex representation. The output type is again a VPolytope.

source

Inherited from LazySet:

Inherited from AbstractPolyhedron:

Inherited from AbstractPolytope:


text:
#### Archived

This topic is now archived and is closed to further replies.

# View Frustum plane calculation

This topic is 6188 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, can anyone explain the idea behind calculating the 6 view frustum planes? I read Mark Morley tutorial. He combines the view matrix with projection matrix, and does some calculation to extract the plane''s equation. What is the formula/rationale he used to do the extraction calculation? Thanks.

##### Share on other sites
I have no idea, but I''d like to know...

As we all do, don''t we?

Qatal

die or be died...i think

##### Share on other sites
I''m not sure how he came up with it. As for why it works you have to lookup how the matrix is built in the documentation for glFrustrum. You can ignore the model view matrix by just making it the identity matrix. He is subtracting one of the first three rows from the fourth row.

Now ignoring what he did the normal for the right plane is (top,right,near) x (bottom,right,near) or (near*(top-bottom), 0, right*(bottom-top)). If you divide through by (top-bottom) you get (near, 0, -right). Now taking what he did you get (-2*near/(right-left), 0, -1-(right+left)/(right-left), 0) which simplifies to (near, 0, right, 0). You might notice that is not (near, 0, -right). I suspect that is actually the left hand plane since normally the z-axis goes straight through the center of the viewport so -right is left. None of his examples do anything where it matters which is left and which is right. Overall I don''t think it is some mathematical property as much as it is simply an encoding. It allows them to store the values in a manner that can be retrieved/used without affecting the projection operation.

I''m a bit confused on the model view part. That would seem to me to be projecting the model tranform which seems backwards to me. So my best guess is that I have it backwards and it is putting the projection matrix into model space. It seems like that would have to be the inverse of the model view, but apparently it works and apparently I''m wrong.

##### Share on other sites
The model view part is correct because the planes calculated are to be in global world coordinates. (meaning the planes are calculated when the view matrix is identity, then transformed by the model view)

I can understand calculating the planes by crossproduct of the ray projections. What I cannot see is the maths behind extracting the rows of the matrix and subtracting/adding (and it works!)

The first 3 columns of a matrix in opengl defines the orientation of the x,y,z axis of that coordinate frame. What does the rows mean then?

As I understand, the projection matrix turns the view frustum into a canonical view volume ( a 3d cube ) through a translation and a kind of z shear (which is not homogenous). So how he extracts the planes from that matrix is still a mystery to me.

##### Share on other sites
The projection matrix used by OpenGL is not:

  1 0 0 00 1 0 00 0 1 1/focus0 0 -1 0

How the matrix is built is documented here. The actual matrix used by OpenGL is apparently the transpose of that matrix. If you work through the calculations he gave you get a scaled version of the cross product.

##### Share on other sites
That is superby useful. Thanks!! I will digest it once the New Year mood passes.

..

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 10
• ### Forum Statistics

• Total Topics
633651
• Total Posts
3013134
×