Пример #1
0
            kappa += (100. - 40.) / 90000.

        if (p != 0 or iter != 0):
            FTSM.setConstraint(PHI,
                               PSI,
                               phi=z[p][0],
                               psi=z[p][1],
                               kappa=kappa,
                               forcefield=ff)

        # UPDATE FREE SPACE
        # USE FIRST SYSTEM TO GET M
        # USE SECOND SYSTEM TO OBTAIN PHI AND PSI DIFFERENCES
        # FROM TARGETS
        zp0 = z[p][0]
        z[p][0] -= (kappa / gamma) * dt * (FTSM.M(x[p], PHI, PHI) *
                                           (z[p][0] - y[p].dihedral(PHI)) +
                                           FTSM.M(x[p], PHI, PSI) *
                                           (z[p][1] - y[p].dihedral(PSI)))
        z[p][1] -= (kappa / gamma) * dt * (FTSM.M(x[p], PSI, PHI) *
                                           (zp0 - y[p].dihedral(PHI)) +
                                           FTSM.M(x[p], PSI, PSI) *
                                           (z[p][1] - y[p].dihedral(PSI)))

        # UPDATE CARTESIAN
        prop[p][0].propagate(scheme="velocityscale",
                             steps=1,
                             dt=dt,
                             forcefield=ff,
                             params={'T0': 300})
Пример #2
0
io.plotVector(proparray[0][0],stringgraph,S, rangex=[-numpy.pi, 0], rangey=[-100*numpy.pi/180, numpy.pi])
# SET THE STATE BACK TO THE ORIGINAL PDB
#io.readPDBPos(physarray[0][0], "examples/alanSolStates/alanC7axial_wb5_min_eq.pdb")



dt = 1.0
for iter in range(0, 100000): # NUMBER OF FTSM ITERATIONS
    for workpt in range(0, numpoints): # LOOPING OVER POINTS
        if (iter >= 10000 and iter <= 100000):
            kappa += (100.-40.)/90000.
        # UPDATE FREE SPACE
        # USE FIRST SYSTEM TO GET M
        # USE SECOND SYSTEM TO OBTAIN PHI AND PSI DIFFERENCES
        # FROM TARGETS
        M = FTSM.M(physarray[workpt][0], PHI_DIHEDRAL, PSI_DIHEDRAL)
        #print "DIFFERENCE: ", S[workpt][0]-physarray[workpt][1].phi(PHI_DIHEDRAL), " " , S[workpt][1]-physarray[workpt][1].phi(PSI_DIHEDRAL)
        S[workpt][0] -= (kappa/gamma)*M*dt*(S[workpt][0]-physarray[workpt][1].phi(PHI_DIHEDRAL))
        S[workpt][1] -= (kappa/gamma)*M*dt*(S[workpt][1]-physarray[workpt][1].phi(PSI_DIHEDRAL))
        # UPDATE CARTESIAN
        # Dr. Izaguirre: I have checked and this constraint
        # is correct.  The energy is harmonic, but the force (the gradient)
        # is not harmonic.  In fact it is exactly what is in the paper.

        proparray[workpt][0].propagate(scheme="LangevinImpulse", steps=1, dt=dt, forcefield=ff)

        proparray[workpt][1].propagate(scheme="LangevinImpulse", steps=1, dt=dt, forcefield=ff)

        # My own function which sets phi and psi for individual force objects
        # Saves performance since I only change 'angle', I don't want to define
        # all new force objects by changing params.
Пример #3
0
for iter in range(0, numsteps): # NUMBER OF FTSM ITERATIONS
    for p in range(0, numpoints): # LOOPING OVER POINTS

        if (iter >= 15000):# and iter <= 100000):
            kappa += (100.-40.)/90000.

        if (p != 0 or iter != 0):
           FTSM.setConstraint(PHI, PSI, phi=z[p][0], psi=z[p][1], kappa=kappa, forcefield=ff)
        
        # UPDATE FREE SPACE
        # USE FIRST SYSTEM TO GET M
        # USE SECOND SYSTEM TO OBTAIN PHI AND PSI DIFFERENCES
        # FROM TARGETS
        zp0 = z[p][0]
        z[p][0] -= (kappa/gamma)*dt*(FTSM.M(x[p], PHI, PHI)*(z[p][0]-y[p].dihedral(PHI)) + FTSM.M(x[p], PHI, PSI)*(z[p][1] - y[p].dihedral(PSI)))
        z[p][1] -= (kappa/gamma)*dt*(FTSM.M(x[p], PSI, PHI)*(zp0-y[p].dihedral(PHI)) + FTSM.M(x[p], PSI, PSI)*(z[p][1] - y[p].dihedral(PSI)))
        # My own function which sets phi and psi for individual force objects
        # Saves performance since I only change 'angle', I don't want to define
        # all new force objects by changing params.
        #if (iter != 0 or p != 0):
        #  FTSM.setConstraint(phi=z[p][0], psi=z[p][1], kappa=kappa, forcefield=ff)
        
        # UPDATE CARTESIAN
        # Dr. Izaguirre: I have checked and this constraint
        # is correct.  The energy is harmonic, but the force (the gradient)
        # is not harmonic.  In fact it is exactly what is in the paper.
        prop[p][0].propagate(scheme="velocityscale", steps=1, dt=dt, forcefield=ff, params={'T0':300})
        prop[p][1].propagate(scheme="velocityscale", steps=1, dt=dt, forcefield=ff, params={'T0':300})

        # My own function which sets phi and psi for individual force objects
Пример #4
0
        kappa += kappaincr

    if (iter != 0):
        FTSM.setConstraint(PHI,
                           PSI,
                           phi=z_p[0],
                           psi=z_p[1],
                           kappa=kappa,
                           forcefield=ff)
    # UPDATE FREE SPACE
    # USE FIRST SYSTEM TO GET M
    # USE SECOND SYSTEM TO OBTAIN PHI AND PSI DIFFERENCES
    # FROM TARGETS
    zp0 = z_p[0]
    z_p[0] -= (kappa /
               gamma) * dt * (FTSM.M(x, PHI, PHI) *
                              (z_p[0] - y.angle(PHI)) + FTSM.M(x, PHI, PSI) *
                              (z_p[1] - y.angle(PSI)))
    z_p[1] -= (kappa /
               gamma) * dt * (FTSM.M(x, PSI, PHI) *
                              (zp0 - y.angle(PHI)) + FTSM.M(x, PSI, PSI) *
                              (z_p[1] - y.angle(PSI)))

    # UPDATE CARTESIAN
    # Dr. Izaguirre: I have checked and this constraint
    # is correct.  The energy is harmonic, but the force (the gradient)
    # is not harmonic.  In fact it is exactly what is in the paper.
    prop[0].propagate(scheme="velocityscale",
                      steps=1,
                      dt=dt,
                      forcefield=ff,