PubChem3D: Shape compatibility filtering using molecular shape quadrupoles

Background PubChem provides a 3-D neighboring relationship, which involves finding the maximal shape overlap between two static compound 3-D conformations, a computationally intensive step. It is highly desirable to avoid this overlap computation, especially if it can be determined with certainty that a conformer pair cannot meet the criteria to be a 3-D neighbor. As such, PubChem employs a series of pre-filters, based on the concept of volume, to remove approximately 65% of all conformer neighbor pairs prior to shape overlap optimization. Given that molecular volume, a somewhat vague concept, is rather effective, it leads one to wonder: can the existing PubChem 3-D neighboring relationship, which consists of billions of shape similar conformer pairs from tens of millions of unique small molecules, be used to identify additional shape descriptor relationships? Or, put more specifically, can one place an upper bound on shape similarity using other "fuzzy" shape-like concepts like length, width, and height? Results Using a basis set of 4.18 billion 3-D neighbor pairs identified from single conformer per compound neighboring of 17.1 million molecules, shape descriptors were computed for all conformers. These steric shape descriptors included several forms of molecular volume and shape quadrupoles, which essentially embody the length, width, and height of a conformer. For a given 3-D neighbor conformer pair, the volume and each quadrupole component (Qx, Qy, and Qz) were binned and their frequency of occurrence was examined. Per molecular volume type, this effectively produced three different maps, one per quadrupole component (Qx, Qy, and Qz), of allowed values for the similarity metric, shape Tanimoto (ST) ≥ 0.8. The efficiency of these relationships (in terms of true positive, true negative, false positive and false negative) as a function of ST threshold was determined in a test run of 13.2 billion conformer pairs not previously considered by the 3-D neighbor set. At an ST ≥ 0.8, a filtering efficiency of 40.4% of true negatives was achieved with only 32 false negatives out of 24 million true positives, when applying the separate Qx, Qy, and Qz maps in a series (Qxyz). This efficiency increased linearly as a function of ST threshold in the range 0.8-0.99. The Qx filter was consistently the most efficient followed by Qy and then by Qz. Use of a monopole volume showed the best overall performance, followed by the self-overlap volume and then by the analytic volume. Application of the monopole-based Qxyz filter in a "real world" test of 3-D neighboring of 4,218 chemicals of biomedical interest against 26.1 million molecules in PubChem reduced the total CPU cost of neighboring by between 24-38% and, if used as the initial filter, removed from consideration 48.3% of all conformer pairs at almost negligible computational overhead. Conclusion Basic shape descriptors, such as those embodied by size, length, width, and height, can be highly effective in identifying shape incompatible compound conformer pairs. When performing a 3-D search using a shape similarity cut-off, computation can be avoided by identifying conformer pairs that cannot meet the result criteria. Applying this methodology as a filter for PubChem 3-D neighboring computation, an improvement of 31% was realized, increasing the average conformer pair throughput from 154,000 to 202,000 per second per CPU core.

Results: Using a basis set of 4.18 billion 3-D neighbor pairs identified from single conformer per compound neighboring of 17.1 million molecules, shape descriptors were computed for all conformers. These steric shape descriptors included several forms of molecular volume and shape quadrupoles, which essentially embody the length, width, and height of a conformer. For a given 3-D neighbor conformer pair, the volume and each quadrupole component (Q x , Q y , and Q z ) were binned and their frequency of occurrence was examined. Per molecular volume type, this effectively produced three different maps, one per quadrupole component (Q x , Q y , and Q z ), of allowed values for the similarity metric, shape Tanimoto (ST) ≥ 0.8. The efficiency of these relationships (in terms of true positive, true negative, false positive and false negative) as a function of ST threshold was determined in a test run of 13.2 billion conformer pairs not previously considered by the 3-D neighbor set. At an ST ≥ 0.8, a filtering efficiency of 40.4% of true negatives was achieved with only 32 false negatives out of 24 million true positives, when applying the separate Q x , Q y , and Q z maps in a series (Q xyz ). This efficiency increased linearly as a function of ST threshold in the range 0.8-0.99. The Q x filter was consistently the most efficient followed by Q y and then by Q z . Use of a monopole volume showed the best overall performance, followed by the self-overlap volume and then by the analytic volume. Application of the monopole-based Q xyz filter in a "real world" test of 3-D neighboring of 4,218 chemicals of biomedical interest against 26.1 million molecules in PubChem reduced the total CPU cost of neighboring by between 24-38% and, if used as the initial filter, removed from consideration 48.3% of all conformer pairs at almost negligible computational overhead. Conclusion: Basic shape descriptors, such as those embodied by size, length, width, and height, can be highly effective in identifying shape incompatible compound conformer pairs. When performing a 3-D search using a shape similarity cut-off, computation can be avoided by identifying conformer pairs that cannot meet the result criteria. Applying this methodology as a filter for PubChem 3-D neighboring computation, an improvement of 31% was realized, increasing the average conformer pair throughput from 154,000 to 202,000 per second per CPU core.

Background
PubChem is an open and free resource of the biological activities of small molecules [1][2][3][4]. PubChem has an integrated theoretical 3-D layer, PubChem3D [5][6][7], which provides a precomputed 3-D neighboring relationship called "Similar Conformers" [7] to help users locate and relate data in the archive. "Similar Conformers" identifies chemicals with similar 3-D shape and similar 3-D orientation of functional groups typically used to define pharmacophores (defined here simply as "features"), complementing a PubChem 2-D neighboring relationship called "Similar Compounds", which identifies closely related chemical analogs using the PubChem 2-D subgraph fingerprint [8]. Effectively, for each Pub-Chem chemical structure, this 3-D neighboring relationship provides (at the time of writing) the results of a 3-D similarity search against 28.9 million compound records using three diverse conformers per molecule.
The PubChem3D neighboring uses as a measure of molecular shape similarity the shape Tanimoto (ST) [9,10], given as the following equation: where V AA and V BB are the self-overlap volumes of conformers A and B, respectively, and V AB is the common overlap volume between A and B. The 3-D neighboring requires finding the maximum shape similarity between static compound 3-D conformations, as dictated by V AB in Equation 1, to calculate ST, a computationally intensive step. It is highly desirable to avoid this overlap computation, especially if it can be determined with certainty that a conformer pair cannot meet the criteria to be a 3-D neighbor. As such, PubChem employs a series of filters, based on the concept of volume, to effectively ignore approximately 65% of all conformer neighbor pairs during 3-D neighboring, thus dramatically accelerating processing [7].
Volume, although a rather fuzzy concept, is rather effective as a filter between conformers dissimilar in shape and features [7]. Conceivably there are other aspects of molecular shape beyond volume to "recognize" when two shapes are (dis)similar. A characteristic one can readily imagine are descriptors associated with aspects of length, width, and height. Steric shape quadrupoles embody such a concept and attempts have been made to use their differences as a shape similarity metric [11,12]. This leads to the question: can additional simple shape descriptor relationships be identified that improve upon the volume-based filtering efficacy? Or, put another way, can one place an upper bound on shape similarity by identification of some (additional) crude shape compatibility between conformers?
In this paper, we examine the use of shape descriptors as a means to rapidly identify "dissimilar" molecule shapes. As a part of this, we attempt to answer the critical questions: are vague shape descriptors representing the concepts of length, width, and height good discriminators of molecular shape? Can 3-D similarity searching speed be further accelerated using shape descriptors more sophisticated than volume? Is it possible to create a "shape compatibility" mapping indexed to shape similarity?
Results and Discussion

Distribution of shape descriptor components and their volume dependency
The molecular shape quadrupoles in the principal-axes frame [9,13] are given as the following: where, Q x , Q y , and Q z are the x, y, and z components of the quadrupole moment, respectively. The x, y, and z components are conceptually equivalent to the length, width, and height of a molecule, respectively, with the largest quadrupole component defined as Q x and the smallest as Q z , by convention. An assumption underlying this study is that there is a point whereby, if the shape quadrupole difference between two conformers is too large, they cannot meet the ST ≥ 0.8 threshold required by PubChem3D neighboring, as illustrated in Figure 1. This relationship, if it actually exists, would allow conformer pairs to be filtered out, avoiding the time-consuming shape superposition optimization step for those pairs and enhancing the throughput of the PubChem 3-D neighboring. To attempt to determine if a relationship can be found, the shape quadrupole differences for known 3-D "Similar Conformers" were analyzed.
At the time of quadrupole filter project initiation (in October, 2008), 3-D neighboring of 17,143,181 unique molecules, effectively covering the CID range 1-25,000,000, had been completed using a single conformer per compound, yielding 4,182,412,802 3-D neighbors. Table 1 shows the statistics of the three quadrupole components for those 17.1 million molecules. The mean and standard deviation for Q x , Q y , and Q z were 15.01 ± 8.07 Å 5 , 3.81 ± 1.80 Å 5 , and 1.52 ± 0.65 Å 5 , respectively. Figure 2 and 3 display the distributions of Q x , Q y , and Q z , after they were binned into units of 2.5 Å 5 , 0.5 Å 5 , and 0.1 Å 5 , respectively. All three components showed strongly skewed distributions; however, most of the molecules were populated near the mean and relatively few molecules had quadrupole components much larger than the mean values.
The molecular volume and quadrupole moments are correlated with each other according to the following equation: where R g is the radius of gyration and V mp is the monopole volume, which corresponds to the monopole in the shape multipole expansion [13]. Equation 3 implies that the size of a molecule (represented by the molecular volume) is not completely independent of its quadrupole moment. Therefore, at the beginning of this study, the correlation between molecular volume and quadrupole moment was investigated. Note that, because the molecular volume is not a measurable quantity with a clear, unanimous definition, there are many ways to estimate it [13][14][15][16][17][18]. Therefore, in addition to the monopole volume, the PubChem 3-D information includes two other volumes computed in different ways. One is the analytic volume and the other is the self-overlap volume. The analytic volume is considered to be most consistent to other definitions of molecular volume among the three, but its computation is also the slowest. For this reason, evaluation of the ST score given in Equation 1 uses the self-overlap volume, whose evaluation is considerably faster than the analytic volume; however, it typically overestimates the molecular volume by a factor of three greater than the analytic volume, as shown in Table 2. Each compound conformer record in the PubChem provides all three volumes and they can be downloaded: individually from the Compound Summary pages, using a list from the PubChem Download Facility (http://pubchem.ncbi.nlm.nih.gov/pc_fetch), or in bulk from the PubChem FTP site (ftp://ftp.ncbi.nlm.nih.gov/pubchem). To avoid confusion about these three different volumes used in the present paper, we denote the monopole volume, self-overlap volume, and analytic volume as V mp , V so , and V an , respectively, whereas the volume in a general sense is denoted as V (without any subscript). Figure 4 displays the distribution of the three different volumes of the 17.1 million molecules from the PubChem Compound database. In general, V so is the largest, and V an is the smallest. As shown in Figure 5, the quadrupole moment increases with molecular size, implying that the effect of quadrupole difference between two molecules upon their shape similarity may depend on their relative molecular sizes. Therefore, the quadrupole differences of 3-D "Similar Conformer" neighbors as a function of volume need to be considered.

Design of 3-D neighbor filters using quadrupole moment differences
As a general premise, if two molecules with the same volume also have identical values for the quadrupole Figure 1 Small changes in dimensions can result in large changes in overlap. Using a 2-D rectangle shape with constant area (0.4 in 2 ), one can see that small changes in shape dimensions (length and width) can result in large changes in shape overlap (ST). Note that, for two shapes to be considered similar to each other (with a ST score of ≥ 0.8, indicated in red), the difference in length and width between them should be smaller than a certain threshold. components, they are likely to be shape similar to each other. In addition, as the quadrupole moment difference deviates from zero, the maximum shape similarity is expected to decrease (see Figure 1). When the quadrupole (and volume) difference becomes greater than some value or threshold, the shape dissimilarity is such that the molecule conformer pair cannot possibly meet the criteria to be a PubChem 3-D neighbor (ST ≥ 0.8). Therefore, if we know these quadrupole difference thresholds for a given volume pair, one may be able to preclude conformer pairs that are not sufficiently shape similar, using only knowledge of the volume and quadrupole moments.
In the present study, the quadrupole moment differences of the 4.18 billion 3-D neighbors, identified from the 3-D neighboring of 17.1 million molecules, were analyzed to find the maximum possible quadrupole differences for two molecules to be neighbors (see also the "Materials and Methods" section). The volume and quadrupole moments of the two molecules in each neighbor pair were first converted into an integer value by using the following two equations: for the volumes (4) where superscript "bin" is used to distinguish these integers from the original, non-binned values. The denominator Binsize was 5.0 Å 3 for all the three volumes, and 2.5 Å 5 , 0.5 Å 5 , and 0.1 Å 5 , for Q x , Q y , and Q z , respectively. After all 4.18 billion 3-D neighbors were binned according to their V bin and Q bin values, the 3-D neighbor distribution for a given ( V bin 1 , V bin 2 ) pair was analyzed as a function of ΔQ bin .
To illustrate the general premise above that quadrupole deviations from zero result in a reduction is shape similarity, Figure 6 shows the neighbor count as a function of Q bin x for (V bin mp,1 , V bin mp,2 ) = (100, 110), (100, 120), and (100, 130). As anticipated, maximum neighbor populations exist when Q bin x is near the origin, and rapidly decrease in count (nearly linear reduction on a log curve) as the Q bin x deviates from zero. In addition, for a given ( V bin mp,1 V bin mp,2 ) pair, neighbors were observed only for a certain range of Q bin x , indicating that this range information can be used as a filter that prescreens non-neighbor pairs. The asymmetric distribution  Distribution of the analytic volume (V an ), monopole volume (V mp ), and selfoverlap volume (V so ), in units of Å 3 , for the 17.1 million molecules considered from the PubChem Compound database. of the 3-D neighbors in Figure 6 with respect to the ordinate axis ( Q bin x = 0) suggests that two different filters would need to be generated: one for Q bin x ≥ 0 and the other for Q bin x < 0. Figures 7, 8 and 9 show the ΔQ bin threshold for each quadrupole component as a function of volume for the 4.18 billion 3-D neighbors. Note that, since PubChem regularly gets additional new unique content from its contributors, there is always a possibility that the 3-D neighboring of these new records may identify previously unseen cases of ΔQ bin threshold. If we use these ΔQ bin threshold maps [see panels (a) and (b) of Figures 7, 8 and 9] as a filter during neighboring, we would preclude those 3-D neighbors. Therefore, we modified the maps [see panels (c) and (d) of Figures 7, 8 and 9], as described in the "Materials and Methods" section, to extend ΔQ bin difference values or to add neighboring bins where no population is found in an attempt to mitigate any such issues in the fringe regions on the maps. These modified ΔQ bin threshold maps are designated as quadrupole filters. For simplicity, we name these filters with a capital letter "F" followed by a subscript, which represents one of the quadrupole components, and a superscript, which represents the type of volume involved. For example, filter "F an x " indicates that the Q x filter generated with the analytic volume, V an .
Given that these quadrupole filters were built using an existing set of 3-D neighbor cases, one needs to validate the extent of their efficacy. To do so, a 13.2 billion molecule conformer pair test set not considered as a part of the original 3-D neighboring training set, is utilized (see the "Materials and Methods" section). After computing the ST scores for the 13.2 billion pairs, the fraction of 3-D neighbors and non-neighbors, which would have been pre-screened if the quadrupole filters were applied, is summarized in Table 3.
Of the three volume types utilized, the monopolebased quadrupole filters, F mp , is arguably the best. Filter F mp x removed 4.78 billion pairs (36.3%), while incurring a loss of only 30 out of 24 million "potential" neighbors.
[Note that the definition of a PubChem 3-D neighbor involves feature similarity as well as shape similarity, while the quadrupole filters deal only with shape similarity. As such, the 30 pairs filtered out had a ST score sufficient to be a 3-D neighbor, making it a "potential" 3-D neighbor.] The false negative count of 30 removed by F mp x is negligible, but does show that use of such a filter will result in precluding some potential 3-D neighbors in its use, in this case at a rate of 1 in 800,000. Filters

Application of 3-D neighbor filters using quadrupole moment differences
Given that filtering conformer pairs using steric shape quadrupoles is effective with minimal loss of potential 3-D neighbors, a "real world" test is made with F mp xyz to see how use of these filters in the context of PubChem 3-D neighboring improves throughput. To achieve this, comparison is made to earlier benchmarks [7] whereby a set of known drugs and other molecules of keen biomedical interest are neighbored against the 3-D contents of PubChem. Table 4 and Table 5 summarize the results of these tests.
Considering PubChem 3-D neighboring is a precomputed similarity search, one can see that the neighboring throughput improvements using F mp xyz are substantial, with an average improvement of 31% across the range of conformer counts per compound. Perhaps surprising is that the F mp xyz filtering removes only 7% of the conformer pairs, yet achieves a 31% neighboring throughput improvement. This emphasizes the dramatic cost/benefit difference between the computation necessary to achieve the 7% reduction versus what is expended in its absence.
It is important to note that F mp xyz is not the first filter applied in Table 5, meaning that there are three other filters utilized before F  neighboring is repeated for the case of one diverse conformer per compound. When used first, F mp xyz removes 48.3% of all conformer pairs (44.8%, 2.1%, and 1.4% conformer pairs for F mp x , F mp y , and F mp z , applied in that order, respectively) versus the 7.4% as shown in Table 5. The CT Feature, CT Volume, and ST Volume filters, applied in that order, remove 27.9%, 0.1%, and 0.002% conformer pairs, respectively, when F mp xyz is applied first.

Conclusion
Simple molecular shape descriptors, volume and steric quadrupole moments (embodying the length, width, and height of a shape), of 4.18 billion 3-D neighbor pairs resulting from PubChem 3-D neighboring of 17.1 million single conformer molecules were analyzed. The maximum quadrupole differences between neighbor conformers were determined. This examination demonstrated a distinct dependency of shape similarity upon quadrupole variation. With some slight modification of fringe regions, the results of this analysis were turned into computationally inexpensive, yet highly effective set of filters capable of removing 3-D conformer pairs that cannot meet a required shape similarity, using only knowledge of the volume and steric quadrupole moments of the conformer pair. When applied in the context of shape similarity searching, these filters can significantly improve throughput performance by avoiding expensive superposition optimization computation of conformer pairs that cannot possibly meet a predefined shape similarity search threshold. The filters devised were tested using a dataset of 13.2 billion compound pairs. The quadrupole filters based on a monopole volume showed the best efficacy, while the filters using an analytic volume had the lowest efficacy. For all the three volume types, the Q x filters eliminated a larger portion of the compound pairs than the Q y and Q z filters. When the filters were used in a series simultaneously, they could eliminate 30~40% of non-neighbor In summary, the quadrupole filters developed in this study can speed up the PubChem 3-D neighbor processing with a negligible loss of the 3-D neighbors. However, its applicability is not just limited to PubChem 3-D neighboring. The results of the present study also suggest that the shape multipole moments can be applied generally to enhance the speed of 3-D similarity search Materials and methods

Datasets
At the time of project initiation, PubChem 3-D neighboring of 17,143,181 unique molecules (ranging from CID 1 to CID 25,000,000) had been completed using a single conformer per compound, yielding 4,182,412,802 3-D neighbors. Using the Shape Toolkit from the    OpenEye Software [19], the analytic volume (V an ), monopole volume (V mp ), self-overlap volume (V so ), and steric shape quadrupole moments (Q x , Q y , and Q z ) were computed for the theoretical conformer of all 17.1 million molecules. See Figures 2 and 4 for the distributions of the computed values.

Filter generation
The quadrupole filters developed for pre-screening conformer-pairs based on quadrupole differences as a function of shape similarity ST threshold were generated using the following steps: 1) The 4.18 billion 3-D neighbor pairs and their associated data were obtained from PubChem.
2) The volumes (V mp , V so , and V an ) and quadrupole components (Q x , Q y , and Q z ) of the compound pair for each 3-D neighbor were converted into integers using Equations 4 and 5 to yield V bin mp , V bin so , V bin an , Q bin x , Q bin y , and Q bin z , respectively. The denominator BinSize was 5.0 Å 3 for all three volume types and 2.5 Å 5 , 0.5 Å 5 , and 0.1 Å 5 , for Q x , Q y , and Q z , respectively.
3) For each of the three binned volume types, the following was performed using the 3-D neighbor pairs (in this case using V bin mp as an example):  Figures 7, 8 and 9].
iii) The Q bin x difference maps were modified, as described in the next section, to generate a final Q x filter based on monopole volumes ( F mp x ) [see panels (c) and (d) in Figures 7, 8 and 9]. 4) To obtain filters effective at an ST threshold other than ≥ 0.80, first restrict the original 4.18 billion 3-D neighbor pairs to those at or above the desired ST threshold and repeat step 3. This procedure is performed for all unique ΔQ bin values starting with the maximum. As lesser ΔQ bin values are considered in this correction, greater ΔQ bin values are considered at the ΔQ bin value being considered. A pseudo-code implementation of this procedure is shown in Figure 12. All quadrupole filters resulting from this modification are available in Additional file 1.

Efficiency test of filters
To test the efficiency of the quadrupole filters devised, two sets of molecules were chosen. One set contains molecules in the PubChem CID range of 12 5,000,000, and the other contains those in the CID range of 25,000,001~25,001,000. Because a theoretical conformer was not generated for all CIDs or because compound records were not "live", the two datasets had 17,488,897 and 753 molecules, respectively. All-by-all comparison between the two sets gives 13,169,139,441 CID pairs. Using the first diverse conformer for each compound, the ST values for these 13.2 billion pairs were computed using ROCS [20] from OpenEye software, Inc., consuming~419 CPU days in total, and stored. These ST scores were used to estimate how many CID pairs would be filtered out when applying the quadrupole filters as a function of volume type and as a function of ST threshold, for example, as demonstrated in Table 3 and Figure 10.

Effect of Quadrupole filters on PubChem3D Neighboring
One aspect of this effort is to examine the change in real-world efficiency of PubChem3D neighboring processing when using quadrupole filters while computing the 3-D "Similar Conformers" relationship. To achieve this, the set of 4,218 biologically relevant chemical structures with known pharmacological actions from our earlier efforts [7] was used. These small molecules with known biological action (Query set) were neighbored against 26,157,365 compound records (Search set), representing the entire "live" PubChem3D contents as of Oct. 2010, using up to 1, 3, 5, 7, and 10 diverse conformers per compound for both compound sets. Timing and efficiency differences with our earlier work are given in Tables 4 and 5.

Additional material
Additional file 1: Quadrupole filters. A zip archive of text files containing information on the maximum quadrupole differences as a function of molecular volumes.