* [gentoo-commits] proj/sci:master commit in: sci-chemistry/modeller/files/, sci-chemistry/modeller/
@ 2020-10-08 10:54 Alexey Shvetsov
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2020-10-08 10:54 UTC (permalink / raw
To: gentoo-commits
commit: 87d9cf08f438478856d352c15b7096998928c4de
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 8 10:54:03 2020 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Oct 8 10:54:03 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=87d9cf08
sci-chemistry/modeller: Version bump
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
sci-chemistry/modeller/files/9v5-setup.patch | 12 -
.../modeller/files/modeller-9.25-convert2to3.patch | 702 +++++++++++++++++++++
sci-chemistry/modeller/modeller-9.19.ebuild | 145 -----
...odeller-9.12-r3.ebuild => modeller-9.25.ebuild} | 16 +-
4 files changed, 712 insertions(+), 163 deletions(-)
diff --git a/sci-chemistry/modeller/files/9v5-setup.patch b/sci-chemistry/modeller/files/9v5-setup.patch
deleted file mode 100644
index 5fe460580..000000000
--- a/sci-chemistry/modeller/files/9v5-setup.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nu -Nu -uarN modeller-9v3.orig/src/swig/setup.py modeller-9v3/src/swig/setup.py
---- modeller-9v4.orig/src/swig/setup.py 2008-04-15 12:57:50.000000000 +0200
-+++ modeller-9v4/src/swig/setup.py 2008-04-15 12:57:59.000000000 +0200
-@@ -19,7 +19,7 @@
- include_dirs=['../include', '../include/%s' % exetype] + \
- glib['include_dirs'],
- libraries=['modeller'] + glib['libraries'],
-- library_dirs=['../../lib/%s' % exetype] + glib['library_dirs'])
-+ library_dirs=['../../lib/%s' % exetype])
-
- setup(name='Modeller',
- description='Protein structure modeling by satisfaction of ' \
diff --git a/sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch b/sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch
new file mode 100644
index 000000000..d7df05ce6
--- /dev/null
+++ b/sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch
@@ -0,0 +1,702 @@
+--- modeller-9.25/modlib/modeller/__init__.py (original)
++++ modeller-9.25/modlib/modeller/__init__.py (refactored)
+@@ -48,7 +48,7 @@
+ return sys.maxsize > 2**32
+ # This works on older Pythons, but not in Python 3
+ else:
+- return type(sys.dllhandle) == long
++ return type(sys.dllhandle) == int
+
+ # Special processing on Windows to find _modeller.pyd and Modeller DLLs:
+ if hasattr(config, 'install_dir') and hasattr(sys, 'dllhandle'):
+--- modeller-9.25/modlib/modeller/coordinates.py (original)
++++ modeller-9.25/modlib/modeller/coordinates.py (refactored)
+@@ -147,7 +147,7 @@
+ (startres, endres) = self._get_resind()
+ (startatm, endatm) = get_residue_atom_indices(self.seq, startres,
+ endres)
+- return (range(startatm+1, endatm+1), self.seq)
++ return (list(range(startatm+1, endatm+1)), self.seq)
+
+ atoms = property(__get_atoms, doc="List of all atoms in this chain")
+
+@@ -158,7 +158,7 @@
+ def get_atom_indices(self):
+ (startind, endind) = get_residue_atom_indices(self.mdl, self._num,
+ self._num + 1)
+- return range(startind + 1, endind + 1), self.mdl
++ return list(range(startind + 1, endind + 1)), self.mdl
+
+ def __repr__(self):
+ # Get residue number before we do anything else. For alignment
+@@ -252,7 +252,7 @@
+ def get_atom_indices(self):
+ (startind, endind) = get_residue_atom_indices(self.mdl, self.offset,
+ self.offset + len(self))
+- return range(startind + 1, endind + 1), self.mdl
++ return list(range(startind + 1, endind + 1)), self.mdl
+
+ def __getitem__(self, indx):
+ ret = modutil.handle_seq_indx(self, indx, self.mdl._indxres,
+@@ -398,7 +398,7 @@
+ return self.mdl.natm
+
+ def get_atom_indices(self):
+- return range(self.offset + 1, self.offset + len(self) + 1), self.mdl
++ return list(range(self.offset + 1, self.offset + len(self) + 1)), self.mdl
+
+ def __getitem__(self, indx):
+ ret = modutil.handle_seq_indx(self, indx, self.mdl._indxatm,
+--- modeller-9.25/modlib/modeller/id_table.py (original)
++++ modeller-9.25/modlib/modeller/id_table.py (refactored)
+@@ -40,7 +40,7 @@
+ def write_seqid_matrix(fh, coder, mat):
+ """Write a sequence identity matrix to a file"""
+ nseq = len(mat)
+- print(" " * 9 + "".join([ s[:8] for s in coder ]))
++ print((" " * 9 + "".join([ s[:8] for s in coder ])))
+ for n1 in range(nseq):
+ fh.write(coder[n1][:8] + " " + \
+ "".join(["%8d" % (mat[n1][n2]+0.5) for n2 in range(nseq)]))
+--- modeller-9.25/modlib/modeller/libraries.py (original)
++++ modeller-9.25/modlib/modeller/libraries.py (refactored)
+@@ -32,7 +32,7 @@
+ return BytesIO(*args)
+ else:
+ def _make_bytes_io(self, *args):
+- from cStringIO import StringIO
++ from io import StringIO
+ return StringIO(*args)
+
+ def __getstate__(self):
+--- modeller-9.25/modlib/modeller/model.py (original)
++++ modeller-9.25/modlib/modeller/model.py (refactored)
+@@ -121,7 +121,7 @@
+
+ def get_atom_indices(self):
+ """Get the indices of all atoms in this model"""
+- return (range(1, self.natm+1), self)
++ return (list(range(1, self.natm+1)), self)
+
+ def read(self, file, model_format='PDB',
+ model_segment=('FIRST:@', 'LAST:'), io=None,
+@@ -340,7 +340,7 @@
+ dope_score = sel.assess_dope()
+ scorer = normalized_dope.DOPEScorer(self)
+ z_score = scorer.get_z_score(dope_score)
+- print(">> Normalized DOPE z score: %.3f" % z_score)
++ print((">> Normalized DOPE z score: %.3f" % z_score))
+ return z_score
+
+ def assess_normalized_dopehr(self):
+@@ -351,7 +351,7 @@
+ dope_score = sel.assess_dopehr()
+ scorer = normalized_dope.DOPEHRScorer(self)
+ z_score = scorer.get_z_score(dope_score)
+- print(">> Normalized DOPE-HR z score: %.3f" % z_score)
++ print((">> Normalized DOPE-HR z score: %.3f" % z_score))
+ return z_score
+
+ def get_normalized_dope_profile(self):
+--- modeller-9.25/modlib/modeller/model_topology.py (original)
++++ modeller-9.25/modlib/modeller/model_topology.py (refactored)
+@@ -50,7 +50,7 @@
+ self.check_args = args
+ def __iter__(self):
+ return self
+- def next(self):
++ def __next__(self):
+ while True:
+ atoms = self.__int_next()
+ if self.check_func is None \
+@@ -82,7 +82,7 @@
+ self.check_args = args
+ def __iter__(self):
+ return self
+- def next(self):
++ def __next__(self):
+ while True:
+ atoms = self.__int_next()
+ if self.check_func is None \
+--- modeller-9.25/modlib/modeller/physical.py (original)
++++ modeller-9.25/modlib/modeller/physical.py (refactored)
+@@ -31,7 +31,7 @@
+ def __init__(self, default=1.0, **keys):
+ self._default = default
+ self._dict = {}
+- for (term,val) in keys.items():
++ for (term,val) in list(keys.items()):
+ term = eval("%s" % term)
+ self[term] = val
+
+--- modeller-9.25/modlib/modeller/salign.py (original)
++++ modeller-9.25/modlib/modeller/salign.py (refactored)
+@@ -38,8 +38,8 @@
+ return aln.salign(auto_overhang=True, overhang_auto_limit=5,
+ overhang_factor=1, **keys)
+ except modeller.ModellerError:
+- print("SALIGN with auto_overhang failed: %s" \
+- % str(sys.exc_info()[1]))
++ print(("SALIGN with auto_overhang failed: %s" \
++ % str(sys.exc_info()[1])))
+ print("Retrying without auto_overhang")
+ return aln.salign(**keys)
+
+@@ -118,13 +118,13 @@
+ self.qscore = res.qscorepct
+ self.aln.write(file=output_aln_file, alignment_format='PIR')
+ better = True
+- print("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
+- res.qscorepct))
++ print(("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
++ res.qscorepct)))
+ except modeller.ModellerError:
+- print("Set of parameters %s %g %g resulted in the "
++ print(("Set of parameters %s %g %g resulted in the "
+ "following error\t%s" % (str(weights), open_penalty,
+ extend_penalty,
+- str(sys.exc_info()[1])))
++ str(sys.exc_info()[1]))))
+ return better
+
+
+@@ -181,7 +181,7 @@
+ best.try_struc_align(opfile, opfile2, fw2, ogp3d, egp3d,
+ align_block)
+
+- print("final max quality = %g" % best.qscore)
++ print(("final max quality = %g" % best.qscore))
+
+ if best.found_struc_align:
+ aln.clear()
+--- modeller-9.25/modlib/modeller/saxsdata.py (original)
++++ modeller-9.25/modlib/modeller/saxsdata.py (refactored)
+@@ -206,7 +206,7 @@
+ try:
+ fh = open(saxsfilename,'r')
+ except:
+- print("file "+saxsfilename+" not found :(")
++ print(("file "+saxsfilename+" not found :("))
+ return
+ fh.close()
+ ns = 0
+@@ -225,8 +225,8 @@
+ s_low = s_min - .001
+ if (not s_hi):
+ s_hi = s_max + .001
+- print("s_min=%s, s_max=%s" % (str(s_min), str(s_max)))
+- print("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi)))
++ print(("s_min=%s, s_max=%s" % (str(s_min), str(s_max))))
++ print(("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi))))
+ self.ini_saxs(atmsel,
+ filename=formfacfilename,
+ s_min=s_min, s_max=s_max, maxs=ns, nmesh=ns, natomtyp=natomtyp,
+--- modeller-9.25/modlib/modeller/selection.py (original)
++++ modeller-9.25/modlib/modeller/selection.py (refactored)
+@@ -23,7 +23,7 @@
+ return self.mdl.atoms[obj - 1]
+ else:
+ def next(self):
+- obj = self.seliter.next()
++ obj = next(self.seliter)
+ return self.mdl.atoms[obj - 1]
+
+ class selection(object):
+@@ -52,7 +52,7 @@
+ :rtype: list of ints
+ """
+ if sys.version_info[:2] == (2,3):
+- keys = self.__selection.keys()
++ keys = list(self.__selection.keys())
+ keys.sort()
+ else:
+ keys = sorted(self.__selection.keys())
+@@ -722,9 +722,9 @@
+ def assess(self, assessor, output='SHORT NO_REPORT', **vars):
+ """Assess with the given assessor object
+ (e.g. :class:`soap_loop.Scorer`)."""
+- print(">> Model assessment by %s" % assessor.name)
++ print((">> Model assessment by %s" % assessor.name))
+ molpdf, terms = assessor._assess(self, output=output, **vars)
+- print("%s : %12.6f" % (assessor.name, molpdf))
++ print(("%s : %12.6f" % (assessor.name, molpdf)))
+ return molpdf
+
+ def _dope_energy(self, gprsr, name, output='SHORT NO_REPORT',
+@@ -733,7 +733,7 @@
+ nonbond_spline=1.), **vars):
+ """Internal function to do DOPE or DOPE-HR assessment"""
+ mdl = self.__mdl
+- print(">> Model assessment by %s potential" % name)
++ print((">> Model assessment by %s potential" % name))
+ edat = self.get_dope_energy_data()
+ old_gprsr = mdl.group_restraints
+ mdl.group_restraints = gprsr
+@@ -744,7 +744,7 @@
+ **vars)
+ finally:
+ mdl.group_restraints = old_gprsr
+- print("%s score : %12.6f" % (name, molpdf))
++ print(("%s score : %12.6f" % (name, molpdf)))
+ return molpdf
+
+ def debug_function(self, residue_span_range=(0, 99999),
+--- modeller-9.25/modlib/modeller/test.py (original)
++++ modeller-9.25/modlib/modeller/test.py (refactored)
+@@ -2,7 +2,7 @@
+ import modeller
+ import math
+ try:
+- from cStringIO import StringIO
++ from io import StringIO
+ except ImportError:
+ from io import StringIO
+ import sys
+@@ -150,7 +150,7 @@
+ diff = abs(num1 - num2)
+ if msg is None:
+ msg = "%f != %f within %g" % (num1, num2, tolerance)
+- self.assert_(diff < tolerance, msg)
++ self.assertTrue(diff < tolerance, msg)
+
+ def run_capture_stdout(self, method, *args, **keys):
+ """Run a method and capture its standard output. Returns both the
+--- modeller-9.25/modlib/modeller/automodel/automodel.py (original)
++++ modeller-9.25/modlib/modeller/automodel/automodel.py (refactored)
+@@ -203,13 +203,13 @@
+
+ def write_ok_summary(self, all, modeltyp):
+ """Print out a summary of all successfully generated models"""
+- print("\n>> Summary of successfully produced %s:" % modeltyp)
+- fields = [x for x in all[0].keys() if x.endswith(' score')]
++ print(("\n>> Summary of successfully produced %s:" % modeltyp))
++ fields = [x for x in list(all[0].keys()) if x.endswith(' score')]
+ fields.sort()
+ fields = ['molpdf'] + fields
+ header = '%-25s ' % 'Filename' + " ".join(['%14s' % x for x in fields])
+ print(header)
+- print('-' * len(header))
++ print(('-' * len(header)))
+ for mdl in all:
+ text = '%-25s' % mdl['name']
+ for field in fields:
+@@ -222,9 +222,9 @@
+
+ def write_failure_summary(self, all, modeltyp):
+ """Print out a summary of all failed models"""
+- print("\n>> Summary of failed %s:" % modeltyp)
++ print(("\n>> Summary of failed %s:" % modeltyp))
+ for mdl in all:
+- print("%-25s %s" % (mdl['name'], mdl['failure']))
++ print(("%-25s %s" % (mdl['name'], mdl['failure'])))
+ print('')
+
+ def rd_restraints(self):
+@@ -692,8 +692,8 @@
+ elif atmsel.get_model() is not self:
+ raise ModellerError("selection is defined on the wrong model")
+ elif len(atmsel) < len(self.atoms):
+- print("%d (of %d total) atoms selected for optimization" \
+- % (len(atmsel), len(self.atoms)))
++ print(("%d (of %d total) atoms selected for optimization" \
++ % (len(atmsel), len(self.atoms))))
+ return atmsel
+
+ def mkhomcsr(self, atmsel, aln):
+@@ -774,9 +774,9 @@
+ selstd = selection(self).only_std_residues()
+ selca = selstd.only_atom_types('CA')
+
+- print("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
++ print(("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
+ + "to protein atoms within %.2f angstroms\n" % bond_distance \
+- + "and protein CA atoms within %.2f angstroms" % ca_distance)
++ + "and protein CA atoms within %.2f angstroms" % ca_distance))
+ # Build the bonds first; this avoids duplicated CA-ligand bonds since
+ # make_distance() will not build restraints that are already on the
+ # nonbond exclusion list
+@@ -823,8 +823,8 @@
+ selhet = selhet.only_no_topology()
+
+ # Intra-residue:
+- print("%d atoms in residues without defined topology\n" % len(selhet) \
+- + "constrained to be rigid bodies")
++ print(("%d atoms in residues without defined topology\n" % len(selhet) \
++ + "constrained to be rigid bodies"))
+ rsr = self.restraints
+ rsr.make_distance(selhet, selhet, aln=aln,
+ distance_rsr_model=7, maximal_distance=10.0,
+@@ -898,8 +898,8 @@
+ print("\nThe following CHARMM atom type assignments were made:")
+ print(" Atom Old type New type")
+ for atom, old_type, new_type in zip(sel, old_types, new_types):
+- print(" %-20s %-15s %-15s"
+- % (str(atom), fmt_typ(old_type), fmt_typ(new_type)))
++ print((" %-20s %-15s %-15s"
++ % (str(atom), fmt_typ(old_type), fmt_typ(new_type))))
+
+ def select_atoms(self):
+ """Select atoms to be optimized in the model building procedure. By
+--- modeller-9.25/modlib/modeller/automodel/generate.py (original)
++++ modeller-9.25/modlib/modeller/automodel/generate.py (refactored)
+@@ -88,11 +88,11 @@
+ to_rebuild.append(r)
+ _unbuild_ring(r, ring_atoms + extra_atoms)
+ if len(to_rebuild) > 0:
+- print("The following %d residues contain 6-membered rings with "
++ print(("The following %d residues contain 6-membered rings with "
+ "poor geometries\nafter transfer from templates. Rebuilding "
+ "rings from internal coordinates:\n %s" \
+ % (len(to_rebuild),
+- "\n ".join([str(r) for r in to_rebuild])))
++ "\n ".join([str(r) for r in to_rebuild]))))
+ mdl.build(initialize_xyz=False, build_method='INTERNAL_COORDINATES')
+
+ def read_xyz(mdl, aln):
+--- modeller-9.25/modlib/modeller/automodel/loopmodel.py (original)
++++ modeller-9.25/modlib/modeller/automodel/loopmodel.py (refactored)
+@@ -105,7 +105,7 @@
+ lendef = len(self._defined_indices)
+ if lenall > lendef:
+ s = selection(self) - s
+- print("""
++ print(("""
+ The following %d atoms were not found in the input model's non-loop region,
+ and were added automatically by Modeller in order to determine correct
+ interactions between the loop and the rest of the protein:
+@@ -115,7 +115,7 @@
+ rest of the protein may exist (note, however, that the score of the loop does
+ not include protein-protein internal interactions, so will not be adversely
+ affected by any clashes).""" \
+-% (lenall - lendef, ", ".join([repr(a) for a in s])))
++% (lenall - lendef, ", ".join([repr(a) for a in s]))))
+
+ if self.loop.write_defined_only:
+ print("""
+@@ -406,7 +406,7 @@
+ elif len(atmsel.only_no_topology()) > 0:
+ raise ModellerError("some selected residues have no topology")
+ else:
+- print("%d atoms selected for loop refinement" % len(atmsel))
++ print(("%d atoms selected for loop refinement" % len(atmsel)))
+ return atmsel
+
+ def optimize_loop(self, atmsel, sched, actions):
+--- modeller-9.25/modlib/modeller/mmcif/writer.py (original)
++++ modeller-9.25/modlib/modeller/mmcif/writer.py (refactored)
+@@ -4,7 +4,7 @@
+ # which works as far back as 2.3, so imports need to be protected by a
+ # version check
+
+-from __future__ import print_function
++
+ import sys
+ import textwrap
+
+@@ -12,7 +12,7 @@
+ if sys.version_info[0] >= 3:
+ _long_type = int
+ else:
+- _long_type = long
++ _long_type = int
+
+ class _LineWriter(object):
+ def __init__(self, writer, line_len=80):
+--- modeller-9.25/modlib/modeller/optimizers/builtin_optimizer.py (original)
++++ modeller-9.25/modlib/modeller/optimizers/builtin_optimizer.py (refactored)
+@@ -9,7 +9,7 @@
+ # delete the key entirely, as __getstate__ must return a non-empty
+ # dict in order for our __setstate__ method to be called).
+ d = self.__dict__.copy()
+- for key in self.__dict__.keys():
++ for key in list(self.__dict__.keys()):
+ if key.endswith("_modpt") or key.endswith("__optpt"):
+ d[key] = None
+ return d
+@@ -21,7 +21,7 @@
+ vars = params.copy()
+ self._update_params(vars, ok_keys, extravars)
+ for key in ok_keys:
+- if key not in vars.keys() \
++ if key not in list(vars.keys()) \
+ and key not in ("edat", "libs", "actions", "schedule_scale"):
+ raise ValueError("a value must be given for %s" % key)
+
+--- modeller-9.25/modlib/modeller/optimizers/optimizer.py (original)
++++ modeller-9.25/modlib/modeller/optimizers/optimizer.py (refactored)
+@@ -10,7 +10,7 @@
+ return self.atmsel
+
+ def _update_params(self, params, ok_keys, vars):
+- for key in vars.keys():
++ for key in list(vars.keys()):
+ if key in ok_keys:
+ params[key] = vars[key]
+ else:
+--- modeller-9.25/modlib/modeller/parallel/data_types.py (original)
++++ modeller-9.25/modlib/modeller/parallel/data_types.py (refactored)
+@@ -3,7 +3,7 @@
+ import sys
+
+ try:
+- import cPickle as pickle
++ import pickle as pickle
+ except ImportError:
+ import pickle
+
+--- modeller-9.25/modlib/modeller/parallel/job.py (original)
++++ modeller-9.25/modlib/modeller/parallel/job.py (refactored)
+@@ -106,7 +106,7 @@
+ if id and id in pending_slaves:
+ slave = pending_slaves.pop(id)
+ connected_slaves[id] = slave
+- print("Identified slave %s " % str(slave))
++ print(("Identified slave %s " % str(slave)))
+ slave.accept_connection(sock)
+ slave.set_directory(self.cwd)
+ if sys.path[0] != '':
+@@ -117,7 +117,7 @@
+ return slave
+ elif id and id in connected_slaves:
+ slave = connected_slaves[id]
+- print("Reconnect from slave %s " % str(slave))
++ print(("Reconnect from slave %s " % str(slave)))
+ slave.accept_connection(sock)
+ else:
+ print("Ignoring request from unknown slave")
+@@ -159,7 +159,7 @@
+ """Run all tasks and return all the results, in the same order that they
+ were submitted, when all the jobs have completed."""
+ tasks = self.tasks[:]
+- print("Running %d tasks on %d slaves" % (len(tasks), len(self)))
++ print(("Running %d tasks on %d slaves" % (len(tasks), len(self))))
+ self.push_tasks_to_slaves()
+ while True:
+ try:
+@@ -174,7 +174,7 @@
+ def yield_tasks_unordered(self):
+ """Run all tasks and return their results (as a generator), in
+ whatever order they complete."""
+- print("Running %d tasks on %d slaves" % (len(self.tasks), len(self)))
++ print(("Running %d tasks on %d slaves" % (len(self.tasks), len(self))))
+ self.push_tasks_to_slaves()
+ while True:
+ try:
+@@ -215,7 +215,7 @@
+ task = obj.task_results()
+ if task:
+ # The slave completed its task
+- print("%s on %s completed" % (str(task), str(obj)))
++ print(("%s on %s completed" % (str(task), str(obj))))
+ if len(self.tasks) > 0:
+ obj.run_task(self.tasks.pop(0))
+ return task
+@@ -225,14 +225,14 @@
+ except (NetworkError, TaskSetupError):
+ self.kill_slaves((obj,), sys.exc_info()[1])
+ else:
+- print("Warning: slave %s reports data, but is not running a task" \
+- % str(obj))
++ print(("Warning: slave %s reports data, but is not running a task" \
++ % str(obj)))
+
+ def kill_slaves(self, slaves, err=""):
+ if err != "":
+ err = "(%s) " % err
+ for s in slaves:
+- print("%s failed %s- removing from %s" % (s, err, self))
++ print(("%s failed %s- removing from %s" % (s, err, self)))
+ task = s.kill()
+ if task:
+ self.tasks.append(task)
+@@ -248,8 +248,8 @@
+ timedout = [a for a in self if a.running_task() and \
+ a.contact_timeout(self.heartbeat_timeout)]
+ if len(timedout) > 0:
+- print("Did not hear from slaves %s in %d seconds" % \
+- (str(timedout), self.heartbeat_timeout))
++ print(("Did not hear from slaves %s in %d seconds" % \
++ (str(timedout), self.heartbeat_timeout)))
+ self.kill_slaves(timedout)
+
+ def push_tasks_to_slaves(self):
+@@ -264,8 +264,8 @@
+ slave.run_task(t)
+ # If a network error occurred, kill the slave and requeue the task
+ except socket.error:
+- print("slave %s failed on run task with %s; removing from job" \
+- % (slave, sys.exc_info()[1]))
++ print(("slave %s failed on run task with %s; removing from job" \
++ % (slave, sys.exc_info()[1])))
+ slave.kill()
+ self.tasks.insert(0, t)
+ self.expand_for_tasks()
+--- modeller-9.25/modlib/modeller/parallel/myspawn.py (original)
++++ modeller-9.25/modlib/modeller/parallel/myspawn.py (refactored)
+@@ -10,7 +10,7 @@
+ ``output``."""
+
+ fp = open(output, "w")
+- print("%s >& %s" % (cmd, output))
++ print(("%s >& %s" % (cmd, output)))
+ if sys.platform == 'win32':
+ _myspawn_win32(cmd, fp)
+ else:
+@@ -27,4 +27,4 @@
+ # Ignore Windows "file not found" errors, so that behavior is consistent
+ # between Unix and Windows
+ except WindowsError:
+- print("WindowsError: %s (ignored)" % sys.exc_info()[1])
++ print(("WindowsError: %s (ignored)" % sys.exc_info()[1]))
+--- modeller-9.25/modlib/modeller/parallel/sge_qsub_array.py (original)
++++ modeller-9.25/modlib/modeller/parallel/sge_qsub_array.py (refactored)
+@@ -36,7 +36,7 @@
+ outlines = output.readlines()
+ output.close()
+ for line in outlines:
+- print(line.rstrip('\r\n'))
++ print((line.rstrip('\r\n')))
+ a.require_clean_exit()
+ self._set_jobid(outlines)
+
+--- modeller-9.25/modlib/modeller/parallel/sge_qsub_slave.py (original)
++++ modeller-9.25/modlib/modeller/parallel/sge_qsub_slave.py (refactored)
+@@ -38,7 +38,7 @@
+ qsub = "qsub -S /bin/sh -o '%s' -N '%s' %s %s" % \
+ (output, name, self.standard_options, self._options)
+ cmd = "%s -slave %s" % (path, id)
+- print("%s | %s" % (cmd, qsub))
++ print(("%s | %s" % (cmd, qsub)))
+ a = MyPopen4(qsub)
+ (input, output) = (a.stdin, a.stdout)
+ input.write(cmd + '\n')
+@@ -46,7 +46,7 @@
+ outlines = output.readlines()
+ output.close()
+ for line in outlines:
+- print(line.rstrip('\r\n'))
++ print((line.rstrip('\r\n')))
+ a.require_clean_exit()
+ self._set_jobid(outlines)
+
+--- modeller-9.25/modlib/modeller/parallel/slaveloop.py (original)
++++ modeller-9.25/modlib/modeller/parallel/slaveloop.py (refactored)
+@@ -51,14 +51,14 @@
+ master.send_data(communicator.ErrorWrapper(detail))
+ except socket.error:
+ detail2 = sys.exc_info()[1]
+- print("Warning: ignored exception " + str(detail2) \
++ print(("Warning: ignored exception " + str(detail2) \
+ + " when trying to send error state " \
+- + str(detail) + " back to master")
++ + str(detail) + " back to master"))
+ raise detail
+ raise
+
+ def run(self):
+- print("Slave startup: connect to master at %s" % self.addr)
++ print(("Slave startup: connect to master at %s" % self.addr))
+ (host, port, identifier) = self.addr.split(":", 2)
+ port = int(port)
+ lock = threading.Lock()
+--- modeller-9.25/modlib/modeller/top_interpreter/__init__.py (original)
++++ modeller-9.25/modlib/modeller/top_interpreter/__init__.py (refactored)
+@@ -65,7 +65,7 @@
+ if len(line) > 0:
+ try:
+ self._parse_top_ini_line(line.split(None, 4), vars)
+- except TypeError, detail:
++ except TypeError as detail:
+ mod_log_write("read_top__E> " + str(detail))
+ mod_log_write(" top.ini line: " + line)
+ raise
+@@ -113,7 +113,7 @@
+ self._set_top_vars(vars)
+ try:
+ fh = self._open_include_file(self.variables['include_file'])
+- except IOError, detail:
++ except IOError as detail:
+ mod_log_write("runlines__E> " + str(detail))
+ mod_log_write(" TOP Command line: " + line)
+ raise
+@@ -160,7 +160,7 @@
+ indxca = self._run_top_cmd(cmd, indxca, lines, callstack,
+ subrout)
+ _modeller.mod_top_post()
+- except (IndexError, SyntaxError, TypeError), detail:
++ except (IndexError, SyntaxError, TypeError) as detail:
+ mod_log_write("runlines__E> " + str(detail))
+ mod_log_write(" TOP Command line: " + line)
+ raise
+--- modeller-9.25/modlib/modeller/top_interpreter/topcmds.py (original)
++++ modeller-9.25/modlib/modeller/top_interpreter/topcmds.py (refactored)
+@@ -19,7 +19,7 @@
+ if not isinstance(vars, (list, tuple)):
+ vars = (vars,)
+ for var in vars:
+- if keys.has_key(var):
++ if var in keys:
+ args.append(keys[var])
+ else:
+ args.append(self.vars[var])
+--- modeller-9.25/modlib/modeller/top_interpreter/util.py (original)
++++ modeller-9.25/modlib/modeller/top_interpreter/util.py (refactored)
+@@ -1,7 +1,7 @@
+ import _modeller
+
+ def set_topvars(topvardict, vars, topini):
+- for name in topvardict.keys():
++ for name in list(topvardict.keys()):
+ value = topvardict[name]
+ if value is None:
+ continue
+--- modeller-9.25/modlib/modeller/top_interpreter/variables.py (original)
++++ modeller-9.25/modlib/modeller/top_interpreter/variables.py (refactored)
+@@ -32,11 +32,11 @@
+ def __init__(self, topcmds):
+ self._topcmds = topcmds
+ self._topvars = {}
+- for var in self._deftops.keys():
++ for var in list(self._deftops.keys()):
+ self._ourvars[var] = self._deftops[var]
+- for var in self._edat_members.keys():
++ for var in list(self._edat_members.keys()):
+ self._ourvars[var] = self._edat_members[var]
+- for var in self._io_members.keys():
++ for var in list(self._io_members.keys()):
+ self._ourvars[var] = self._io_members[var]
+
+ def __setitem__(self, key, value):
+--- modeller-9.25/modlib/modeller/util/modobject.py (original)
++++ modeller-9.25/modlib/modeller/util/modobject.py (refactored)
+@@ -1,8 +1,8 @@
+ class modobject(object):
+ def __setattr__(self, name, val):
+ if name not in dir(self):
+- print("runcmd_____W>: creation of new member '%s' in %s: "
+- "possible typo!" % (name, str(self)))
++ print(("runcmd_____W>: creation of new member '%s' in %s: "
++ "possible typo!" % (name, str(self))))
+ object.__setattr__(self, name, val)
+
+ def __getstate__(self):
+@@ -11,7 +11,7 @@
+ # delete the key entirely, as __getstate__ must return a non-empty
+ # dict in order for our __setstate__ method to be called).
+ d = self.__dict__.copy()
+- for key in self.__dict__.keys():
++ for key in list(self.__dict__.keys()):
+ if key.endswith("_modpt"):
+ d[key] = None
+ return d
+--- modeller-9.25/modlib/modeller/util/modutil.py (original)
++++ modeller-9.25/modlib/modeller/util/modutil.py (refactored)
+@@ -17,7 +17,7 @@
+ else:
+ return indx
+ elif isinstance(indx, slice):
+- return range(*indx.indices(len(seqtype)))
++ return list(range(*indx.indices(len(seqtype))))
+ elif lookup_func is not None:
+ args = lookup_args + (indx,)
+ int_indx = lookup_func(*args)
diff --git a/sci-chemistry/modeller/modeller-9.19.ebuild b/sci-chemistry/modeller/modeller-9.19.ebuild
deleted file mode 100644
index 0d29c3843..000000000
--- a/sci-chemistry/modeller/modeller-9.19.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1 eutils multilib versionator
-
-DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures"
-HOMEPAGE="http://salilab.org/modeller/"
-SRC_URI="http://salilab.org/${PN}/${PV}/${P}.tar.gz"
-
-LICENSE="modeller"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples"
-SLOT="0"
-
-RESTRICT="mirror"
-
-DEPEND=">=dev-lang/swig-1.3"
-RDEPEND=""
-
-INPATH="${EPREFIX}"/opt/modeller${ver}
-
-QA_PREBUILT="/opt/*"
-
-pkg_setup() {
- case ${ARCH} in
- x86)
- EXECTYPE="i386-intel8";;
- amd64)
- EXECTYPE="x86_64-intel8";;
- *)
- die "Your arch "${ARCH}" does not appear supported at this time.";;
- esac
-}
-
-python_prepare_all(){
- sed "s:i386-intel8:${EXECTYPE}:g" -i src/swig/setup.py || die
- distutils-r1_python_prepare_all
-}
-
-python_compile(){
- cd src/swig || die
- swig -python -keyword -nodefaultctor -nodefaultdtor -noproxy modeller.i || die
- distutils-r1_python_compile
-}
-
-python_install() {
- cd src/swig || die
- distutils-r1_python_install
-}
-
-python_install_all(){
- cd "${S}" || die
- sed \
- -e "/^EXECUTABLE_TYPE/s:xxx:${EXECTYPE}:g" \
- -e "/MODINSTALL/s:xxx:\"${INPATH}\":g" \
- -i bin/modscript || die
-
- sed -e "s;@TOPDIR\@;\"${INPATH}\";" \
- -e "s;@EXETYPE\@;${EXECTYPE};" \
- bin/modpy.sh.in > "${T}/modpy.sh"
-
- insinto ${INPATH}
- doins -r modlib
- python_foreach_impl python_domodule modlib/modeller
-
- insinto ${INPATH}/bin
- doins -r bin/{lib,*top}
-
- exeinto ${INPATH}/bin
- doexe bin/{modscript,mod${PV}_${EXECTYPE}} "${T}"/modpy.sh
-
- python_foreach_impl python_doscript bin/modslave.py
- dosym ${INPATH}/bin/modscript /opt/bin/mod${PV}
- dosym ${INPATH}/bin/modpy.sh /opt/bin/modpy.sh
-
- exeinto ${INPATH}/lib/${EXECTYPE}/
- doexe lib/${EXECTYPE}/lib*
- dosym libmodeller.so.8 ${INPATH}/lib/${EXECTYPE}/libmodeller.so
- dosym ../../${INPATH}/lib/${EXECTYPE}/libmodeller.so.8 /usr/$(get_libdir)/libmodeller.so.8
-
- use doc && HTML_DOCS=( doc/. )
- distutils-r1_python_install_all
-
- if use examples; then
- insinto /usr/share/${PN}/
- doins -r examples
- fi
-
- insinto /etc/revdep-rebuild
- cat >> "${T}"/40-${PN} <<- EOF
- SEARCH_DIRS_MASK="${EPREFIX}/opt/modeller/lib/"
- EOF
- doins "${T}"/40-${PN}
-}
-
-pkg_postinst() {
- if [[ ! -e "${INPATH}/modlib/modeller/config.py" ]]; then
- echo install_dir = \"${INPATH}/\"> ${INPATH}/modlib/modeller/config.py
- fi
-
- if grep -q license ${INPATH}/modlib/modeller/config.py; then
- einfo "A license key file is already present in ${IN_PATH}/modlib/modeller/config.py"
- else
- ewarn "Obtain a license Key from"
- ewarn "http://salilab.org/modeller/registration.html"
- ewarn "And run this before using modeller:"
- ewarn "emerge --config =${CATEGORY}/${PF}"
- ewarn "That way you can [re]enter your license key."
- fi
-}
-
-pkg_postrm() {
- ewarn "This package leaves a license Key file in ${INPATH}/modlib/modeller/config.py"
- ewarn "that you need to remove to completely get rid of modeller."
-}
-
-pkg_config() {
- ewarn "Your license key is NOT checked for validity here."
- ewarn " Make sure you type it in correctly."
- eerror "If you CTRL+C out of this, modeller will not run!"
- while true
- do
- einfo "Please enter your license key:"
- read license_key1
- einfo "Please re-enter your license key:"
- read license_key2
- if [[ "$license_key1" == "" ]]
- then
- echo "You entered a blank license key. Try again."
- else
- if [[ "$license_key1" == "$license_key2" ]]
- then
- echo license = '"'$license_key1'"' >> "${INPATH}/modlib/modeller/config.py"
- einfo "Thank you!"
- break
- else
- eerror "Your license key entries do not match. Try again."
- fi
- fi
- done
-}
diff --git a/sci-chemistry/modeller/modeller-9.12-r3.ebuild b/sci-chemistry/modeller/modeller-9.25.ebuild
similarity index 90%
rename from sci-chemistry/modeller/modeller-9.12-r3.ebuild
rename to sci-chemistry/modeller/modeller-9.25.ebuild
index de64378e1..cf3af567e 100644
--- a/sci-chemistry/modeller/modeller-9.12-r3.ebuild
+++ b/sci-chemistry/modeller/modeller-9.25.ebuild
@@ -1,15 +1,15 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
-inherit distutils-r1 eutils multilib versionator
+inherit distutils-r1 eutils multilib
DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures"
-HOMEPAGE="http://salilab.org/modeller/"
-SRC_URI="http://salilab.org/${PN}/${PV}/${P}.tar.gz"
+HOMEPAGE="https://salilab.org/modeller/"
+SRC_URI="https://salilab.org/${PN}/${PV}/${P}.tar.gz"
LICENSE="modeller"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
@@ -25,6 +25,8 @@ INPATH="${EPREFIX}"/opt/modeller${ver}
QA_PREBUILT="/opt/*"
+PATCHES=( "${FILESDIR}/${P}-convert2to3.patch" )
+
pkg_setup() {
case ${ARCH} in
x86)
@@ -38,6 +40,8 @@ pkg_setup() {
python_prepare_all(){
sed "s:i386-intel8:${EXECTYPE}:g" -i src/swig/setup.py || die
+ rm -rf modlib/modeller/python_library || die
+ sed -i '1 i\#!/usr/bin/python' bin/modslave.py
distutils-r1_python_prepare_all
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-chemistry/modeller/files/, sci-chemistry/modeller/
@ 2020-12-31 15:07 Aisha Tammy
0 siblings, 0 replies; 3+ messages in thread
From: Aisha Tammy @ 2020-12-31 15:07 UTC (permalink / raw
To: gentoo-commits
commit: 53f4815ede1a74949c87692ebf4c6b8f94ac3c42
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Thu Dec 31 15:01:03 2020 +0000
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Thu Dec 31 15:01:03 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=53f4815e
sci-chemistry/modeller: break patch into 2
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
.../files/modeller-9.25-convert2to3-p1.patch | 339 +++++++++++++++++++++
...o3.patch => modeller-9.25-convert2to3-p2.patch} | 339 ---------------------
sci-chemistry/modeller/modeller-9.25.ebuild | 7 +-
3 files changed, 344 insertions(+), 341 deletions(-)
diff --git a/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch
new file mode 100644
index 000000000..deab6d68f
--- /dev/null
+++ b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch
@@ -0,0 +1,339 @@
+--- modeller-9.25/modlib/modeller/__init__.py (original)
++++ modeller-9.25/modlib/modeller/__init__.py (refactored)
+@@ -48,7 +48,7 @@
+ return sys.maxsize > 2**32
+ # This works on older Pythons, but not in Python 3
+ else:
+- return type(sys.dllhandle) == long
++ return type(sys.dllhandle) == int
+
+ # Special processing on Windows to find _modeller.pyd and Modeller DLLs:
+ if hasattr(config, 'install_dir') and hasattr(sys, 'dllhandle'):
+--- modeller-9.25/modlib/modeller/coordinates.py (original)
++++ modeller-9.25/modlib/modeller/coordinates.py (refactored)
+@@ -147,7 +147,7 @@
+ (startres, endres) = self._get_resind()
+ (startatm, endatm) = get_residue_atom_indices(self.seq, startres,
+ endres)
+- return (range(startatm+1, endatm+1), self.seq)
++ return (list(range(startatm+1, endatm+1)), self.seq)
+
+ atoms = property(__get_atoms, doc="List of all atoms in this chain")
+
+@@ -158,7 +158,7 @@
+ def get_atom_indices(self):
+ (startind, endind) = get_residue_atom_indices(self.mdl, self._num,
+ self._num + 1)
+- return range(startind + 1, endind + 1), self.mdl
++ return list(range(startind + 1, endind + 1)), self.mdl
+
+ def __repr__(self):
+ # Get residue number before we do anything else. For alignment
+@@ -252,7 +252,7 @@
+ def get_atom_indices(self):
+ (startind, endind) = get_residue_atom_indices(self.mdl, self.offset,
+ self.offset + len(self))
+- return range(startind + 1, endind + 1), self.mdl
++ return list(range(startind + 1, endind + 1)), self.mdl
+
+ def __getitem__(self, indx):
+ ret = modutil.handle_seq_indx(self, indx, self.mdl._indxres,
+@@ -398,7 +398,7 @@
+ return self.mdl.natm
+
+ def get_atom_indices(self):
+- return range(self.offset + 1, self.offset + len(self) + 1), self.mdl
++ return list(range(self.offset + 1, self.offset + len(self) + 1)), self.mdl
+
+ def __getitem__(self, indx):
+ ret = modutil.handle_seq_indx(self, indx, self.mdl._indxatm,
+--- modeller-9.25/modlib/modeller/id_table.py (original)
++++ modeller-9.25/modlib/modeller/id_table.py (refactored)
+@@ -40,7 +40,7 @@
+ def write_seqid_matrix(fh, coder, mat):
+ """Write a sequence identity matrix to a file"""
+ nseq = len(mat)
+- print(" " * 9 + "".join([ s[:8] for s in coder ]))
++ print((" " * 9 + "".join([ s[:8] for s in coder ])))
+ for n1 in range(nseq):
+ fh.write(coder[n1][:8] + " " + \
+ "".join(["%8d" % (mat[n1][n2]+0.5) for n2 in range(nseq)]))
+--- modeller-9.25/modlib/modeller/libraries.py (original)
++++ modeller-9.25/modlib/modeller/libraries.py (refactored)
+@@ -32,7 +32,7 @@
+ return BytesIO(*args)
+ else:
+ def _make_bytes_io(self, *args):
+- from cStringIO import StringIO
++ from io import StringIO
+ return StringIO(*args)
+
+ def __getstate__(self):
+--- modeller-9.25/modlib/modeller/model.py (original)
++++ modeller-9.25/modlib/modeller/model.py (refactored)
+@@ -121,7 +121,7 @@
+
+ def get_atom_indices(self):
+ """Get the indices of all atoms in this model"""
+- return (range(1, self.natm+1), self)
++ return (list(range(1, self.natm+1)), self)
+
+ def read(self, file, model_format='PDB',
+ model_segment=('FIRST:@', 'LAST:'), io=None,
+@@ -340,7 +340,7 @@
+ dope_score = sel.assess_dope()
+ scorer = normalized_dope.DOPEScorer(self)
+ z_score = scorer.get_z_score(dope_score)
+- print(">> Normalized DOPE z score: %.3f" % z_score)
++ print((">> Normalized DOPE z score: %.3f" % z_score))
+ return z_score
+
+ def assess_normalized_dopehr(self):
+@@ -351,7 +351,7 @@
+ dope_score = sel.assess_dopehr()
+ scorer = normalized_dope.DOPEHRScorer(self)
+ z_score = scorer.get_z_score(dope_score)
+- print(">> Normalized DOPE-HR z score: %.3f" % z_score)
++ print((">> Normalized DOPE-HR z score: %.3f" % z_score))
+ return z_score
+
+ def get_normalized_dope_profile(self):
+--- modeller-9.25/modlib/modeller/model_topology.py (original)
++++ modeller-9.25/modlib/modeller/model_topology.py (refactored)
+@@ -50,7 +50,7 @@
+ self.check_args = args
+ def __iter__(self):
+ return self
+- def next(self):
++ def __next__(self):
+ while True:
+ atoms = self.__int_next()
+ if self.check_func is None \
+@@ -82,7 +82,7 @@
+ self.check_args = args
+ def __iter__(self):
+ return self
+- def next(self):
++ def __next__(self):
+ while True:
+ atoms = self.__int_next()
+ if self.check_func is None \
+--- modeller-9.25/modlib/modeller/physical.py (original)
++++ modeller-9.25/modlib/modeller/physical.py (refactored)
+@@ -31,7 +31,7 @@
+ def __init__(self, default=1.0, **keys):
+ self._default = default
+ self._dict = {}
+- for (term,val) in keys.items():
++ for (term,val) in list(keys.items()):
+ term = eval("%s" % term)
+ self[term] = val
+
+--- modeller-9.25/modlib/modeller/salign.py (original)
++++ modeller-9.25/modlib/modeller/salign.py (refactored)
+@@ -38,8 +38,8 @@
+ return aln.salign(auto_overhang=True, overhang_auto_limit=5,
+ overhang_factor=1, **keys)
+ except modeller.ModellerError:
+- print("SALIGN with auto_overhang failed: %s" \
+- % str(sys.exc_info()[1]))
++ print(("SALIGN with auto_overhang failed: %s" \
++ % str(sys.exc_info()[1])))
+ print("Retrying without auto_overhang")
+ return aln.salign(**keys)
+
+@@ -118,13 +118,13 @@
+ self.qscore = res.qscorepct
+ self.aln.write(file=output_aln_file, alignment_format='PIR')
+ better = True
+- print("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
+- res.qscorepct))
++ print(("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
++ res.qscorepct)))
+ except modeller.ModellerError:
+- print("Set of parameters %s %g %g resulted in the "
++ print(("Set of parameters %s %g %g resulted in the "
+ "following error\t%s" % (str(weights), open_penalty,
+ extend_penalty,
+- str(sys.exc_info()[1])))
++ str(sys.exc_info()[1]))))
+ return better
+
+
+@@ -181,7 +181,7 @@
+ best.try_struc_align(opfile, opfile2, fw2, ogp3d, egp3d,
+ align_block)
+
+- print("final max quality = %g" % best.qscore)
++ print(("final max quality = %g" % best.qscore))
+
+ if best.found_struc_align:
+ aln.clear()
+--- modeller-9.25/modlib/modeller/saxsdata.py (original)
++++ modeller-9.25/modlib/modeller/saxsdata.py (refactored)
+@@ -206,7 +206,7 @@
+ try:
+ fh = open(saxsfilename,'r')
+ except:
+- print("file "+saxsfilename+" not found :(")
++ print(("file "+saxsfilename+" not found :("))
+ return
+ fh.close()
+ ns = 0
+@@ -225,8 +225,8 @@
+ s_low = s_min - .001
+ if (not s_hi):
+ s_hi = s_max + .001
+- print("s_min=%s, s_max=%s" % (str(s_min), str(s_max)))
+- print("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi)))
++ print(("s_min=%s, s_max=%s" % (str(s_min), str(s_max))))
++ print(("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi))))
+ self.ini_saxs(atmsel,
+ filename=formfacfilename,
+ s_min=s_min, s_max=s_max, maxs=ns, nmesh=ns, natomtyp=natomtyp,
+--- modeller-9.25/modlib/modeller/selection.py (original)
++++ modeller-9.25/modlib/modeller/selection.py (refactored)
+@@ -23,7 +23,7 @@
+ return self.mdl.atoms[obj - 1]
+ else:
+ def next(self):
+- obj = self.seliter.next()
++ obj = next(self.seliter)
+ return self.mdl.atoms[obj - 1]
+
+ class selection(object):
+@@ -52,7 +52,7 @@
+ :rtype: list of ints
+ """
+ if sys.version_info[:2] == (2,3):
+- keys = self.__selection.keys()
++ keys = list(self.__selection.keys())
+ keys.sort()
+ else:
+ keys = sorted(self.__selection.keys())
+@@ -722,9 +722,9 @@
+ def assess(self, assessor, output='SHORT NO_REPORT', **vars):
+ """Assess with the given assessor object
+ (e.g. :class:`soap_loop.Scorer`)."""
+- print(">> Model assessment by %s" % assessor.name)
++ print((">> Model assessment by %s" % assessor.name))
+ molpdf, terms = assessor._assess(self, output=output, **vars)
+- print("%s : %12.6f" % (assessor.name, molpdf))
++ print(("%s : %12.6f" % (assessor.name, molpdf)))
+ return molpdf
+
+ def _dope_energy(self, gprsr, name, output='SHORT NO_REPORT',
+@@ -733,7 +733,7 @@
+ nonbond_spline=1.), **vars):
+ """Internal function to do DOPE or DOPE-HR assessment"""
+ mdl = self.__mdl
+- print(">> Model assessment by %s potential" % name)
++ print((">> Model assessment by %s potential" % name))
+ edat = self.get_dope_energy_data()
+ old_gprsr = mdl.group_restraints
+ mdl.group_restraints = gprsr
+@@ -744,7 +744,7 @@
+ **vars)
+ finally:
+ mdl.group_restraints = old_gprsr
+- print("%s score : %12.6f" % (name, molpdf))
++ print(("%s score : %12.6f" % (name, molpdf)))
+ return molpdf
+
+ def debug_function(self, residue_span_range=(0, 99999),
+--- modeller-9.25/modlib/modeller/test.py (original)
++++ modeller-9.25/modlib/modeller/test.py (refactored)
+@@ -2,7 +2,7 @@
+ import modeller
+ import math
+ try:
+- from cStringIO import StringIO
++ from io import StringIO
+ except ImportError:
+ from io import StringIO
+ import sys
+@@ -150,7 +150,7 @@
+ diff = abs(num1 - num2)
+ if msg is None:
+ msg = "%f != %f within %g" % (num1, num2, tolerance)
+- self.assert_(diff < tolerance, msg)
++ self.assertTrue(diff < tolerance, msg)
+
+ def run_capture_stdout(self, method, *args, **keys):
+ """Run a method and capture its standard output. Returns both the
+--- modeller-9.25/modlib/modeller/automodel/automodel.py (original)
++++ modeller-9.25/modlib/modeller/automodel/automodel.py (refactored)
+@@ -203,13 +203,13 @@
+
+ def write_ok_summary(self, all, modeltyp):
+ """Print out a summary of all successfully generated models"""
+- print("\n>> Summary of successfully produced %s:" % modeltyp)
+- fields = [x for x in all[0].keys() if x.endswith(' score')]
++ print(("\n>> Summary of successfully produced %s:" % modeltyp))
++ fields = [x for x in list(all[0].keys()) if x.endswith(' score')]
+ fields.sort()
+ fields = ['molpdf'] + fields
+ header = '%-25s ' % 'Filename' + " ".join(['%14s' % x for x in fields])
+ print(header)
+- print('-' * len(header))
++ print(('-' * len(header)))
+ for mdl in all:
+ text = '%-25s' % mdl['name']
+ for field in fields:
+@@ -222,9 +222,9 @@
+
+ def write_failure_summary(self, all, modeltyp):
+ """Print out a summary of all failed models"""
+- print("\n>> Summary of failed %s:" % modeltyp)
++ print(("\n>> Summary of failed %s:" % modeltyp))
+ for mdl in all:
+- print("%-25s %s" % (mdl['name'], mdl['failure']))
++ print(("%-25s %s" % (mdl['name'], mdl['failure'])))
+ print('')
+
+ def rd_restraints(self):
+@@ -692,8 +692,8 @@
+ elif atmsel.get_model() is not self:
+ raise ModellerError("selection is defined on the wrong model")
+ elif len(atmsel) < len(self.atoms):
+- print("%d (of %d total) atoms selected for optimization" \
+- % (len(atmsel), len(self.atoms)))
++ print(("%d (of %d total) atoms selected for optimization" \
++ % (len(atmsel), len(self.atoms))))
+ return atmsel
+
+ def mkhomcsr(self, atmsel, aln):
+@@ -774,9 +774,9 @@
+ selstd = selection(self).only_std_residues()
+ selca = selstd.only_atom_types('CA')
+
+- print("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
++ print(("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
+ + "to protein atoms within %.2f angstroms\n" % bond_distance \
+- + "and protein CA atoms within %.2f angstroms" % ca_distance)
++ + "and protein CA atoms within %.2f angstroms" % ca_distance))
+ # Build the bonds first; this avoids duplicated CA-ligand bonds since
+ # make_distance() will not build restraints that are already on the
+ # nonbond exclusion list
+@@ -823,8 +823,8 @@
+ selhet = selhet.only_no_topology()
+
+ # Intra-residue:
+- print("%d atoms in residues without defined topology\n" % len(selhet) \
+- + "constrained to be rigid bodies")
++ print(("%d atoms in residues without defined topology\n" % len(selhet) \
++ + "constrained to be rigid bodies"))
+ rsr = self.restraints
+ rsr.make_distance(selhet, selhet, aln=aln,
+ distance_rsr_model=7, maximal_distance=10.0,
+@@ -898,8 +898,8 @@
+ print("\nThe following CHARMM atom type assignments were made:")
+ print(" Atom Old type New type")
+ for atom, old_type, new_type in zip(sel, old_types, new_types):
+- print(" %-20s %-15s %-15s"
+- % (str(atom), fmt_typ(old_type), fmt_typ(new_type)))
++ print((" %-20s %-15s %-15s"
++ % (str(atom), fmt_typ(old_type), fmt_typ(new_type))))
+
+ def select_atoms(self):
+ """Select atoms to be optimized in the model building procedure. By
diff --git a/sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch
similarity index 51%
rename from sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch
rename to sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch
index d7df05ce6..bd86d9cef 100644
--- a/sci-chemistry/modeller/files/modeller-9.25-convert2to3.patch
+++ b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch
@@ -1,342 +1,3 @@
---- modeller-9.25/modlib/modeller/__init__.py (original)
-+++ modeller-9.25/modlib/modeller/__init__.py (refactored)
-@@ -48,7 +48,7 @@
- return sys.maxsize > 2**32
- # This works on older Pythons, but not in Python 3
- else:
-- return type(sys.dllhandle) == long
-+ return type(sys.dllhandle) == int
-
- # Special processing on Windows to find _modeller.pyd and Modeller DLLs:
- if hasattr(config, 'install_dir') and hasattr(sys, 'dllhandle'):
---- modeller-9.25/modlib/modeller/coordinates.py (original)
-+++ modeller-9.25/modlib/modeller/coordinates.py (refactored)
-@@ -147,7 +147,7 @@
- (startres, endres) = self._get_resind()
- (startatm, endatm) = get_residue_atom_indices(self.seq, startres,
- endres)
-- return (range(startatm+1, endatm+1), self.seq)
-+ return (list(range(startatm+1, endatm+1)), self.seq)
-
- atoms = property(__get_atoms, doc="List of all atoms in this chain")
-
-@@ -158,7 +158,7 @@
- def get_atom_indices(self):
- (startind, endind) = get_residue_atom_indices(self.mdl, self._num,
- self._num + 1)
-- return range(startind + 1, endind + 1), self.mdl
-+ return list(range(startind + 1, endind + 1)), self.mdl
-
- def __repr__(self):
- # Get residue number before we do anything else. For alignment
-@@ -252,7 +252,7 @@
- def get_atom_indices(self):
- (startind, endind) = get_residue_atom_indices(self.mdl, self.offset,
- self.offset + len(self))
-- return range(startind + 1, endind + 1), self.mdl
-+ return list(range(startind + 1, endind + 1)), self.mdl
-
- def __getitem__(self, indx):
- ret = modutil.handle_seq_indx(self, indx, self.mdl._indxres,
-@@ -398,7 +398,7 @@
- return self.mdl.natm
-
- def get_atom_indices(self):
-- return range(self.offset + 1, self.offset + len(self) + 1), self.mdl
-+ return list(range(self.offset + 1, self.offset + len(self) + 1)), self.mdl
-
- def __getitem__(self, indx):
- ret = modutil.handle_seq_indx(self, indx, self.mdl._indxatm,
---- modeller-9.25/modlib/modeller/id_table.py (original)
-+++ modeller-9.25/modlib/modeller/id_table.py (refactored)
-@@ -40,7 +40,7 @@
- def write_seqid_matrix(fh, coder, mat):
- """Write a sequence identity matrix to a file"""
- nseq = len(mat)
-- print(" " * 9 + "".join([ s[:8] for s in coder ]))
-+ print((" " * 9 + "".join([ s[:8] for s in coder ])))
- for n1 in range(nseq):
- fh.write(coder[n1][:8] + " " + \
- "".join(["%8d" % (mat[n1][n2]+0.5) for n2 in range(nseq)]))
---- modeller-9.25/modlib/modeller/libraries.py (original)
-+++ modeller-9.25/modlib/modeller/libraries.py (refactored)
-@@ -32,7 +32,7 @@
- return BytesIO(*args)
- else:
- def _make_bytes_io(self, *args):
-- from cStringIO import StringIO
-+ from io import StringIO
- return StringIO(*args)
-
- def __getstate__(self):
---- modeller-9.25/modlib/modeller/model.py (original)
-+++ modeller-9.25/modlib/modeller/model.py (refactored)
-@@ -121,7 +121,7 @@
-
- def get_atom_indices(self):
- """Get the indices of all atoms in this model"""
-- return (range(1, self.natm+1), self)
-+ return (list(range(1, self.natm+1)), self)
-
- def read(self, file, model_format='PDB',
- model_segment=('FIRST:@', 'LAST:'), io=None,
-@@ -340,7 +340,7 @@
- dope_score = sel.assess_dope()
- scorer = normalized_dope.DOPEScorer(self)
- z_score = scorer.get_z_score(dope_score)
-- print(">> Normalized DOPE z score: %.3f" % z_score)
-+ print((">> Normalized DOPE z score: %.3f" % z_score))
- return z_score
-
- def assess_normalized_dopehr(self):
-@@ -351,7 +351,7 @@
- dope_score = sel.assess_dopehr()
- scorer = normalized_dope.DOPEHRScorer(self)
- z_score = scorer.get_z_score(dope_score)
-- print(">> Normalized DOPE-HR z score: %.3f" % z_score)
-+ print((">> Normalized DOPE-HR z score: %.3f" % z_score))
- return z_score
-
- def get_normalized_dope_profile(self):
---- modeller-9.25/modlib/modeller/model_topology.py (original)
-+++ modeller-9.25/modlib/modeller/model_topology.py (refactored)
-@@ -50,7 +50,7 @@
- self.check_args = args
- def __iter__(self):
- return self
-- def next(self):
-+ def __next__(self):
- while True:
- atoms = self.__int_next()
- if self.check_func is None \
-@@ -82,7 +82,7 @@
- self.check_args = args
- def __iter__(self):
- return self
-- def next(self):
-+ def __next__(self):
- while True:
- atoms = self.__int_next()
- if self.check_func is None \
---- modeller-9.25/modlib/modeller/physical.py (original)
-+++ modeller-9.25/modlib/modeller/physical.py (refactored)
-@@ -31,7 +31,7 @@
- def __init__(self, default=1.0, **keys):
- self._default = default
- self._dict = {}
-- for (term,val) in keys.items():
-+ for (term,val) in list(keys.items()):
- term = eval("%s" % term)
- self[term] = val
-
---- modeller-9.25/modlib/modeller/salign.py (original)
-+++ modeller-9.25/modlib/modeller/salign.py (refactored)
-@@ -38,8 +38,8 @@
- return aln.salign(auto_overhang=True, overhang_auto_limit=5,
- overhang_factor=1, **keys)
- except modeller.ModellerError:
-- print("SALIGN with auto_overhang failed: %s" \
-- % str(sys.exc_info()[1]))
-+ print(("SALIGN with auto_overhang failed: %s" \
-+ % str(sys.exc_info()[1])))
- print("Retrying without auto_overhang")
- return aln.salign(**keys)
-
-@@ -118,13 +118,13 @@
- self.qscore = res.qscorepct
- self.aln.write(file=output_aln_file, alignment_format='PIR')
- better = True
-- print("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
-- res.qscorepct))
-+ print(("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
-+ res.qscorepct)))
- except modeller.ModellerError:
-- print("Set of parameters %s %g %g resulted in the "
-+ print(("Set of parameters %s %g %g resulted in the "
- "following error\t%s" % (str(weights), open_penalty,
- extend_penalty,
-- str(sys.exc_info()[1])))
-+ str(sys.exc_info()[1]))))
- return better
-
-
-@@ -181,7 +181,7 @@
- best.try_struc_align(opfile, opfile2, fw2, ogp3d, egp3d,
- align_block)
-
-- print("final max quality = %g" % best.qscore)
-+ print(("final max quality = %g" % best.qscore))
-
- if best.found_struc_align:
- aln.clear()
---- modeller-9.25/modlib/modeller/saxsdata.py (original)
-+++ modeller-9.25/modlib/modeller/saxsdata.py (refactored)
-@@ -206,7 +206,7 @@
- try:
- fh = open(saxsfilename,'r')
- except:
-- print("file "+saxsfilename+" not found :(")
-+ print(("file "+saxsfilename+" not found :("))
- return
- fh.close()
- ns = 0
-@@ -225,8 +225,8 @@
- s_low = s_min - .001
- if (not s_hi):
- s_hi = s_max + .001
-- print("s_min=%s, s_max=%s" % (str(s_min), str(s_max)))
-- print("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi)))
-+ print(("s_min=%s, s_max=%s" % (str(s_min), str(s_max))))
-+ print(("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi))))
- self.ini_saxs(atmsel,
- filename=formfacfilename,
- s_min=s_min, s_max=s_max, maxs=ns, nmesh=ns, natomtyp=natomtyp,
---- modeller-9.25/modlib/modeller/selection.py (original)
-+++ modeller-9.25/modlib/modeller/selection.py (refactored)
-@@ -23,7 +23,7 @@
- return self.mdl.atoms[obj - 1]
- else:
- def next(self):
-- obj = self.seliter.next()
-+ obj = next(self.seliter)
- return self.mdl.atoms[obj - 1]
-
- class selection(object):
-@@ -52,7 +52,7 @@
- :rtype: list of ints
- """
- if sys.version_info[:2] == (2,3):
-- keys = self.__selection.keys()
-+ keys = list(self.__selection.keys())
- keys.sort()
- else:
- keys = sorted(self.__selection.keys())
-@@ -722,9 +722,9 @@
- def assess(self, assessor, output='SHORT NO_REPORT', **vars):
- """Assess with the given assessor object
- (e.g. :class:`soap_loop.Scorer`)."""
-- print(">> Model assessment by %s" % assessor.name)
-+ print((">> Model assessment by %s" % assessor.name))
- molpdf, terms = assessor._assess(self, output=output, **vars)
-- print("%s : %12.6f" % (assessor.name, molpdf))
-+ print(("%s : %12.6f" % (assessor.name, molpdf)))
- return molpdf
-
- def _dope_energy(self, gprsr, name, output='SHORT NO_REPORT',
-@@ -733,7 +733,7 @@
- nonbond_spline=1.), **vars):
- """Internal function to do DOPE or DOPE-HR assessment"""
- mdl = self.__mdl
-- print(">> Model assessment by %s potential" % name)
-+ print((">> Model assessment by %s potential" % name))
- edat = self.get_dope_energy_data()
- old_gprsr = mdl.group_restraints
- mdl.group_restraints = gprsr
-@@ -744,7 +744,7 @@
- **vars)
- finally:
- mdl.group_restraints = old_gprsr
-- print("%s score : %12.6f" % (name, molpdf))
-+ print(("%s score : %12.6f" % (name, molpdf)))
- return molpdf
-
- def debug_function(self, residue_span_range=(0, 99999),
---- modeller-9.25/modlib/modeller/test.py (original)
-+++ modeller-9.25/modlib/modeller/test.py (refactored)
-@@ -2,7 +2,7 @@
- import modeller
- import math
- try:
-- from cStringIO import StringIO
-+ from io import StringIO
- except ImportError:
- from io import StringIO
- import sys
-@@ -150,7 +150,7 @@
- diff = abs(num1 - num2)
- if msg is None:
- msg = "%f != %f within %g" % (num1, num2, tolerance)
-- self.assert_(diff < tolerance, msg)
-+ self.assertTrue(diff < tolerance, msg)
-
- def run_capture_stdout(self, method, *args, **keys):
- """Run a method and capture its standard output. Returns both the
---- modeller-9.25/modlib/modeller/automodel/automodel.py (original)
-+++ modeller-9.25/modlib/modeller/automodel/automodel.py (refactored)
-@@ -203,13 +203,13 @@
-
- def write_ok_summary(self, all, modeltyp):
- """Print out a summary of all successfully generated models"""
-- print("\n>> Summary of successfully produced %s:" % modeltyp)
-- fields = [x for x in all[0].keys() if x.endswith(' score')]
-+ print(("\n>> Summary of successfully produced %s:" % modeltyp))
-+ fields = [x for x in list(all[0].keys()) if x.endswith(' score')]
- fields.sort()
- fields = ['molpdf'] + fields
- header = '%-25s ' % 'Filename' + " ".join(['%14s' % x for x in fields])
- print(header)
-- print('-' * len(header))
-+ print(('-' * len(header)))
- for mdl in all:
- text = '%-25s' % mdl['name']
- for field in fields:
-@@ -222,9 +222,9 @@
-
- def write_failure_summary(self, all, modeltyp):
- """Print out a summary of all failed models"""
-- print("\n>> Summary of failed %s:" % modeltyp)
-+ print(("\n>> Summary of failed %s:" % modeltyp))
- for mdl in all:
-- print("%-25s %s" % (mdl['name'], mdl['failure']))
-+ print(("%-25s %s" % (mdl['name'], mdl['failure'])))
- print('')
-
- def rd_restraints(self):
-@@ -692,8 +692,8 @@
- elif atmsel.get_model() is not self:
- raise ModellerError("selection is defined on the wrong model")
- elif len(atmsel) < len(self.atoms):
-- print("%d (of %d total) atoms selected for optimization" \
-- % (len(atmsel), len(self.atoms)))
-+ print(("%d (of %d total) atoms selected for optimization" \
-+ % (len(atmsel), len(self.atoms))))
- return atmsel
-
- def mkhomcsr(self, atmsel, aln):
-@@ -774,9 +774,9 @@
- selstd = selection(self).only_std_residues()
- selca = selstd.only_atom_types('CA')
-
-- print("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
-+ print(("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
- + "to protein atoms within %.2f angstroms\n" % bond_distance \
-- + "and protein CA atoms within %.2f angstroms" % ca_distance)
-+ + "and protein CA atoms within %.2f angstroms" % ca_distance))
- # Build the bonds first; this avoids duplicated CA-ligand bonds since
- # make_distance() will not build restraints that are already on the
- # nonbond exclusion list
-@@ -823,8 +823,8 @@
- selhet = selhet.only_no_topology()
-
- # Intra-residue:
-- print("%d atoms in residues without defined topology\n" % len(selhet) \
-- + "constrained to be rigid bodies")
-+ print(("%d atoms in residues without defined topology\n" % len(selhet) \
-+ + "constrained to be rigid bodies"))
- rsr = self.restraints
- rsr.make_distance(selhet, selhet, aln=aln,
- distance_rsr_model=7, maximal_distance=10.0,
-@@ -898,8 +898,8 @@
- print("\nThe following CHARMM atom type assignments were made:")
- print(" Atom Old type New type")
- for atom, old_type, new_type in zip(sel, old_types, new_types):
-- print(" %-20s %-15s %-15s"
-- % (str(atom), fmt_typ(old_type), fmt_typ(new_type)))
-+ print((" %-20s %-15s %-15s"
-+ % (str(atom), fmt_typ(old_type), fmt_typ(new_type))))
-
- def select_atoms(self):
- """Select atoms to be optimized in the model building procedure. By
--- modeller-9.25/modlib/modeller/automodel/generate.py (original)
+++ modeller-9.25/modlib/modeller/automodel/generate.py (refactored)
@@ -88,11 +88,11 @@
diff --git a/sci-chemistry/modeller/modeller-9.25.ebuild b/sci-chemistry/modeller/modeller-9.25.ebuild
index 8db00ea11..cac137131 100644
--- a/sci-chemistry/modeller/modeller-9.25.ebuild
+++ b/sci-chemistry/modeller/modeller-9.25.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
-
+DISTUTILS_USE_SETUPTOOLS=no
inherit distutils-r1 eutils multilib
DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures"
@@ -24,7 +24,10 @@ INPATH="${EPREFIX}"/opt/modeller${ver}
QA_PREBUILT="/opt/*"
-PATCHES=( "${FILESDIR}/${P}-convert2to3.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-convert2to3-p1.patch"
+ "${FILESDIR}/${P}-convert2to3-p2.patch"
+)
pkg_setup() {
case ${ARCH} in
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-chemistry/modeller/files/, sci-chemistry/modeller/
@ 2021-02-17 20:03 Andrew Ammerlaan
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Ammerlaan @ 2021-02-17 20:03 UTC (permalink / raw
To: gentoo-commits
commit: b169f6ef9508cb12bd94d826e2a2906da8cfccb5
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Wed Feb 17 20:03:15 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Wed Feb 17 20:03:15 2021 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=b169f6ef
sci-chemistry/modeller: remove duplicate, exact same version is in ::gentoo
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
.../files/modeller-9.25-convert2to3-p1.patch | 339 -------------------
.../files/modeller-9.25-convert2to3-p2.patch | 363 ---------------------
sci-chemistry/modeller/metadata.xml | 8 -
sci-chemistry/modeller/modeller-9.25.ebuild | 151 ---------
4 files changed, 861 deletions(-)
diff --git a/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch
deleted file mode 100644
index deab6d68f..000000000
--- a/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p1.patch
+++ /dev/null
@@ -1,339 +0,0 @@
---- modeller-9.25/modlib/modeller/__init__.py (original)
-+++ modeller-9.25/modlib/modeller/__init__.py (refactored)
-@@ -48,7 +48,7 @@
- return sys.maxsize > 2**32
- # This works on older Pythons, but not in Python 3
- else:
-- return type(sys.dllhandle) == long
-+ return type(sys.dllhandle) == int
-
- # Special processing on Windows to find _modeller.pyd and Modeller DLLs:
- if hasattr(config, 'install_dir') and hasattr(sys, 'dllhandle'):
---- modeller-9.25/modlib/modeller/coordinates.py (original)
-+++ modeller-9.25/modlib/modeller/coordinates.py (refactored)
-@@ -147,7 +147,7 @@
- (startres, endres) = self._get_resind()
- (startatm, endatm) = get_residue_atom_indices(self.seq, startres,
- endres)
-- return (range(startatm+1, endatm+1), self.seq)
-+ return (list(range(startatm+1, endatm+1)), self.seq)
-
- atoms = property(__get_atoms, doc="List of all atoms in this chain")
-
-@@ -158,7 +158,7 @@
- def get_atom_indices(self):
- (startind, endind) = get_residue_atom_indices(self.mdl, self._num,
- self._num + 1)
-- return range(startind + 1, endind + 1), self.mdl
-+ return list(range(startind + 1, endind + 1)), self.mdl
-
- def __repr__(self):
- # Get residue number before we do anything else. For alignment
-@@ -252,7 +252,7 @@
- def get_atom_indices(self):
- (startind, endind) = get_residue_atom_indices(self.mdl, self.offset,
- self.offset + len(self))
-- return range(startind + 1, endind + 1), self.mdl
-+ return list(range(startind + 1, endind + 1)), self.mdl
-
- def __getitem__(self, indx):
- ret = modutil.handle_seq_indx(self, indx, self.mdl._indxres,
-@@ -398,7 +398,7 @@
- return self.mdl.natm
-
- def get_atom_indices(self):
-- return range(self.offset + 1, self.offset + len(self) + 1), self.mdl
-+ return list(range(self.offset + 1, self.offset + len(self) + 1)), self.mdl
-
- def __getitem__(self, indx):
- ret = modutil.handle_seq_indx(self, indx, self.mdl._indxatm,
---- modeller-9.25/modlib/modeller/id_table.py (original)
-+++ modeller-9.25/modlib/modeller/id_table.py (refactored)
-@@ -40,7 +40,7 @@
- def write_seqid_matrix(fh, coder, mat):
- """Write a sequence identity matrix to a file"""
- nseq = len(mat)
-- print(" " * 9 + "".join([ s[:8] for s in coder ]))
-+ print((" " * 9 + "".join([ s[:8] for s in coder ])))
- for n1 in range(nseq):
- fh.write(coder[n1][:8] + " " + \
- "".join(["%8d" % (mat[n1][n2]+0.5) for n2 in range(nseq)]))
---- modeller-9.25/modlib/modeller/libraries.py (original)
-+++ modeller-9.25/modlib/modeller/libraries.py (refactored)
-@@ -32,7 +32,7 @@
- return BytesIO(*args)
- else:
- def _make_bytes_io(self, *args):
-- from cStringIO import StringIO
-+ from io import StringIO
- return StringIO(*args)
-
- def __getstate__(self):
---- modeller-9.25/modlib/modeller/model.py (original)
-+++ modeller-9.25/modlib/modeller/model.py (refactored)
-@@ -121,7 +121,7 @@
-
- def get_atom_indices(self):
- """Get the indices of all atoms in this model"""
-- return (range(1, self.natm+1), self)
-+ return (list(range(1, self.natm+1)), self)
-
- def read(self, file, model_format='PDB',
- model_segment=('FIRST:@', 'LAST:'), io=None,
-@@ -340,7 +340,7 @@
- dope_score = sel.assess_dope()
- scorer = normalized_dope.DOPEScorer(self)
- z_score = scorer.get_z_score(dope_score)
-- print(">> Normalized DOPE z score: %.3f" % z_score)
-+ print((">> Normalized DOPE z score: %.3f" % z_score))
- return z_score
-
- def assess_normalized_dopehr(self):
-@@ -351,7 +351,7 @@
- dope_score = sel.assess_dopehr()
- scorer = normalized_dope.DOPEHRScorer(self)
- z_score = scorer.get_z_score(dope_score)
-- print(">> Normalized DOPE-HR z score: %.3f" % z_score)
-+ print((">> Normalized DOPE-HR z score: %.3f" % z_score))
- return z_score
-
- def get_normalized_dope_profile(self):
---- modeller-9.25/modlib/modeller/model_topology.py (original)
-+++ modeller-9.25/modlib/modeller/model_topology.py (refactored)
-@@ -50,7 +50,7 @@
- self.check_args = args
- def __iter__(self):
- return self
-- def next(self):
-+ def __next__(self):
- while True:
- atoms = self.__int_next()
- if self.check_func is None \
-@@ -82,7 +82,7 @@
- self.check_args = args
- def __iter__(self):
- return self
-- def next(self):
-+ def __next__(self):
- while True:
- atoms = self.__int_next()
- if self.check_func is None \
---- modeller-9.25/modlib/modeller/physical.py (original)
-+++ modeller-9.25/modlib/modeller/physical.py (refactored)
-@@ -31,7 +31,7 @@
- def __init__(self, default=1.0, **keys):
- self._default = default
- self._dict = {}
-- for (term,val) in keys.items():
-+ for (term,val) in list(keys.items()):
- term = eval("%s" % term)
- self[term] = val
-
---- modeller-9.25/modlib/modeller/salign.py (original)
-+++ modeller-9.25/modlib/modeller/salign.py (refactored)
-@@ -38,8 +38,8 @@
- return aln.salign(auto_overhang=True, overhang_auto_limit=5,
- overhang_factor=1, **keys)
- except modeller.ModellerError:
-- print("SALIGN with auto_overhang failed: %s" \
-- % str(sys.exc_info()[1]))
-+ print(("SALIGN with auto_overhang failed: %s" \
-+ % str(sys.exc_info()[1])))
- print("Retrying without auto_overhang")
- return aln.salign(**keys)
-
-@@ -118,13 +118,13 @@
- self.qscore = res.qscorepct
- self.aln.write(file=output_aln_file, alignment_format='PIR')
- better = True
-- print("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
-- res.qscorepct))
-+ print(("Qlty scrs %g\t%g\t%g" % (open_penalty, extend_penalty,
-+ res.qscorepct)))
- except modeller.ModellerError:
-- print("Set of parameters %s %g %g resulted in the "
-+ print(("Set of parameters %s %g %g resulted in the "
- "following error\t%s" % (str(weights), open_penalty,
- extend_penalty,
-- str(sys.exc_info()[1])))
-+ str(sys.exc_info()[1]))))
- return better
-
-
-@@ -181,7 +181,7 @@
- best.try_struc_align(opfile, opfile2, fw2, ogp3d, egp3d,
- align_block)
-
-- print("final max quality = %g" % best.qscore)
-+ print(("final max quality = %g" % best.qscore))
-
- if best.found_struc_align:
- aln.clear()
---- modeller-9.25/modlib/modeller/saxsdata.py (original)
-+++ modeller-9.25/modlib/modeller/saxsdata.py (refactored)
-@@ -206,7 +206,7 @@
- try:
- fh = open(saxsfilename,'r')
- except:
-- print("file "+saxsfilename+" not found :(")
-+ print(("file "+saxsfilename+" not found :("))
- return
- fh.close()
- ns = 0
-@@ -225,8 +225,8 @@
- s_low = s_min - .001
- if (not s_hi):
- s_hi = s_max + .001
-- print("s_min=%s, s_max=%s" % (str(s_min), str(s_max)))
-- print("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi)))
-+ print(("s_min=%s, s_max=%s" % (str(s_min), str(s_max))))
-+ print(("s_low=%s, s_hi=%s" % (str(s_low), str(s_hi))))
- self.ini_saxs(atmsel,
- filename=formfacfilename,
- s_min=s_min, s_max=s_max, maxs=ns, nmesh=ns, natomtyp=natomtyp,
---- modeller-9.25/modlib/modeller/selection.py (original)
-+++ modeller-9.25/modlib/modeller/selection.py (refactored)
-@@ -23,7 +23,7 @@
- return self.mdl.atoms[obj - 1]
- else:
- def next(self):
-- obj = self.seliter.next()
-+ obj = next(self.seliter)
- return self.mdl.atoms[obj - 1]
-
- class selection(object):
-@@ -52,7 +52,7 @@
- :rtype: list of ints
- """
- if sys.version_info[:2] == (2,3):
-- keys = self.__selection.keys()
-+ keys = list(self.__selection.keys())
- keys.sort()
- else:
- keys = sorted(self.__selection.keys())
-@@ -722,9 +722,9 @@
- def assess(self, assessor, output='SHORT NO_REPORT', **vars):
- """Assess with the given assessor object
- (e.g. :class:`soap_loop.Scorer`)."""
-- print(">> Model assessment by %s" % assessor.name)
-+ print((">> Model assessment by %s" % assessor.name))
- molpdf, terms = assessor._assess(self, output=output, **vars)
-- print("%s : %12.6f" % (assessor.name, molpdf))
-+ print(("%s : %12.6f" % (assessor.name, molpdf)))
- return molpdf
-
- def _dope_energy(self, gprsr, name, output='SHORT NO_REPORT',
-@@ -733,7 +733,7 @@
- nonbond_spline=1.), **vars):
- """Internal function to do DOPE or DOPE-HR assessment"""
- mdl = self.__mdl
-- print(">> Model assessment by %s potential" % name)
-+ print((">> Model assessment by %s potential" % name))
- edat = self.get_dope_energy_data()
- old_gprsr = mdl.group_restraints
- mdl.group_restraints = gprsr
-@@ -744,7 +744,7 @@
- **vars)
- finally:
- mdl.group_restraints = old_gprsr
-- print("%s score : %12.6f" % (name, molpdf))
-+ print(("%s score : %12.6f" % (name, molpdf)))
- return molpdf
-
- def debug_function(self, residue_span_range=(0, 99999),
---- modeller-9.25/modlib/modeller/test.py (original)
-+++ modeller-9.25/modlib/modeller/test.py (refactored)
-@@ -2,7 +2,7 @@
- import modeller
- import math
- try:
-- from cStringIO import StringIO
-+ from io import StringIO
- except ImportError:
- from io import StringIO
- import sys
-@@ -150,7 +150,7 @@
- diff = abs(num1 - num2)
- if msg is None:
- msg = "%f != %f within %g" % (num1, num2, tolerance)
-- self.assert_(diff < tolerance, msg)
-+ self.assertTrue(diff < tolerance, msg)
-
- def run_capture_stdout(self, method, *args, **keys):
- """Run a method and capture its standard output. Returns both the
---- modeller-9.25/modlib/modeller/automodel/automodel.py (original)
-+++ modeller-9.25/modlib/modeller/automodel/automodel.py (refactored)
-@@ -203,13 +203,13 @@
-
- def write_ok_summary(self, all, modeltyp):
- """Print out a summary of all successfully generated models"""
-- print("\n>> Summary of successfully produced %s:" % modeltyp)
-- fields = [x for x in all[0].keys() if x.endswith(' score')]
-+ print(("\n>> Summary of successfully produced %s:" % modeltyp))
-+ fields = [x for x in list(all[0].keys()) if x.endswith(' score')]
- fields.sort()
- fields = ['molpdf'] + fields
- header = '%-25s ' % 'Filename' + " ".join(['%14s' % x for x in fields])
- print(header)
-- print('-' * len(header))
-+ print(('-' * len(header)))
- for mdl in all:
- text = '%-25s' % mdl['name']
- for field in fields:
-@@ -222,9 +222,9 @@
-
- def write_failure_summary(self, all, modeltyp):
- """Print out a summary of all failed models"""
-- print("\n>> Summary of failed %s:" % modeltyp)
-+ print(("\n>> Summary of failed %s:" % modeltyp))
- for mdl in all:
-- print("%-25s %s" % (mdl['name'], mdl['failure']))
-+ print(("%-25s %s" % (mdl['name'], mdl['failure'])))
- print('')
-
- def rd_restraints(self):
-@@ -692,8 +692,8 @@
- elif atmsel.get_model() is not self:
- raise ModellerError("selection is defined on the wrong model")
- elif len(atmsel) < len(self.atoms):
-- print("%d (of %d total) atoms selected for optimization" \
-- % (len(atmsel), len(self.atoms)))
-+ print(("%d (of %d total) atoms selected for optimization" \
-+ % (len(atmsel), len(self.atoms))))
- return atmsel
-
- def mkhomcsr(self, atmsel, aln):
-@@ -774,9 +774,9 @@
- selstd = selection(self).only_std_residues()
- selca = selstd.only_atom_types('CA')
-
-- print("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
-+ print(("%d atoms in HETATM/BLK residues constrained\n" % len(selhet) \
- + "to protein atoms within %.2f angstroms\n" % bond_distance \
-- + "and protein CA atoms within %.2f angstroms" % ca_distance)
-+ + "and protein CA atoms within %.2f angstroms" % ca_distance))
- # Build the bonds first; this avoids duplicated CA-ligand bonds since
- # make_distance() will not build restraints that are already on the
- # nonbond exclusion list
-@@ -823,8 +823,8 @@
- selhet = selhet.only_no_topology()
-
- # Intra-residue:
-- print("%d atoms in residues without defined topology\n" % len(selhet) \
-- + "constrained to be rigid bodies")
-+ print(("%d atoms in residues without defined topology\n" % len(selhet) \
-+ + "constrained to be rigid bodies"))
- rsr = self.restraints
- rsr.make_distance(selhet, selhet, aln=aln,
- distance_rsr_model=7, maximal_distance=10.0,
-@@ -898,8 +898,8 @@
- print("\nThe following CHARMM atom type assignments were made:")
- print(" Atom Old type New type")
- for atom, old_type, new_type in zip(sel, old_types, new_types):
-- print(" %-20s %-15s %-15s"
-- % (str(atom), fmt_typ(old_type), fmt_typ(new_type)))
-+ print((" %-20s %-15s %-15s"
-+ % (str(atom), fmt_typ(old_type), fmt_typ(new_type))))
-
- def select_atoms(self):
- """Select atoms to be optimized in the model building procedure. By
diff --git a/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch b/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch
deleted file mode 100644
index bd86d9cef..000000000
--- a/sci-chemistry/modeller/files/modeller-9.25-convert2to3-p2.patch
+++ /dev/null
@@ -1,363 +0,0 @@
---- modeller-9.25/modlib/modeller/automodel/generate.py (original)
-+++ modeller-9.25/modlib/modeller/automodel/generate.py (refactored)
-@@ -88,11 +88,11 @@
- to_rebuild.append(r)
- _unbuild_ring(r, ring_atoms + extra_atoms)
- if len(to_rebuild) > 0:
-- print("The following %d residues contain 6-membered rings with "
-+ print(("The following %d residues contain 6-membered rings with "
- "poor geometries\nafter transfer from templates. Rebuilding "
- "rings from internal coordinates:\n %s" \
- % (len(to_rebuild),
-- "\n ".join([str(r) for r in to_rebuild])))
-+ "\n ".join([str(r) for r in to_rebuild]))))
- mdl.build(initialize_xyz=False, build_method='INTERNAL_COORDINATES')
-
- def read_xyz(mdl, aln):
---- modeller-9.25/modlib/modeller/automodel/loopmodel.py (original)
-+++ modeller-9.25/modlib/modeller/automodel/loopmodel.py (refactored)
-@@ -105,7 +105,7 @@
- lendef = len(self._defined_indices)
- if lenall > lendef:
- s = selection(self) - s
-- print("""
-+ print(("""
- The following %d atoms were not found in the input model's non-loop region,
- and were added automatically by Modeller in order to determine correct
- interactions between the loop and the rest of the protein:
-@@ -115,7 +115,7 @@
- rest of the protein may exist (note, however, that the score of the loop does
- not include protein-protein internal interactions, so will not be adversely
- affected by any clashes).""" \
--% (lenall - lendef, ", ".join([repr(a) for a in s])))
-+% (lenall - lendef, ", ".join([repr(a) for a in s]))))
-
- if self.loop.write_defined_only:
- print("""
-@@ -406,7 +406,7 @@
- elif len(atmsel.only_no_topology()) > 0:
- raise ModellerError("some selected residues have no topology")
- else:
-- print("%d atoms selected for loop refinement" % len(atmsel))
-+ print(("%d atoms selected for loop refinement" % len(atmsel)))
- return atmsel
-
- def optimize_loop(self, atmsel, sched, actions):
---- modeller-9.25/modlib/modeller/mmcif/writer.py (original)
-+++ modeller-9.25/modlib/modeller/mmcif/writer.py (refactored)
-@@ -4,7 +4,7 @@
- # which works as far back as 2.3, so imports need to be protected by a
- # version check
-
--from __future__ import print_function
-+
- import sys
- import textwrap
-
-@@ -12,7 +12,7 @@
- if sys.version_info[0] >= 3:
- _long_type = int
- else:
-- _long_type = long
-+ _long_type = int
-
- class _LineWriter(object):
- def __init__(self, writer, line_len=80):
---- modeller-9.25/modlib/modeller/optimizers/builtin_optimizer.py (original)
-+++ modeller-9.25/modlib/modeller/optimizers/builtin_optimizer.py (refactored)
-@@ -9,7 +9,7 @@
- # delete the key entirely, as __getstate__ must return a non-empty
- # dict in order for our __setstate__ method to be called).
- d = self.__dict__.copy()
-- for key in self.__dict__.keys():
-+ for key in list(self.__dict__.keys()):
- if key.endswith("_modpt") or key.endswith("__optpt"):
- d[key] = None
- return d
-@@ -21,7 +21,7 @@
- vars = params.copy()
- self._update_params(vars, ok_keys, extravars)
- for key in ok_keys:
-- if key not in vars.keys() \
-+ if key not in list(vars.keys()) \
- and key not in ("edat", "libs", "actions", "schedule_scale"):
- raise ValueError("a value must be given for %s" % key)
-
---- modeller-9.25/modlib/modeller/optimizers/optimizer.py (original)
-+++ modeller-9.25/modlib/modeller/optimizers/optimizer.py (refactored)
-@@ -10,7 +10,7 @@
- return self.atmsel
-
- def _update_params(self, params, ok_keys, vars):
-- for key in vars.keys():
-+ for key in list(vars.keys()):
- if key in ok_keys:
- params[key] = vars[key]
- else:
---- modeller-9.25/modlib/modeller/parallel/data_types.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/data_types.py (refactored)
-@@ -3,7 +3,7 @@
- import sys
-
- try:
-- import cPickle as pickle
-+ import pickle as pickle
- except ImportError:
- import pickle
-
---- modeller-9.25/modlib/modeller/parallel/job.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/job.py (refactored)
-@@ -106,7 +106,7 @@
- if id and id in pending_slaves:
- slave = pending_slaves.pop(id)
- connected_slaves[id] = slave
-- print("Identified slave %s " % str(slave))
-+ print(("Identified slave %s " % str(slave)))
- slave.accept_connection(sock)
- slave.set_directory(self.cwd)
- if sys.path[0] != '':
-@@ -117,7 +117,7 @@
- return slave
- elif id and id in connected_slaves:
- slave = connected_slaves[id]
-- print("Reconnect from slave %s " % str(slave))
-+ print(("Reconnect from slave %s " % str(slave)))
- slave.accept_connection(sock)
- else:
- print("Ignoring request from unknown slave")
-@@ -159,7 +159,7 @@
- """Run all tasks and return all the results, in the same order that they
- were submitted, when all the jobs have completed."""
- tasks = self.tasks[:]
-- print("Running %d tasks on %d slaves" % (len(tasks), len(self)))
-+ print(("Running %d tasks on %d slaves" % (len(tasks), len(self))))
- self.push_tasks_to_slaves()
- while True:
- try:
-@@ -174,7 +174,7 @@
- def yield_tasks_unordered(self):
- """Run all tasks and return their results (as a generator), in
- whatever order they complete."""
-- print("Running %d tasks on %d slaves" % (len(self.tasks), len(self)))
-+ print(("Running %d tasks on %d slaves" % (len(self.tasks), len(self))))
- self.push_tasks_to_slaves()
- while True:
- try:
-@@ -215,7 +215,7 @@
- task = obj.task_results()
- if task:
- # The slave completed its task
-- print("%s on %s completed" % (str(task), str(obj)))
-+ print(("%s on %s completed" % (str(task), str(obj))))
- if len(self.tasks) > 0:
- obj.run_task(self.tasks.pop(0))
- return task
-@@ -225,14 +225,14 @@
- except (NetworkError, TaskSetupError):
- self.kill_slaves((obj,), sys.exc_info()[1])
- else:
-- print("Warning: slave %s reports data, but is not running a task" \
-- % str(obj))
-+ print(("Warning: slave %s reports data, but is not running a task" \
-+ % str(obj)))
-
- def kill_slaves(self, slaves, err=""):
- if err != "":
- err = "(%s) " % err
- for s in slaves:
-- print("%s failed %s- removing from %s" % (s, err, self))
-+ print(("%s failed %s- removing from %s" % (s, err, self)))
- task = s.kill()
- if task:
- self.tasks.append(task)
-@@ -248,8 +248,8 @@
- timedout = [a for a in self if a.running_task() and \
- a.contact_timeout(self.heartbeat_timeout)]
- if len(timedout) > 0:
-- print("Did not hear from slaves %s in %d seconds" % \
-- (str(timedout), self.heartbeat_timeout))
-+ print(("Did not hear from slaves %s in %d seconds" % \
-+ (str(timedout), self.heartbeat_timeout)))
- self.kill_slaves(timedout)
-
- def push_tasks_to_slaves(self):
-@@ -264,8 +264,8 @@
- slave.run_task(t)
- # If a network error occurred, kill the slave and requeue the task
- except socket.error:
-- print("slave %s failed on run task with %s; removing from job" \
-- % (slave, sys.exc_info()[1]))
-+ print(("slave %s failed on run task with %s; removing from job" \
-+ % (slave, sys.exc_info()[1])))
- slave.kill()
- self.tasks.insert(0, t)
- self.expand_for_tasks()
---- modeller-9.25/modlib/modeller/parallel/myspawn.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/myspawn.py (refactored)
-@@ -10,7 +10,7 @@
- ``output``."""
-
- fp = open(output, "w")
-- print("%s >& %s" % (cmd, output))
-+ print(("%s >& %s" % (cmd, output)))
- if sys.platform == 'win32':
- _myspawn_win32(cmd, fp)
- else:
-@@ -27,4 +27,4 @@
- # Ignore Windows "file not found" errors, so that behavior is consistent
- # between Unix and Windows
- except WindowsError:
-- print("WindowsError: %s (ignored)" % sys.exc_info()[1])
-+ print(("WindowsError: %s (ignored)" % sys.exc_info()[1]))
---- modeller-9.25/modlib/modeller/parallel/sge_qsub_array.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/sge_qsub_array.py (refactored)
-@@ -36,7 +36,7 @@
- outlines = output.readlines()
- output.close()
- for line in outlines:
-- print(line.rstrip('\r\n'))
-+ print((line.rstrip('\r\n')))
- a.require_clean_exit()
- self._set_jobid(outlines)
-
---- modeller-9.25/modlib/modeller/parallel/sge_qsub_slave.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/sge_qsub_slave.py (refactored)
-@@ -38,7 +38,7 @@
- qsub = "qsub -S /bin/sh -o '%s' -N '%s' %s %s" % \
- (output, name, self.standard_options, self._options)
- cmd = "%s -slave %s" % (path, id)
-- print("%s | %s" % (cmd, qsub))
-+ print(("%s | %s" % (cmd, qsub)))
- a = MyPopen4(qsub)
- (input, output) = (a.stdin, a.stdout)
- input.write(cmd + '\n')
-@@ -46,7 +46,7 @@
- outlines = output.readlines()
- output.close()
- for line in outlines:
-- print(line.rstrip('\r\n'))
-+ print((line.rstrip('\r\n')))
- a.require_clean_exit()
- self._set_jobid(outlines)
-
---- modeller-9.25/modlib/modeller/parallel/slaveloop.py (original)
-+++ modeller-9.25/modlib/modeller/parallel/slaveloop.py (refactored)
-@@ -51,14 +51,14 @@
- master.send_data(communicator.ErrorWrapper(detail))
- except socket.error:
- detail2 = sys.exc_info()[1]
-- print("Warning: ignored exception " + str(detail2) \
-+ print(("Warning: ignored exception " + str(detail2) \
- + " when trying to send error state " \
-- + str(detail) + " back to master")
-+ + str(detail) + " back to master"))
- raise detail
- raise
-
- def run(self):
-- print("Slave startup: connect to master at %s" % self.addr)
-+ print(("Slave startup: connect to master at %s" % self.addr))
- (host, port, identifier) = self.addr.split(":", 2)
- port = int(port)
- lock = threading.Lock()
---- modeller-9.25/modlib/modeller/top_interpreter/__init__.py (original)
-+++ modeller-9.25/modlib/modeller/top_interpreter/__init__.py (refactored)
-@@ -65,7 +65,7 @@
- if len(line) > 0:
- try:
- self._parse_top_ini_line(line.split(None, 4), vars)
-- except TypeError, detail:
-+ except TypeError as detail:
- mod_log_write("read_top__E> " + str(detail))
- mod_log_write(" top.ini line: " + line)
- raise
-@@ -113,7 +113,7 @@
- self._set_top_vars(vars)
- try:
- fh = self._open_include_file(self.variables['include_file'])
-- except IOError, detail:
-+ except IOError as detail:
- mod_log_write("runlines__E> " + str(detail))
- mod_log_write(" TOP Command line: " + line)
- raise
-@@ -160,7 +160,7 @@
- indxca = self._run_top_cmd(cmd, indxca, lines, callstack,
- subrout)
- _modeller.mod_top_post()
-- except (IndexError, SyntaxError, TypeError), detail:
-+ except (IndexError, SyntaxError, TypeError) as detail:
- mod_log_write("runlines__E> " + str(detail))
- mod_log_write(" TOP Command line: " + line)
- raise
---- modeller-9.25/modlib/modeller/top_interpreter/topcmds.py (original)
-+++ modeller-9.25/modlib/modeller/top_interpreter/topcmds.py (refactored)
-@@ -19,7 +19,7 @@
- if not isinstance(vars, (list, tuple)):
- vars = (vars,)
- for var in vars:
-- if keys.has_key(var):
-+ if var in keys:
- args.append(keys[var])
- else:
- args.append(self.vars[var])
---- modeller-9.25/modlib/modeller/top_interpreter/util.py (original)
-+++ modeller-9.25/modlib/modeller/top_interpreter/util.py (refactored)
-@@ -1,7 +1,7 @@
- import _modeller
-
- def set_topvars(topvardict, vars, topini):
-- for name in topvardict.keys():
-+ for name in list(topvardict.keys()):
- value = topvardict[name]
- if value is None:
- continue
---- modeller-9.25/modlib/modeller/top_interpreter/variables.py (original)
-+++ modeller-9.25/modlib/modeller/top_interpreter/variables.py (refactored)
-@@ -32,11 +32,11 @@
- def __init__(self, topcmds):
- self._topcmds = topcmds
- self._topvars = {}
-- for var in self._deftops.keys():
-+ for var in list(self._deftops.keys()):
- self._ourvars[var] = self._deftops[var]
-- for var in self._edat_members.keys():
-+ for var in list(self._edat_members.keys()):
- self._ourvars[var] = self._edat_members[var]
-- for var in self._io_members.keys():
-+ for var in list(self._io_members.keys()):
- self._ourvars[var] = self._io_members[var]
-
- def __setitem__(self, key, value):
---- modeller-9.25/modlib/modeller/util/modobject.py (original)
-+++ modeller-9.25/modlib/modeller/util/modobject.py (refactored)
-@@ -1,8 +1,8 @@
- class modobject(object):
- def __setattr__(self, name, val):
- if name not in dir(self):
-- print("runcmd_____W>: creation of new member '%s' in %s: "
-- "possible typo!" % (name, str(self)))
-+ print(("runcmd_____W>: creation of new member '%s' in %s: "
-+ "possible typo!" % (name, str(self))))
- object.__setattr__(self, name, val)
-
- def __getstate__(self):
-@@ -11,7 +11,7 @@
- # delete the key entirely, as __getstate__ must return a non-empty
- # dict in order for our __setstate__ method to be called).
- d = self.__dict__.copy()
-- for key in self.__dict__.keys():
-+ for key in list(self.__dict__.keys()):
- if key.endswith("_modpt"):
- d[key] = None
- return d
---- modeller-9.25/modlib/modeller/util/modutil.py (original)
-+++ modeller-9.25/modlib/modeller/util/modutil.py (refactored)
-@@ -17,7 +17,7 @@
- else:
- return indx
- elif isinstance(indx, slice):
-- return range(*indx.indices(len(seqtype)))
-+ return list(range(*indx.indices(len(seqtype))))
- elif lookup_func is not None:
- args = lookup_args + (indx,)
- int_indx = lookup_func(*args)
diff --git a/sci-chemistry/modeller/metadata.xml b/sci-chemistry/modeller/metadata.xml
deleted file mode 100644
index da36ecbfc..000000000
--- a/sci-chemistry/modeller/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>sci-chemistry@gentoo.org</email>
- <name>Gentoo Chemistry Project</name>
- </maintainer>
-</pkgmetadata>
diff --git a/sci-chemistry/modeller/modeller-9.25.ebuild b/sci-chemistry/modeller/modeller-9.25.ebuild
deleted file mode 100644
index cac137131..000000000
--- a/sci-chemistry/modeller/modeller-9.25.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=no
-inherit distutils-r1 eutils multilib
-
-DESCRIPTION="Homology or comparative modeling of protein three-dimensional structures"
-HOMEPAGE="https://salilab.org/modeller/"
-SRC_URI="https://salilab.org/${PN}/${PV}/${P}.tar.gz"
-
-LICENSE="modeller"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc examples"
-SLOT="0"
-
-RESTRICT="mirror"
-
-DEPEND=">=dev-lang/swig-1.3"
-
-INPATH="${EPREFIX}"/opt/modeller${ver}
-
-QA_PREBUILT="/opt/*"
-
-PATCHES=(
- "${FILESDIR}/${P}-convert2to3-p1.patch"
- "${FILESDIR}/${P}-convert2to3-p2.patch"
-)
-
-pkg_setup() {
- case ${ARCH} in
- x86)
- EXECTYPE="i386-intel8";;
- amd64)
- EXECTYPE="x86_64-intel8";;
- *)
- die "Your arch "${ARCH}" does not appear supported at this time.";;
- esac
-}
-
-python_prepare_all(){
- sed "s:i386-intel8:${EXECTYPE}:g" -i src/swig/setup.py || die
- rm -rf modlib/modeller/python_library || die
- sed -i '1 i\#!/usr/bin/python' bin/modslave.py
- distutils-r1_python_prepare_all
-}
-
-python_compile(){
- cd src/swig || die
- swig -python -keyword -nodefaultctor -nodefaultdtor -noproxy modeller.i || die
- distutils-r1_python_compile
-}
-
-python_install() {
- cd src/swig || die
- distutils-r1_python_install
-}
-
-python_install_all(){
- cd "${S}" || die
- sed \
- -e "/^EXECUTABLE_TYPE/s:xxx:${EXECTYPE}:g" \
- -e "/MODINSTALL/s:xxx:\"${INPATH}\":g" \
- -i bin/modscript || die
-
- sed -e "s;@TOPDIR\@;\"${INPATH}\";" \
- -e "s;@EXETYPE\@;${EXECTYPE};" \
- bin/modpy.sh.in > "${T}/modpy.sh"
-
- insinto ${INPATH}
- doins -r modlib
- python_foreach_impl python_domodule modlib/modeller
-
- insinto ${INPATH}/bin
- doins -r bin/{lib,*top}
-
- exeinto ${INPATH}/bin
- doexe bin/{modscript,mod${PV}_${EXECTYPE}} "${T}"/modpy.sh
-
- python_foreach_impl python_doscript bin/modslave.py
- dosym ${INPATH}/bin/modscript /opt/bin/mod${PV}
- dosym ${INPATH}/bin/modpy.sh /opt/bin/modpy.sh
-
- exeinto ${INPATH}/lib/${EXECTYPE}/
- doexe lib/${EXECTYPE}/lib*
- dosym libmodeller.so.8 ${INPATH}/lib/${EXECTYPE}/libmodeller.so
- dosym ../../${INPATH}/lib/${EXECTYPE}/libmodeller.so.8 /usr/$(get_libdir)/libmodeller.so.8
-
- use doc && HTML_DOCS=( doc/. )
- distutils-r1_python_install_all
-
- if use examples; then
- insinto /usr/share/${PN}/
- doins -r examples
- fi
-
- insinto /etc/revdep-rebuild
- cat >> "${T}"/40-${PN} <<- EOF
- SEARCH_DIRS_MASK="${EPREFIX}/opt/modeller/lib/"
- EOF
- doins "${T}"/40-${PN}
-}
-
-pkg_postinst() {
- if [[ ! -e "${INPATH}/modlib/modeller/config.py" ]]; then
- echo install_dir = \"${INPATH}/\"> ${INPATH}/modlib/modeller/config.py
- fi
-
- if grep -q license ${INPATH}/modlib/modeller/config.py; then
- einfo "A license key file is already present in ${IN_PATH}/modlib/modeller/config.py"
- else
- ewarn "Obtain a license Key from"
- ewarn "http://salilab.org/modeller/registration.html"
- ewarn "And run this before using modeller:"
- ewarn "emerge --config =${CATEGORY}/${PF}"
- ewarn "That way you can [re]enter your license key."
- fi
-}
-
-pkg_postrm() {
- ewarn "This package leaves a license Key file in ${INPATH}/modlib/modeller/config.py"
- ewarn "that you need to remove to completely get rid of modeller."
-}
-
-pkg_config() {
- ewarn "Your license key is NOT checked for validity here."
- ewarn " Make sure you type it in correctly."
- eerror "If you CTRL+C out of this, modeller will not run!"
- while true
- do
- einfo "Please enter your license key:"
- read license_key1
- einfo "Please re-enter your license key:"
- read license_key2
- if [[ "$license_key1" == "" ]]
- then
- echo "You entered a blank license key. Try again."
- else
- if [[ "$license_key1" == "$license_key2" ]]
- then
- echo license = '"'$license_key1'"' >> "${INPATH}/modlib/modeller/config.py"
- einfo "Thank you!"
- break
- else
- eerror "Your license key entries do not match. Try again."
- fi
- fi
- done
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-17 20:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-31 15:07 [gentoo-commits] proj/sci:master commit in: sci-chemistry/modeller/files/, sci-chemistry/modeller/ Aisha Tammy
-- strict thread matches above, loose matches on Subject: below --
2021-02-17 20:03 Andrew Ammerlaan
2020-10-08 10:54 Alexey Shvetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox