当前位置: 首页>>代码示例>>Python>>正文


Python Grid.maps['A']方法代码示例

本文整理汇总了Python中Grid.Grid.maps['A']方法的典型用法代码示例。如果您正苦于以下问题:Python Grid.maps['A']方法的具体用法?Python Grid.maps['A']怎么用?Python Grid.maps['A']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Grid.Grid的用法示例。


在下文中一共展示了Grid.maps['A']方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testCalcEnergy

# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import maps['A'] [as 别名]
    def testCalcEnergy(self):
        ligand = Ligand()
        ligand.read_pdbqt("./Inputs/ind.pdbqt")
        ligand.update_tcoord_model("./Results/ind_1.model")

        grid = Grid()
        grid.field = Field("./Parameters/hsg1_rigid.maps.fld")
        grid.maps['e'] = ElectrostaticMap("./Maps/hsg1_rigid.e.map", grid.field).map
        grid.maps['d'] = DesolvationMap("./Maps/hsg1_rigid.d.map", grid.field).map
        grid.maps['A'] = AtomTypeMap("./Maps/hsg1_rigid.A.map", grid.field).map
        grid.maps['C'] = AtomTypeMap("./Maps/hsg1_rigid.C.map", grid.field).map
        grid.maps['HD'] = AtomTypeMap("./Maps/hsg1_rigid.HD.map", grid.field).map
        grid.maps['N'] = AtomTypeMap("./Maps/hsg1_rigid.N.map", grid.field).map
        grid.maps['NA'] = AtomTypeMap("./Maps/hsg1_rigid.NA.map", grid.field).map
        grid.maps['OA'] = AtomTypeMap("./Maps/hsg1_rigid.OA.map", grid.field).map
        
        dock = Dock()
        dock.ligand = ligand
        dock.grid = grid
        dock.calc_energy()

        exp_elecs = [-0.037623435264000013, -0.11408866126250672, \
                     -0.13002690236871114, -0.11316478799697538, \
                     0.079400682425344024, 0.16382104147968005, \
                     0.35572237014565938, -0.13983584352051195, \
                     -0.14455922704497778, -0.2437679729095111, \
                     -0.2233031453627734, -0.057756149112888927, \
                     -0.079042238535680001, -0.032257681663999997, \
                     -0.14416303698488891, 0.10750629826486036, \
                     0.24778700799999992, -0.084038775587896894, \
                     -0.106404338719744, -0.052751354779306661, \
                     0.024654531648227552, -0.0042321141760000005, \
                     -0.00035986557866666673, -0.00033659216281599992, \
                     -0.0041046807466666672, 0.012465198300672001, \
                     -0.090822509727725043, -0.17177248957202962, \
                     1.1082351947605333, -0.89707293013333311, \
                     0.026757765866666665, -0.0020757145903407409, \
                     -0.00025216804266666674, -0, -0.00048987137962666649, \
                     -0.0041342845067377787, -0.077292167626752006, \
                     0.0028771771022222214, -0.035468487893333331, \
                     0.061588514183964438, -0.025041379570346665, \
                     -0.0055949960533333357, -0.0031704985600000007, \
                     -0.0069595652002702214, -0.012058230703198818, \
                     -0.0079140675343170441, -0.012375409536000002, \
                     0.3866265132258988, -0.20299363642879997]
        self.assertEquals(dock.elecs, exp_elecs)

        exp_elec_total = -0.689862915434
        self.assertLessEqual(dock.elec_total - exp_elec_total, 0.000000000001)
        self.assertGreaterEqual(dock.elec_total - exp_elec_total, -0.000000000001)

        exp_emaps = [-0.27127903027200001, -0.16588333043273959, \
                     -0.20299416690915556, -0.21193308408991288, \
                     -0.22342833248403907, -0.10887097308672009, \
                     -0.069412406582518515, -0.32392036196890539, \
                     -0.22020219191751092, -0.35971221242311113, \
                     -0.36151369650175996, -0.33589534698001067, \
                     -0.31399731050837326, -0.37602125178402135, \
                     -0.18051097352533335, -0.17621873305273847, \
                     -0.092143525887999983, -0.2309628750124183, \
                     -0.24049173290393594, -0.30815793025564453, \
                     -0.39344854528779372, -0.50645809636693317, \
                     -0.53159663755332287, -0.49475817361601443, \
                     -0.34577077998990213, -0.31340080937233067, \
                     0.083165888601903395, -0.37009113352391104, \
                     -0.26495262599680025, -0.35829845333333321, \
                     -0.27628956787200004, -0.36140396483508141, \
                     -0.31815226712832012, -0.2094688831146666, \
                     -0.23815943764081771, -0.24906767845688918, \
                     -0.22192987677536707, -0.25745685461333312, \
                     -0.19937555381333344, -0.2350488774924894, \
                     -0.19400907040085333, -0.14228789478968887, \
                     -0.23528794258204436, -0.4346495467977386, \
                     -0.44998934942632773, -0.52384750919471401, \
                     -0.51774914410666673, -0.26729886470788744, \
                     0.052065064174933465]
        self.assertEquals(dock.emaps, exp_emaps)

        exp_emap_total = -13.5485660526
        self.assertLessEqual(dock.emap_total - exp_emap_total, 0.0000000001)
        self.assertGreaterEqual(dock.emap_total - exp_emap_total, -0.0000000001)
