Missing Residue Modeling Indentation Error and A Not Defined Error Inquiry
Hello I am modeling missing residues and without moving the nonmissing residues and am receiving the below errors within my iTerm after copying and pasting in the bottom text. Please let me know how I can repair this script in my text file before pasting it in the iTerm to run? Thanks:)
joelsubach@Joels-MacBook-Air 7dwbOPM_Monomer_LP % /usr/bin/python3 Python 3.8.9 (default, Apr 13 2022, 08:48:06) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from modeller import * >>> from modeller.automodel import * # Load the AutoModel class >>> >>> log.verbose() >>> env = Environ()
MODELLER 10.3, 2022/07/08, r12388
PROTEIN STRUCTURE MODELLING BY SATISFACTION OF SPATIAL RESTRAINTS
Copyright(c) 1989-2022 Andrej Sali All Rights Reserved
Written by A. Sali with help from B. Webb, M.S. Madhusudhan, M-Y. Shen, G.Q. Dong, M.A. Marti-Renom, N. Eswar, F. Alber, M. Topf, B. Oliva, A. Fiser, R. Sanchez, B. Yerkovich, A. Badretdinov, F. Melo, J.P. Overington, E. Feyfant University of California, San Francisco, USA Rockefeller University, New York, USA Harvard University, Cambridge, USA Imperial Cancer Research Fund, London, UK Birkbeck College, University of London, London, UK
Kind, OS, HostName, Kernel, Processor: 4, Darwin Joels-MacBook-Air.local 21.6.0 arm64 Date and time of compilation : 2022/07/08 12:37:28 MODELLER executable type : mac11arm64-gnu Job starting time (YY/MM/DD HH:MM:SS): 2022/09/02 16:50:46
openf___224_> Open $(LIB)/restyp.lib openf___224_> Open ${MODINSTALL10v3}/modlib/resgrp.lib rdresgr_266_> Number of residue groups: 2 openf___224_> Open ${MODINSTALL10v3}/modlib/sstruc.lib
Dynamically allocated memory at amaxlibraries [B,KiB,MiB]: 191566 187.076 0.183
Dynamically allocated memory at amaxlibraries [B,KiB,MiB]: 192094 187.592 0.183 openf___224_> Open ${MODINSTALL10v3}/modlib/resdih.lib
Dynamically allocated memory at amaxlibraries [B,KiB,MiB]: 240694 235.053 0.230 rdrdih__263_> Number of dihedral angle types : 9 Maximal number of dihedral angle optima: 3 Dihedral angle names : Alph Phi Psi Omeg chi1 chi2 chi3 chi4 chi5 openf___224_> Open ${MODINSTALL10v3}/modlib/radii.lib
Dynamically allocated memory at amaxlibraries [B,KiB,MiB]: 253994 248.041 0.242 openf___224_> Open ${MODINSTALL10v3}/modlib/af_mnchdef.lib rdwilmo_274_> Mainchain residue conformation classes: APBLE openf___224_> Open ${MODINSTALL10v3}/modlib/mnch.lib rdclass_257_> Number of classes: 5 openf___224_> Open ${MODINSTALL10v3}/modlib/mnch1.lib openf___224_> Open ${MODINSTALL10v3}/modlib/mnch2.lib openf___224_> Open ${MODINSTALL10v3}/modlib/mnch3.lib openf___224_> Open ${MODINSTALL10v3}/modlib/xs4.mat rdrrwgh_268_> Number of residue types: 21 >>> >>> # directories for input atom files >>> env.io.atom_files_directory = ['.', '../atom_files'] >>> >>> class MyModel(AutoModel): ... def select_atoms(self): ... return Selection(self.residue_range('88:A', '99:A') ... ... a = MyModel(env, alnfile = 'alignment.ali', File "<stdin>", line 5 a = MyModel(env, alnfile = 'alignment.ali', ^ SyntaxError: invalid syntax >>> knowns = '7dwbOPM_chainA', sequence = '7dwbOPM_chainA_fill') File "<stdin>", line 1 knowns = '7dwbOPM_chainA', sequence = '7dwbOPM_chainA_fill') ^ IndentationError: unexpected indent >>> a.starting_model = 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'a' is not defined >>> a.ending_model = 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'a' is not defined >>> >>> a.make()
TEXT FILE BELOW:
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 select_atoms(self): return Selection(self.residue_range('88:A', '99:A')
a = MyModel(env, alnfile = 'alignment.ali', knowns = '7dwbOPM_chainA', sequence = '7dwbOPM_chainA_fill') a.starting_model = 1 a.ending_model = 1
a.make()
On 9/2/22 7:57 AM, Joel Subach via modeller_usage wrote: > Hello I am modeling missing residues and without moving the nonmissing > residues and am receiving the below errors within my iTerm after copying > and pasting in the bottom text.
Just as it says, you have introduced at least one syntax error in your script, which you'll need to fix. This is not a Modeller bug.
> return Selection(self.residue_range('88:A', '99:A')
For a start, here you are missing a closing parenthesis.
Ben Webb, Modeller Caretaker
Hi Ben thank you for your kind update and yes just adding this single ) allowed it to generate my model, thanks again and I'll be more careful next time and inspect before posting to manage your time:).
On Wed, Sep 7, 2022 at 4:06 AM Modeller Caretaker modeller-care@salilab.org wrote:
> On 9/2/22 7:57 AM, Joel Subach via modeller_usage wrote: > > Hello I am modeling missing residues and without moving the nonmissing > > residues and am receiving the below errors within my iTerm after copying > > and pasting in the bottom text. > > Just as it says, you have introduced at least one syntax error in your > script, which you'll need to fix. This is not a Modeller bug. > > > return Selection(self.residue_range('88:A', '99:A') > > For a start, here you are missing a closing parenthesis. > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org https://salilab.org/modeller/ > Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage >
participants (2)
-
Joel Subach
-
Modeller Caretaker