[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[modeller_usage] secondary structure restrain error



Hello:

I am trying to use the following script for restrain my secondary structure:


from modeller import *
from modeller.automodel import * # Load the automodel class
log.verbose()
env = environ()
# directories for input atom files
env.io.atom_files_directory = [’.’, ’../atom_files’]
class MyModel(automodel):
def special_restraints(self, aln):
rsr = self.restraints
at = self.atoms
# Add some restraints from a file:
# rsr.append(file=’my_rsrs1.rsr’)
# Residues 20 through 30 should be an alpha helix:
rsr.add(secondary_structure.alpha(self.residue_range(’20:’, ’30:’)))
# Two beta-strands:
rsr.add(secondary_structure.strand(self.residue_range(’1:’, ’6:’)))
rsr.add(secondary_structure.strand(self.residue_range(’9:’, ’14:’)))

a = MyModel(env, alnfile='CBM-mult.ali',
              knowns=('2z73A','3uonA'),
          sequence='CBM',
              assess_methods=(assess.DOPE, assess.GA341))

a.starting_model= 1
a.ending_model = 1

a.make()


But it always failed with messages:

  File "model_mult.py", line 36
SyntaxError: Non-ASCII character '\xe2' in file model_mult.py on line 36, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
02-modeller/work> python test.py
  File "test.py", line 7
SyntaxError: Non-ASCII character '\xe2' in file test.py on line 7, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details


Does anybody have any idea where is the problem?

THX
ALbert