Example #1
0
 def run(self):
     structure = self.search.run(self.steps)
     self.ui.log.append("Lowest energy found: "+str(structure.energy))
     if (isinstance(structure.lattice, SquareLattice)):
         plot_2d(structure, self.ui.widget.canvas.fig)
     else:
         plot_3d(structure, self.ui.widget.canvas.fig)
     self.ui.widget.canvas.draw()
     plot_contact_map(structure, self.ui.widget_2.canvas.fig)
     self.ui.widget_2.canvas.draw()
Example #2
0
 def test_multidomain(self):
     structure=random_avoid(20, CubicLattice(), chain_list=[10,10])
     self.assertIsNotNone(plot_3d(structure))
     self.assertIsNotNone(plot_contact_map(structure))
Example #3
0
'''
A Monte Carlo search on a multidomain protein.

@author: Mark Oakley
'''
from pylatt.model import MJ
from pylatt.lattice import FCCLattice
from pylatt.plotter import plot_3d
from pylatt.search import MonteCarlo
import matplotlib.pyplot as plt

'''To search a multidomain protein, set up a termini list. This
should contain the indices of the ends of each peptide chain. The
example here sets up two 9-residue peptides.'''
model = MJ("LMVGGVVIALMVGGVVIA")
chain_list = [9, 9]
lattice = FCCLattice()
search = MonteCarlo(lattice, model, chain_list)
structure = search.run(100)
plot_3d(structure)
plt.show()
Example #4
0
 def test_3d(self):
     structure=random_avoid(150, CubicLattice())
     self.assertIsNotNone(plot_3d(structure))