开发者ID:ekaakurniawan,项目名称:hppNeuroDock,代码行数:83,代码来源:Dock_ut.py

示例2: Ligand

# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import maps['A'] [as 别名]
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

# References:
#  - AutoDock 4.2.3 Source Code
#    http://autodock.scripps.edu

from Ligand import Ligand
from Grid import Grid
from Parameters import Field
from Map import ElectrostaticMap, DesolvationMap, AtomTypeMap
from Dock import Dock

ligand = Ligand()
ligand.read_pdbqt("./Inputs/ind.pdbqt")
ligand.update_tcoord_model("./Results/ind.model")

grid = Grid()
grid.field = Field("./Parameters/hsg1_rigid.maps.fld")
grid.maps['e'] = ElectrostaticMap("./Maps/hsg1_rigid.e.map", grid.field).map
grid.maps['d'] = DesolvationMap("./Maps/hsg1_rigid.d.map", grid.field).map
grid.maps['A'] = AtomTypeMap("./Maps/hsg1_rigid.A.map", grid.field).map
grid.maps['C'] = AtomTypeMap("./Maps/hsg1_rigid.C.map", grid.field).map
grid.maps['HD'] = AtomTypeMap("./Maps/hsg1_rigid.HD.map", grid.field).map
grid.maps['N'] = AtomTypeMap("./Maps/hsg1_rigid.N.map", grid.field).map
grid.maps['NA'] = AtomTypeMap("./Maps/hsg1_rigid.NA.map", grid.field).map
grid.maps['OA'] = AtomTypeMap("./Maps/hsg1_rigid.OA.map", grid.field).map

dock = Dock(grid, ligand)
dock.calc_energy()
dock.test_print() #bar
开发者ID:icedmilo,项目名称:FpgaAutoDock,代码行数:32,代码来源:Main.py

示例3: testCalcLinInterp3

# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import maps['A'] [as 别名]
    def testCalcLinInterp3(self):
        ligand = Ligand()
        ligand.read_pdbqt("./Inputs/ind.pdbqt")
        ligand.update_tcoord_model("./Results/ind_1.model")

        grid = Grid()
        grid.field = Field("./Parameters/hsg1_rigid.maps.fld")
        grid.maps['e'] = ElectrostaticMap("./Maps/hsg1_rigid.e.map", grid.field).map
        grid.maps['d'] = DesolvationMap("./Maps/hsg1_rigid.d.map", grid.field).map
        grid.maps['A'] = AtomTypeMap("./Maps/hsg1_rigid.A.map", grid.field).map
        grid.maps['C'] = AtomTypeMap("./Maps/hsg1_rigid.C.map", grid.field).map
        grid.maps['HD'] = AtomTypeMap("./Maps/hsg1_rigid.HD.map", grid.field).map
        grid.maps['N'] = AtomTypeMap("./Maps/hsg1_rigid.N.map", grid.field).map
        grid.maps['NA'] = AtomTypeMap("./Maps/hsg1_rigid.NA.map", grid.field).map
        grid.maps['OA'] = AtomTypeMap("./Maps/hsg1_rigid.OA.map", grid.field).map

        protein = Protein()

        u0, v0, w0, u1, v1, w1, \
            p000, p001, p010, p011, p100, p101, p110, p111 = \
            Dock.calc_linInterp3(grid, ligand, protein)

        exp_u0 = [24, 27, 30, 33, 33, 36, 28, 24, 22, 29, 29, 32, 32, 35, 29, \
                  28, 27, 25, 25, 21, 18, 15, 13, 15, 19, 21, 36, 28, 29, 28, \
                  35, 36, 36, 35, 35, 35, 22, 23, 25, 26, 26, 25, 23, 40, 41, \
                  40, 42, 26, 23]
        self.assertEquals(u0, exp_u0)
                
        exp_v0 = [29, 30, 27, 29, 31, 28, 25, 25, 27, 22, 23, 25, 25, 27, 27, \
                  30, 26, 28, 27, 28, 28, 27, 27, 27, 27, 28, 26, 24, 19, 18, \
                  28, 31, 31, 28, 25, 25, 31, 33, 37, 38, 36, 32, 31, 29, 28, \
                  33, 27, 24, 22]
        self.assertEquals(v0, exp_v0)

        exp_w0 = [18, 19, 21, 22, 24, 20, 24, 23, 21, 26, 30, 32, 36, 37, 37, \
                  35, 40, 42, 46, 47, 44, 44, 41, 38, 38, 41, 18, 41, 31, 29, \
                  41, 43, 46, 49, 47, 43, 16, 13, 12, 10, 7, 6, 10, 20, 24, \
                  19, 18, 46, 46]
        self.assertEquals(w0, exp_w0)

        exp_u1 = [25, 28, 31, 34, 34, 37, 29, 25, 23, 30, 30, 33, 33, 36, 30, \
                  29, 28, 26, 26, 22, 19, 16, 14, 16, 20, 22, 37, 29, 30, 29, \
                  36, 37, 37, 36, 36, 36, 23, 24, 26, 27, 27, 26, 24, 41, 42, \
                  41, 43, 27, 24]
        self.assertEquals(u1, exp_u1)
                
        exp_v1 = [30, 31, 28, 30, 32, 29, 26, 26, 28, 23, 24, 26, 26, 28, 28, \
                  31, 27, 29, 28, 29, 29, 28, 28, 28, 28, 29, 27, 25, 20, 19, \
                  29, 32, 32, 29, 26, 26, 32, 34, 38, 39, 37, 33, 32, 30, 29, \
                  34, 28, 25, 23]
        self.assertEquals(v1, exp_v1)
                
        exp_w1 = [19, 20, 22, 23, 25, 21, 25, 24, 22, 27, 31, 33, 37, 38, 38, \
                  36, 41, 43, 47, 48, 45, 45, 42, 39, 39, 42, 19, 42, 32, 30, \
                  42, 44, 47, 50, 48, 44, 17, 14, 13, 11, 8, 7, 11, 21, 25, \
                  20, 19, 47, 47]
        self.assertEquals(w1, exp_w1)

        exp_p000 = [0.0049920000000003, 0.07082279822222158, \
                    0.010670762666666705, 0.014893662814814962, \
                    0.05954753422222141, 0.06692323555555484, \
                    0.02218827851851877, 0.05730432948148176, \
                    0.09164231111110999, 0.11063039999999903, \
                    0.07689557333333293, 0.05574929066666695, \
                    0.15205717333333324, 0.510503367111111, \
                    0.13600474074074018, 0.3160871632592622, \
                    0.14260223999999969, 0.020969604740741634, \
                    0.07576166400000024, 0.43352632888888754, \
                    0.24339291022222376, 0.11683840000000191, \
                    0.06234385066666788, 0.0069254826666658295, \
                    0.049472398222222956, 0.004077568000000049, \
                    0.005478324148148441, 0.001810014814814871, \
                    0.04792319999999972, 0.0, 0.11909688888888928, \
                    0.06675531851851867, 0.34005930666666545, \
                    0.019190670222224544, 0.022714595555556102, \
                    0.02363960888888848, 0.04932630755555612, \
                    0.028551111111111964, 0.0027955200000004095, \
                    0.002817744592593219, 0.013583075555555114, \
                    0.2548221724444463, 0.007528391111110991, \
                    0.04061548088888999, 0.031737780148146724, \
                    0.017002571851849876, 0.1769813333333323, \
                    0.061945476740739906, 0.7125060266666654]
        self.assertEquals(p000, exp_p000)
        
        exp_p001 = [0.0046080000000002855, 0.028647423999999776, \
                    0.052845681777776904, 0.038809448296297094, \
                    0.010895132444444356, 0.12177009777777835, \
                    0.06019394370370367, 0.010699226074073875, \
                    0.0982243555555557, 0.40154737777778016, \
                    0.22347775999999855, 0.18181870933333166, \
                    0.3616494933333342, 0.1806112995555552, \
                    0.14577303703703634, 0.0034079478518515044, \
                    0.2535150933333334, 0.04401883970370486, \
                    0.17345433599999888, 0.17308700444444436, \
                    0.018132423111111077, 0.022254933333333133, \
                    0.052258816000000166, 0.010048739555554584, \
                    0.06794626844444453, 0.004370432000000051, \
                    0.02819989807407561, 0.006367762962963142, \
                    0.6432768000000015, 0.2736355555555557, \
                    0.05954844444444527, 0.16720023703703696, \
#.........这里部分代码省略.........
开发者ID:ekaakurniawan,项目名称:hppNeuroDock,代码行数:103,代码来源:Dock_ut.py


注:本文中的Grid.Grid.maps['A']方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。