Changeset 5fef0d7


Ignore:
Timestamp:
09/02/10 10:25:36 (14 years ago)
Author:
Jan Meinke <j.meinke@…>
Branches:
master
Children:
225475c
Parents:
3fbbfbb
Message:

Changed module name from smmp to smmp_p.

Fixed conversion to residue and atom names.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r3fbbfbb r5fef0d7  
    136136# The following line includes the minimum set of files needed to fullfill all dependencies.
    137137#
    138 # f2py -c -m smmp basic_smmp.pyf init_molecule.f init_energy.f bldmol.f nursvr.f pdbread.f redvar.f redseq.f outvar.f redstr.f enysol.f setmvs.f mklist.f getmol.f helix.f contacts.f dihedr.f setvar.f init_lund.f90 rmsdfun.f addend.f difang.f
     138# f2py -c -m smmp_p basic_smmp.pyf init_molecule.f init_energy.f bldmol.f nursvr.f pdbread.f redvar.f redseq.f outvar.f redstr.f enysol.f setmvs.f mklist.f getmol.f helix.f contacts.f dihedr.f setvar.f init_lund.f90 rmsdfun.f addend.f difang.f
    139139pybind: $(FILES)
    140140        #./rmexclpoint.py $(FILES)
     
    144144# Compile bindings that include enyshe_p
    145145ppybind: basic_smmp.pyf init_molecule.f init_energy.f bldmol.f nursvr.f pdbread.f redvar.f redseq.f outvar.f redstr.f enysol.f setmvs.f mklist.f getmol.f helix.f contacts.f dihedr.f setvar.f init_lund.f90 rmsdfun.f addend.f difang.f energy.f enyshe_p.f enyflx.f enylun.f eninteract.f enyreg.f eyabgn.f esolan.f gradient.f twister.f opesol.f opeflx.f opereg.f opeshe.f utilities.f
    146         f2py -c -m smmp basic_smmp.pyf init_molecule.f init_energy.f bldmol.f nursvr.f pdbread.f redvar.f redseq.f outvar.f redstr.f enysol.f setmvs.f mklist.f getmol.f helix.f contacts.f dihedr.f setvar.f init_lund.f90 rmsdfun.f addend.f difang.f energy.f enyshe_p.f enyflx.f enylun.f eninteract.f enyreg.f eyabgn.f esolan.f gradient.f twister.f opesol.f opeflx.f opereg.f opeshe.f utilities.f -I/usr/lib/mpi/gcc/openmpi/include -I/usr/lib/mpi/gcc/openmpi/lib -L/usr/lib/mpi/gcc/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl  -lutil -lm -ldl
     146        f2py -c -m smmp_p basic_smmp.pyf init_molecule.f init_energy.f bldmol.f nursvr.f pdbread.f redvar.f redseq.f outvar.f redstr.f enysol_p.f setmvs.f mklist.f getmol.f helix.f contacts.f dihedr.f setvar.f init_lund.f90 rmsdfun.f addend.f difang.f energy.f enyshe_p.f enyflx.f enylun.f eninteract.f enyreg.f eyabgn.f esolan.f gradient.f twister.f opesol.f opeflx.f opereg.f opeshe.f utilities.f -I/usr/lib/mpi/gcc/openmpi/include -I/usr/lib/mpi/gcc/openmpi/lib -L/usr/lib/mpi/gcc/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl  -lutil -lm -ldl
    147147
    148148newbasicpybind: init_molecule.f init_energy.f energy.f utilities.f
    149         f2py --overwrite-signature -h basic_smmp.pyf -m smmp init_molecule.f init_energy.f energy.f utilities.f
     149        f2py --overwrite-signature -h basic_smmp.pyf -m smmp_p init_molecule.f init_energy.f energy.f utilities.f
    150150
    151151newpybind: $(FILES)
  • algorithms.py

    r3fbbfbb r5fef0d7  
    66import copy
    77import random
    8 import smmp
     8import smmp_p as smmp
    99from math import *
    1010from universe import *
     
    5858        """Performs a single Monte Carlo sweep."""
    5959        eol = self.__univ.energy()
    60         eol, self.__acc = smmp.metropolis(eol, self.__acc, self.__weight)
    61         #eol = self.metropolis()
     60        #eol, self.__acc = smmp.metropolis(eol, self.__acc, self.__weight)
     61        eol = self.metropolis()
    6262        self.__performedSweeps += 1
    6363        if eol < self.__minEnergy:
  • enysol_p.f

    r3fbbfbb r5fef0d7  
    334334      call MPI_ALLREDUCE(eysl, eyslsum, 1, MPI_DOUBLE_PRECISION,
    335335     &      MPI_SUM,my_mpi_comm, ierror)
    336 !       write (logString, *) 'enysol>', myrank, eysl, eyslsum
     336      write (logString, *) 'enysol>', myrank, eysl, eyslsum
    337337      tsurfres = surfres
    338338      call MPI_ALLREDUCE(tsurfres, surfres, mxrs, MPI_DOUBLE_PRECISION,
  • protein.py

    r3fbbfbb r5fef0d7  
    66#
    77import sys
     8import numpy as np
    89import smmp_p as smmp
    910from math import *
     
    5253       
    5354    def name(self):
    54         return ''.join([smmp.atm_c.nmat[i][self.__id] for i in range(0,4)]).strip()
     55        return ''.join(smmp.atm_c.nmat[:,0].reshape([-1,4])[self.__id]).strip()
    5556       
    5657    def __str__(self):
     
    174175    def residues(self):
    175176        """Returns a list of the amino acids in this protein."""
    176         seq = [str(c[0]) for c in smmp.res_c.seq]
     177        seq = [''.join(l) for l in np.array([str(c[0]) for c in smmp.res_c.seq]).reshape([-1, 4])]
    177178        first = smmp.mol_i.irsml1[self.__id]- 1
    178179        last = smmp.mol_i.irsml2[self.__id] - 1
    179         return ''.join(seq).split()[first:last]
     180        return seq[first:last]
    180181       
    181182    def id(self):
Note: See TracChangeset for help on using the changeset viewer.