{'fraction_non_alphanumeric': 0.03721356553620531, 'fraction_numerical': 0.023281393217231897, 'mean_word_length': 5.108995893990295, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An online GPCR structure analysis platform 3

We present an online, interactive platform for comparative analysis of all available G protein-coupled receptor structures while correlating to functional data. The comprehensive platform encompasses structure similarity, secondary structure, protein backbone packing and movement, residue-residue contact networks, amino acid properties and prospective design of experimental mutagenesis studies. This lets any researcher tap the potential of sophisticated structural analyses enabling a plethora of basic and applied research studies.

interactive plots tailored to the type of data: TM1-7 segment movement (2D and 3D segment plots), receptor 1 segment contacts (flare plot, 2D and 3D network), residue contacts (flare plot, heatmap, 2D and 3D networks 2 and 3D structure), residue contact frequencies (box plot) and residue properties (box plot, heatmap, scatter 3 plot, snakeplot and 3D structure). Altogether, this tool allows for swift yet powerful analysis of distances, 4 movements, topology, distributions, and differences to identify correlations across the macro-to micro-scales 5 i.e., from TM helix bundle contacts to residue backbone kinks, sidechain rotamers and atomic interactions. (https://review.gpcrdb.org/structure_comparison/comparative_analysis). The structural templates include all GPCR 10 structures which can be analyzed for variability in one set or differences between two sets. Results can be filtered to 11 4 identify functionally critical residue contacts, residue backbone and sidechain movements, residue properties and helix 1 types, bulges and constrictions. The tool includes >20 tailored visualizations.

3
The 'Structure similarity trees' (https://review.gpcrdb.org/structure_comparison/structure_clustering) allow 4 for conformational clustering of any GPCR structures through an exhaustive all-to-all C-C distance pair 5 comparison across structurally equivalent residue positions (~24,000 distances/receptor) and average linkage 6 clustering (Methods). This technique is independent of sequence similarity and the biases of traditional 3D 7 alignment methods with root mean square deviation valueswhich vary depending on template and 8 superposition region 12 . Clustering receptors based on their conformation instead of sequence aids correlation 9 to receptor function which is further facilitated by mapping of state, endogenous ligands and G proteins ( To show the utility of the platform to uncover functional determinants, we applied the Structure comparison 19 tool to list residues that stabilize receptors in an inactive/active state and suggested mutations in a 'State-20 without an effector G protein, ii) effector site opened by allosteric modulators, iii) fusion proteins moving 1 cytosolic TM6, and iv) helix 8 repacking to transmembrane helices. Furthermore, the TM6 activation switch 2 behaves differently across GPCR classes 5,15 . To address these problems, we present a 'degree active' percent 3 measure based on overall similarity with reference structures with consistent pharmacology and structural 4 integrity, and a classification of all GPCR structures into an inactive, intermediate, active or 'other' 5 conformational state (Methods, http://review.gpcrdb.org/structure). This should aid all researchers to correctly 6 characterize the conformational state of ambiguous structures to avoid artefacts in the structural basis. 7 8 Taken together, the online platform makes sophisticated comparative structure analysis accessible to a broad 9 research community. It features unique classification of receptors structures states and techniques. The 10 Structure similarity trees based on all-to-all C atom distance pairs 16 avoids inconsistencies arising from 11 template and substructure selection in traditional protein superposition and root mean square deviation 12 (RMSD) approaches. Unlike previous resources 3,17,18 , the Structure comparison tool can compare a group or 13 two sets of structures w.r.t. backbone secondary structure and residue propertiesand visualize results in over 14 20 interactive plots. Furthermore, the contact percent frequencies presented herein are directly interpretable 15 (unlike the only other available score 4 ) and allows identification of determinants differing in opposite structure 16 sets ( 18 only supports one set and 17 cannot compare structures). This tool's built-in anti-skewing averaging of 17 quantitative properties (Methods) eases use and, together with the extensive target selection table including 18 e.g. resolution cut-offs, makes results more robust. Finally, the State-stabilizing mutation design tool has the 19 advantage that it identifies functional determinants, not based on individual pairs 4,6,17,18 , but on the net-sum of 20 all contacts to other residues. Therefore, the platform could be applied to uncover determinants of e.g., 21 constitutive activity and ligand-dependent biased signaling, allosteric modulation, efficacy or modality, and 22 will grow even stronger as structural biology continues to advance.   Subsequently, JavaScript functions parse the data in the browser and present the visualization options and data 20 browsers to the user. For all data browsers (i.e., the structure selection and the data browsers mentioned above) 21 we applied the DataTables.js (https://datatables.net) module in conjunction with yadcf.js (https://yadcf-22 showcase.appspot.com). This allowed for advanced sorting and filtering of our tables. The visualizations were 23 written in JavaScript and most use of the D3.js framework (https://d3js.org) to generate SVG figures and 24 animations. In addition, we utilized D3.js modules for specific plotting options, most notably FlarePlot 18 which 25 we significantly customized. For the boxplots we used plotly.js and for 3D representation of receptor structures 26 we utilized NGL 22 with custom additions for superimposing and coloring. 27 28 GPCR structure state classification. We calculated a 'degree active' percent value and added this for all 1 structures in the GPCRdb structure browser (http://review.gpcrdb.org/structure). G protein and arrestin bound 2 structures were set to 100% active, and structures with a distance between Cα atoms of a specific residue pair 3 in TM2 and TM6 below a fixed cut-off (see below) were set as reference for 0% active. The aforementioned 4 residue pairs were selected for each class based on a high correlation between their distance and the state of illustrating the separation of clades based on a silhouette score 13 , which represents the score for all structures 24 under this node compared to all structures under the next closest node. This score spans quantifies the 25 separation from -1 (wrong, light red) via 0 (non-significant, white) to 1 (perfect, black). 26 1 Generic residue numbering. Corresponding residue positions in each class were indexed with the structure-2 based GPCRdb generic residue numbering system 23 . This builds on the sequence-based generic residue 3 numbering systems for class A (Ballesteros-Weinstein), B1 (Wootten), C (Pin) and F (Wang), but preserves 4 gaps from a structural alignment of two receptors, caused by a unique helix bulge or constriction, in the 5 sequence alignment thereby avoiding offset of such and following residues. All schemes assign residue 6 numbers relative to the most conserved amino acid residue, which is given the number 50, and prefixed with 7 the TM helix number (e.g. 3x32 is on TM3 and 18 positions before the reference). This generic residue 8 numbering scheme also uniquely indexes helix 8 and structurally conserved loop segments, which are 9 numbered by the preceding and following TM helix (e.g. 45 is ECL2 located between TM4-5). 10 11 Structure comparison tool. We created an extensive integrated online tool for comparative GPCR structure 12 analysis (https://review.gpcrdb.org/structure_comparison/comparative_analysis). Its Structure selection table  13 was developed to extend the annotation in the GPCRdb structure browser with additional data aiding selection 14 of representative templates for GPCRs and activation states. Integration with other GPCRdb analysis tools and 15 stand-alone resources was implemented by import and export PDB codes. Separate analysis modes were 16 developed for analysis of a single structure, structure set or structure set pair. We generated separate data 17 browsers for i) Contact position pairs, ii) Contact position-AA pairs, iii) Residue backbone & sidechain 18 movement and iv) Residue helix types, bulges and constrictions. The data browsers present comprehensive 19 data on contact, helix and residue properties (Extended Data Table 1). To mitigate skewing upon comparison 20 of sets of few versus many diverse structural templates, each quantitative value in a structure set was calculated 21 based on the mean from all receptors, each of which is in its turn represented by a mean value from all its 22 structures. For angles we use a mean of circular quantities. In contrast, values are not averaged across structure 23 states (inactive, intermediate, active and other) which can instead optionally be separated into two different 24 structure sets before analysis. Integrated into the tool, we developed >20 interactive visualizations e.g., 25 snakeplot (topology), scatter plot (correlations), box plot (distributions and differences), heatmap (distances 26 or movements) and structure (movements). 27 1 State stabilizing contact determination. We developed two browsers, for any and specific amino acid 2 combinations, respectively, for residue-residue pair contacts in our webserver for comparative structure 3 analysis along with plots to visualize these in a 3D structure 22 , flare plot 18 , network (2D and 3D, adapted from 4 https://d3js.org) or heatmap. Contact definitions and defaults for intra-and intersegment sidechain and 5 backbone contacts are explained in the settings menu of the webserver. For each residue in a receptor structure, 6 non-hydrogen atoms in close proximity of non-hydrogen atoms from neighboring residues are taken into 7 account. These potential contacts are further evaluated based on atom and residue types and their distance. For 8 each of the contact types, the default maximum distances are ionic (4.5Å), polar (4Å), aromatic (stacking 5.5Å 9 and cation-π 6.6Å), hydrophobic (4.5Å) and Van der Waals contacts (1.1 times their combined VdW radii). 10 Depending on the chosen settings, also contact angles are taken into account for polar and aromatic contacts. remove residues stabilizing the undesired state (alanine mutation) and ii) introduce residues stabilizing the 18 desired state (consensus amino acid from the structure in the desired state). Together, this allows the fine-19 tuning of receptor activity by exploiting state determinants that stabilize only a single state (not both) and to 20 (re-)introduce consensus amino acids that form many state-specific contacts in the GPCR class but are missing 21 in the receptor of interest. 22

23
For each suggested residue mutation position the tool also presents already known experimental mutation 24 effects. This includes literature mutations with effect on ligand activity (>34,648 data points) and structure 25 construct mutations (540 data points) that affect primarily thermostability. It also includes receptor expression-26 increasing mutations that are subsets of these two datasets (483 and 173 datapoints, respectively). For each 1 mutant position, the overall supporting data types is presented as the sum of i) presence of ligand activity 2 altering mutations (>5-fold effect in at least two receptors), ii) thermostabilizing mutations and expression-3 increasing mutations from iii) structure constructs (non-quantified data) or iv) ligand activity studies (>30% 4 increase, minimum of two receptors). The tool automatically incorporates new structural templates, including 5 for the classes C and F, which do not yet have supporting data in GPCRdb. 6 7 GPCRdb has previously provided thermostabilizing mutations, using rule-based sequence rationale and 8 inference of structure construct mutations, integrated in a structure construct design tool 9 (https://gpcrdb.org/construct/design and 3 ). The Katritch 25 and Vaidehi 26 groups have combined similar 10 information (the latter also dynamics) into machine learning predictors. Furthermore, the Vaidehi group earlier 11 combined receptor models with an energy function 27 , however both its approaches limit their mutation 12 suggestions to alanine. Our new state stabilizing mutation design tool differs by giving direct access to all pre-13 generated mutation suggestions for all human GPCRs and going further in providing a data-driven rationale 14 for mutations stabilizing a given receptor state, as it is founded on templates from all GPCRs for which a 15 structure has been determinedand new GPCR structures are added to GPCRdb monthly. While established 16 methods focus on only the desired state, this tool also removes residues stabilizing the undesired state. The 17 importance of validating the state-specific nature of a mutation across both states is illustrated by the fact that 18 a majority of agonist-bound crystal structures of GPCR are in the inactive state 3 . It is therefore recommended 19 to measure the effect of a given mutation on an inactive versus active state proxy, such as the effect on binding 20 affinity or thermal stability in the presence of an inverse agonist and agonist, respectively. Furthermore, our 21 analysis of determinant overlap showed that the receptor state is commonly associated with not just thermal 22 stability but also ligand activity (binding and/or efficacy) and receptor expression at the cell membrane, which 23 benefits from a more stable protein (Extended Data Fig. 1). Hence, state stabilizing mutations may have an 24 underappreciated utility across pharmacology, biophysics and structural biology, such as dissection of 25 14 signaling bias determinants 28 or fine-tuning of receptor basal activity 29 , ligand assay sensitivity and signal 1 window 30 or complexation with G proteins 3 or other effectors and receptor activity modulatory proteins.  General Segment Transmembrane helices 1-7 (TM1-7), the first two intra-(ICL1-2) or extracellular loops (ECL1-2) or helix 8 (H8). Helix Next tau dihedral C(+1)-C-C(-1)-C(-2) Helix Tau dihedral C(+2)-C(+1)-C-C(-1) Helix Theta angle (C(+1)-C-C(-1)

Residue
Angle to helix and 7TM axes Angle (˚) to the axes of the given TM helix and the 7TM axis (only calculated for residues in TM1-7).
Residue C half-sphere exposure (Å²) A measure of how "buried" a residue is by counting the number of Cα-atoms in half of the sphere (12 Å radius) perpendicular to the Cβ-Cα vector 32 .

Residue Class seq consensus
Consensus amino acid (AA) and conservation (%) across all receptor paralogues in each class extracted from the sequence alignments in GPCRdb 31 . Residue Distance to all other pos. Change in average distance (Å) to all other generic residue positions.

Residue
No 3D coordinates Percent of structures in the set in which the given residue lacks coordinates.

Residue
No generic number (gap pos) Percent of structures in the set in which the given residue has a gap in the structure (e.g., due to a shorter segment or a local helix constriction).

Residue
Position presence (%) Percent of structures in the set in which the given residue has a conserved secondary structure.

Residue Rotamer
To enable comparison of residue rotamers across all amino acids (including glycine by virtually placing a Cβ atom), rotation was measured as the angle from their terminal heavy atom to the C and N atoms.

Residue RSA
Relative surface area (RSA) (Å 2 ) calculated as the percentage of the calculated SASA for each residue compared to the empirical maximum SASA values for each residue as reported in 33 . Residue SASA Solvent-accessible surface area (SASA) (Å 2 ) calculated using FreeSASA 34 .
Residue Secondary structure Secondary structure information was calculated with DSSP 3.1.2 (which has a highly improved recognition of π-helices) 35 .

Residue
Sequence consensus Consensus amino acid (AA) and conservation (%) in each structure set.

Residue
Tau angle N-C-C atom angle.