Example #1
0
    # md.goalprojection = MetricRmsd(Molecule(htmd.home() + '/data/adaptive/generators/1/structure.pdb'),
    #                               'protein and name CA')
    md.goalfunction = rmsdgoal
    # md.app = AcemdLocal()
    # md.run()

    # Some real testing now
    from htmd.projections.metricsecondarystructure import MetricSecondaryStructure
    from htmd.projections.metricdistance import MetricSelfDistance
    import numpy as np

    os.chdir(path.join(home(), 'data', 'test-adaptive'))

    goalProjectionDict = {
        'ss':
        MetricSecondaryStructure(),
        'contacts':
        MetricSelfDistance('protein and name CA',
                           metric='contacts',
                           threshold=10),
        'ss_contacts': [
            MetricSecondaryStructure(),
            MetricSelfDistance('protein and name CA',
                               metric='contacts',
                               threshold=10)
        ]
    }

    def getLongContacts(crystal, long=8):
        crystalMap = MetricSelfDistance('protein and name CA',
                                        metric='contacts',
Example #2
0
 def getCrystalSS(crystal):
     return MetricSecondaryStructure().project(crystal)[0]
Example #3
0
    md.updateperiod = 5
    md.projection = MetricDistance('protein and name CA', 'resname BEN and noh')
    # md.goalprojection = MetricRmsd(Molecule(htmd.home() + '/data/adaptive/generators/1/structure.pdb'),
    #                               'protein and name CA')
    md.goalfunction = rmsdgoal
    # md.app = AcemdLocal()
    # md.run()

    # Some real testing now
    from htmd.projections.metricsecondarystructure import MetricSecondaryStructure
    from htmd.projections.metricdistance import MetricSelfDistance
    import numpy as np

    os.chdir(path.join(home(), 'data', 'test-adaptive'))

    goalProjectionDict = {'ss': MetricSecondaryStructure(),
                          'contacts': MetricSelfDistance('protein and name CA', metric='contacts', threshold=10),
                          'ss_contacts': [MetricSecondaryStructure(),
                                          MetricSelfDistance('protein and name CA', metric='contacts', threshold=10)]}

    def getLongContacts(crystal, long=8):
        crystalMap = MetricSelfDistance('protein and name CA', metric='contacts', threshold=10, pbc=False).getMapping(
            crystal)
        indexes = np.vstack(crystalMap.atomIndexes.as_matrix())
        return crystal.resid[indexes[:, 1]] - crystal.resid[indexes[:, 0]] > long

    def getCrystalSS(crystal):
        return MetricSecondaryStructure().project(crystal)[0]

    def getCrystalCO(crystal):
        crystalCO = MetricSelfDistance('protein and name CA', metric='contacts', threshold=10, pbc=False).project(