You can subscribe to this list here.
| 2005 |
Jan
(70) |
Feb
(200) |
Mar
(222) |
Apr
(198) |
May
(122) |
Jun
(74) |
Jul
(171) |
Aug
(235) |
Sep
(118) |
Oct
(165) |
Nov
(276) |
Dec
(167) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(102) |
Feb
(124) |
Mar
(90) |
Apr
(155) |
May
(162) |
Jun
(285) |
Jul
(142) |
Aug
(136) |
Sep
(251) |
Oct
(188) |
Nov
(156) |
Dec
(144) |
| 2007 |
Jan
(231) |
Feb
(151) |
Mar
(142) |
Apr
(69) |
May
(66) |
Jun
(88) |
Jul
(61) |
Aug
(82) |
Sep
(125) |
Oct
(167) |
Nov
(115) |
Dec
(70) |
| 2008 |
Jan
(112) |
Feb
(109) |
Mar
(163) |
Apr
(239) |
May
(185) |
Jun
(147) |
Jul
(123) |
Aug
(142) |
Sep
(134) |
Oct
(106) |
Nov
(151) |
Dec
(114) |
| 2009 |
Jan
(143) |
Feb
(188) |
Mar
(121) |
Apr
(188) |
May
(193) |
Jun
(113) |
Jul
(161) |
Aug
(172) |
Sep
(95) |
Oct
(157) |
Nov
(123) |
Dec
(112) |
| 2010 |
Jan
(61) |
Feb
(115) |
Mar
(163) |
Apr
(138) |
May
(152) |
Jun
(133) |
Jul
(228) |
Aug
(135) |
Sep
(230) |
Oct
(214) |
Nov
(178) |
Dec
(225) |
| 2011 |
Jan
(197) |
Feb
(284) |
Mar
(244) |
Apr
(190) |
May
(119) |
Jun
(195) |
Jul
(305) |
Aug
(204) |
Sep
(175) |
Oct
(196) |
Nov
(166) |
Dec
(170) |
| 2012 |
Jan
(203) |
Feb
(197) |
Mar
(255) |
Apr
(153) |
May
(111) |
Jun
(130) |
Jul
(82) |
Aug
(207) |
Sep
(103) |
Oct
(173) |
Nov
(150) |
Dec
(171) |
| 2013 |
Jan
(156) |
Feb
(242) |
Mar
(216) |
Apr
(264) |
May
(116) |
Jun
(218) |
Jul
(192) |
Aug
(255) |
Sep
(157) |
Oct
(209) |
Nov
(227) |
Dec
(222) |
| 2014 |
Jan
(207) |
Feb
(214) |
Mar
(223) |
Apr
(125) |
May
(183) |
Jun
(213) |
Jul
(219) |
Aug
(230) |
Sep
(195) |
Oct
(275) |
Nov
(179) |
Dec
(163) |
| 2015 |
Jan
(227) |
Feb
(148) |
Mar
(148) |
Apr
(178) |
May
(228) |
Jun
(195) |
Jul
(155) |
Aug
(168) |
Sep
(168) |
Oct
(151) |
Nov
(259) |
Dec
(137) |
| 2016 |
Jan
(127) |
Feb
(244) |
Mar
(219) |
Apr
(266) |
May
(120) |
Jun
(366) |
Jul
(211) |
Aug
(203) |
Sep
(222) |
Oct
(155) |
Nov
(97) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(2) |
|
2
(3) |
3
(11) |
4
(5) |
5
(8) |
6
(4) |
7
(6) |
8
|
|
9
(1) |
10
(7) |
11
(1) |
12
(3) |
13
(3) |
14
(7) |
15
(1) |
|
16
(1) |
17
(7) |
18
(22) |
19
(7) |
20
(4) |
21
(3) |
22
|
|
23
(3) |
24
(7) |
25
(12) |
26
(3) |
27
(3) |
28
(10) |
29
(2) |
|
30
(6) |
31
|
|
|
|
|
|
|
From: <luc...@us...> - 2010-05-30 21:59:18
|
Revision: 10798
http://cctbx.svn.sourceforge.net/cctbx/?rev=10798&view=rev
Author: luc_j_bourhis
Date: 2010-05-30 21:59:12 +0000 (Sun, 30 May 2010)
Log Message:
-----------
clang spotted that typo
Modified Paths:
--------------
trunk/scitbx/lstbx/normal_equations.h
Modified: trunk/scitbx/lstbx/normal_equations.h
===================================================================
--- trunk/scitbx/lstbx/normal_equations.h 2010-05-30 21:58:58 UTC (rev 10797)
+++ trunk/scitbx/lstbx/normal_equations.h 2010-05-30 21:59:12 UTC (rev 10798)
@@ -98,7 +98,7 @@
/// Reset the state to construction time, i.e. no equations accumulated
void reset() {
- solved = false;
+ solved_ = false;
std::fill(normal_matrix_.begin(), normal_matrix_.end(), scalar_t(0));
std::fill(right_hand_side_.begin(), right_hand_side_.end(), scalar_t(0));
r_sq = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-30 21:59:04
|
Revision: 10797
http://cctbx.svn.sourceforge.net/cctbx/?rev=10797&view=rev
Author: luc_j_bourhis
Date: 2010-05-30 21:58:58 +0000 (Sun, 30 May 2010)
Log Message:
-----------
clang spotted an illegal mutable reference member: fixing it forced the removal of const everywhere, for the better
Modified Paths:
--------------
trunk/scitbx/fortran_io/details/istream_scanner.h
trunk/scitbx/fortran_io/details/numeric_extractors.h
Modified: trunk/scitbx/fortran_io/details/istream_scanner.h
===================================================================
--- trunk/scitbx/fortran_io/details/istream_scanner.h 2010-05-30 21:58:41 UTC (rev 10796)
+++ trunk/scitbx/fortran_io/details/istream_scanner.h 2010-05-30 21:58:58 UTC (rev 10797)
@@ -16,12 +16,12 @@
value_t operator*() const { return current; }
- istream_scanner const &operator++() const {
+ istream_scanner const &operator++() {
current = input.get();
return *this;
}
- istream_scanner const &operator--() const {
+ istream_scanner const &operator--() {
input.putback(current);
return *this;
}
@@ -32,8 +32,8 @@
}
private:
- mutable std::basic_istream<CharType> &input;
- mutable value_t current;
+ std::basic_istream<CharType> &input;
+ value_t current;
};
}}} // scitbx::fortran_io::details
Modified: trunk/scitbx/fortran_io/details/numeric_extractors.h
===================================================================
--- trunk/scitbx/fortran_io/details/numeric_extractors.h 2010-05-30 21:58:41 UTC (rev 10796)
+++ trunk/scitbx/fortran_io/details/numeric_extractors.h 2010-05-30 21:58:58 UTC (rev 10797)
@@ -25,7 +25,7 @@
}
template <typename ScannerType>
- bool operator()(ScannerType const &scan) {
+ bool operator()(ScannerType &scan) {
Heir &heir = static_cast<Heir &>(*this);
for (; n < field_width; ++n, ++scan) {
if (scan.at_end()) {
@@ -140,7 +140,7 @@
{}
template <typename ScannerType>
- bool operator()(ScannerType const &scan) {
+ bool operator()(ScannerType &scan) {
fortran_decimal_extractor<FloatType> extract(
strict_width, field_width, frac_digits);
int exponent;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-30 21:58:47
|
Revision: 10796
http://cctbx.svn.sourceforge.net/cctbx/?rev=10796&view=rev
Author: luc_j_bourhis
Date: 2010-05-30 21:58:41 +0000 (Sun, 30 May 2010)
Log Message:
-----------
Spotted by clang: #include matrix_helpers where it is first used; add forgotten this->
Modified Paths:
--------------
trunk/scitbx/rigid_body/featherstone.h
trunk/scitbx/rigid_body/spatial_lib.h
trunk/scitbx/rigid_body/tardy.h
Modified: trunk/scitbx/rigid_body/featherstone.h
===================================================================
--- trunk/scitbx/rigid_body/featherstone.h 2010-05-30 21:58:20 UTC (rev 10795)
+++ trunk/scitbx/rigid_body/featherstone.h 2010-05-30 21:58:41 UTC (rev 10796)
@@ -2,7 +2,6 @@
#define SCITBX_RIGID_BODY_FEATHERSTONE_H
#include <scitbx/rigid_body/spatial_lib.h>
-#include <scitbx/rigid_body/matrix_helpers.h>
#include <scitbx/rigid_body/array_packing.h>
#include <scitbx/matrix/eigensystem.h>
#include <scitbx/array_family/versa_algebra.h>
Modified: trunk/scitbx/rigid_body/spatial_lib.h
===================================================================
--- trunk/scitbx/rigid_body/spatial_lib.h 2010-05-30 21:58:20 UTC (rev 10795)
+++ trunk/scitbx/rigid_body/spatial_lib.h 2010-05-30 21:58:41 UTC (rev 10796)
@@ -3,6 +3,7 @@
#include <scitbx/rotr3.h>
#include <scitbx/array_family/versa_matrix.h>
+#include <scitbx/rigid_body/matrix_helpers.h>
namespace scitbx { namespace rigid_body {
Modified: trunk/scitbx/rigid_body/tardy.h
===================================================================
--- trunk/scitbx/rigid_body/tardy.h 2010-05-30 21:58:20 UTC (rev 10795)
+++ trunk/scitbx/rigid_body/tardy.h 2010-05-30 21:58:41 UTC (rev 10796)
@@ -346,7 +346,7 @@
unsigned nb = this->bodies_size();
af::shared<af::small<ft, 7> > result((af::reserve(nb)));
af::shared<af::small<ft, 6> >
- tau_array = f_ext_as_tau(f_ext_array().const_ref());
+ tau_array = this->f_ext_as_tau(f_ext_array().const_ref());
for(unsigned ib=0;ib<nb;ib++) {
result.push_back(
this->bodies[ib]->joint->tau_as_d_e_pot_d_q(tau_array[ib]));
@@ -379,7 +379,7 @@
qdd_array()
{
if (!qdd_array_) {
- qdd_array_ = forward_dynamics_ab(
+ qdd_array_ = this->forward_dynamics_ab(
/*tau_array*/ af::const_ref<af::small<ft, 6> >(0, 0),
f_ext_array().const_ref(),
/*grav_accn*/ af::const_ref<ft>(0, 0));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-30 21:58:27
|
Revision: 10795
http://cctbx.svn.sourceforge.net/cctbx/?rev=10795&view=rev
Author: luc_j_bourhis
Date: 2010-05-30 21:58:20 +0000 (Sun, 30 May 2010)
Log Message:
-----------
Support for the clang compiler system
Modified Paths:
--------------
trunk/libtbx/SConscript
Modified: trunk/libtbx/SConscript
===================================================================
--- trunk/libtbx/SConscript 2010-05-30 17:32:40 UTC (rev 10794)
+++ trunk/libtbx/SConscript 2010-05-30 21:58:20 UTC (rev 10795)
@@ -130,7 +130,12 @@
"darwin_gcc-4.2", # tested with the "GCC 4.2 Developer Preview 1"
# distributed by Apple
# and the GCC 4.2 shipping with XCode 3.1
- #"darwin_llvm-gcc-4.2" ## under investigation ##
+ "darwin_clang", # as of June 2010, it can't compile it all:
+ # - problem with exception specifications in scitbx/error.h
+ # (bug reported: number 7258)
+ # - the code produced for matrix/eigensystem.h overflows
+ # (bug reported: number 7260)
+ # bug reports at http://llvm.org/bugs/
)
if (not env_etc.compiler in supported_compilers):
sys.tracebacklimit = 0
@@ -465,15 +470,18 @@
cxx = "c++"
else:
cc = env_etc.compiler.replace('darwin_','')
- cxx = cc.replace('gcc', 'g++')
- if env_etc.compiler.endswith("4.2"):
- if libtbx.env.build_options.enable_boost_threads:
- build_nb = libtbx.env_config.get_darwin_gcc_build_number(gcc=cxx)
- min_build_nb = 5564 # XCode 3.1 beta distributed as part of
- # the iPhone SDK and XCode 3.1
- if build_nb < min_build_nb:
- raise RuntimeError("Apple GCC 4.2 (build %i) incompatible with "
- "--enable_boost_threads" % build_nb)
+ if cc == 'clang':
+ cxx = 'clang++'
+ else:
+ cxx = cc.replace('gcc', 'g++')
+ if env_etc.compiler.endswith("4.2"):
+ if libtbx.env.build_options.enable_boost_threads:
+ build_nb = libtbx.env_config.get_darwin_gcc_build_number(gcc=cxx)
+ min_build_nb = 5564 # XCode 3.1 beta distributed as part of
+ # the iPhone SDK and XCode 3.1
+ if build_nb < min_build_nb:
+ raise RuntimeError("Apple GCC 4.2 (build %i) incompatible with "
+ "--enable_boost_threads" % build_nb)
link_flags = ["-w"] # suppress "source/lib does not exist" warning
if (env_etc.gcc_version >= 40201 and libtbx.env.build_options.force_32bit) :
link_flags.extend(["-arch", "i386"])
@@ -491,7 +499,7 @@
env_etc.ccflags_base = [
"-fPIC",
"-fno-strict-aliasing"]
- if (env_etc.gcc_version >= 40102):
+ if (cxx != 'clang++' and env_etc.gcc_version >= 40102):
env_etc.ccflags_base.append("-ftrapv")
if (libtbx.env.build_options.warning_level == 0):
warn_options = ["-w"]
@@ -512,10 +520,11 @@
if not libtbx.env.build_options.enable_boost_threads:
env_etc.cxxflags_base.append("-DBOOST_DISABLE_THREADS")
if (libtbx.env.build_options.optimization):
- opts = ["-DNDEBUG", "-O3", "-ffast-math"]
+ opts = ["-DNDEBUG", "-O3"]
+ if cxx != 'clang++': opts.append("-ffast-math")
if env_etc.gcc_version >= 40300:
opts.append("-fno-associative-math")
- opts.append("-ftrapping-math")
+ if cxx != 'clang++': opts.append("-ftrapping-math")
if (cxx == "c++"
and env_etc.gcc_version == 40000):
opts[1] = "-O2" # Apple's optimizer is broken
@@ -646,6 +655,9 @@
if (env_etc.compiler == "win32_cl" and env_base["MSVC_VERSION"] == "7.1"):
print "libtbx.scons: OpenMP is not available."
return
+ if env_etc.compiler == "darwin_clang":
+ print "libtbx.scons: OpenMP is not supported by clang yet."
+ return
if (libtbx.env.build_options.enable_boost_threads):
if (libtbx.env.build_options.enable_openmp_if_possible):
print "libtbx.scons: OpenMP is disabled because Boost.Thread is enabled."
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ant...@us...> - 2010-05-30 17:32:46
|
Revision: 10794
http://cctbx.svn.sourceforge.net/cctbx/?rev=10794&view=rev
Author: antonvila
Date: 2010-05-30 17:32:40 +0000 (Sun, 30 May 2010)
Log Message:
-----------
fixed the basepair library
Modified Paths:
--------------
trunk/mmtbx/pdb_distances.py
Modified: trunk/mmtbx/pdb_distances.py
===================================================================
--- trunk/mmtbx/pdb_distances.py 2010-05-30 00:57:37 UTC (rev 10793)
+++ trunk/mmtbx/pdb_distances.py 2010-05-30 17:32:40 UTC (rev 10794)
@@ -501,7 +501,7 @@
#Bond C A Length Ave Length Std Attribute
#1 N3 N6 unk unk
#2 O2 N1 unk unk
-bonds = [2, "A", "C", "N6", "N3", "N1", "O2", "NA", "NA", "NA", "NA", "NA", "NA"]
+bonds = [2, "A", "C", "N3", "N6", "O2", "N1", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
###i = 45 in MASTER_Basepairs (XXXI_GC)
XXX_GC = [] #XXX Base-pair between positions G1034 and C1028 of T. thermophilus 16S rRNA (E. coli numbering)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ant...@us...> - 2010-05-30 00:57:44
|
Revision: 10793
http://cctbx.svn.sourceforge.net/cctbx/?rev=10793&view=rev
Author: antonvila
Date: 2010-05-30 00:57:37 +0000 (Sun, 30 May 2010)
Log Message:
-----------
052910 few retouches
Modified Paths:
--------------
trunk/mmtbx/pdb_distances.py
Modified: trunk/mmtbx/pdb_distances.py
===================================================================
--- trunk/mmtbx/pdb_distances.py 2010-05-29 14:45:32 UTC (rev 10792)
+++ trunk/mmtbx/pdb_distances.py 2010-05-30 00:57:37 UTC (rev 10793)
@@ -330,7 +330,9 @@
#2 O2 N2 2.931 0.300 T
#3 N4 O6 3.075 0.310 T
#STATISTICAL DATA obtained from 2J02.pdb, 143 basepairs
-bonds = [3, "C", "G", "N3", "N1", "O2", "N2", "N4", "O6", 18.58, 0.900, 10.69, 0.241]
+#bonds = [3, "C", "G", "N3", "N1", "O2", "N2", "N4", "O6", 18.58, 0.900, 10.69, 0.241]
+#STATISTICAL DATA obtained from 4TNA.pdb, 6 basepairs
+bonds = [3, "C", "G", "N3", "N1", "O2", "N2", "N4", "O6", 18.62, 1.145, 10.87, 0.436]
MASTER_Basepairs_bonds.append(bonds)
###i = 24 in MASTER_Basepairs (XIX_GC_WC)
XIX_GC_WC = [] #XIX (Watson-Crick GC)
@@ -339,7 +341,9 @@
#2 N2 O2 2.922 0.267 T
#3 O6 N4 3.029 0.326 T
#STATISTICAL DATA obtained from 2J02.pdb, 157 basepairs
-bonds = [3, "G", "C", "N1", "N3", "N2", "O2", "O6", "N4", 18.49, 0.742, 10.64, 0.257]
+#bonds = [3, "G", "C", "N1", "N3", "N2", "O2", "O6", "N4", 18.49, 0.742, 10.64, 0.257]
+#STATISTICAL DATA obtained from 4TNA.pdb, 7 basepairs
+bonds = [3, "G", "C", "N1", "N3", "N2", "O2", "O6", "N4", 17.89, 1.160, 10.69, 0.390]
MASTER_Basepairs_bonds.append(bonds)
###i = 25 in MASTER_Basepairs (XX_AU_WC)
XX_AU_WC = [] #XX (Watson-Crick AU). Base-pairing pattern AU: AU_2
@@ -347,7 +351,9 @@
#1 N1 N3 2.927 0.216 T
#2 N6 O4 3.032 0.241 T
#STATISTICAL DATA obtained from 2J02.pdb, 21 basepairs
-bonds = [2, "A", "U", "N1", "N3", "N6", "O4", "NA", "NA", 18.68, 0.269, 10.67, 0.27]
+#bonds = [2, "A", "U", "N1", "N3", "N6", "O4", "NA", "NA", 18.68, 0.269, 10.67, 0.27]
+#STATISTICAL DATA obtained from 4TNA.pdb, 7 basepairs (AU and UA combined)
+bonds = [2, "A", "U", "N1", "N3", "N6", "O4", "NA", "NA", 18.46, 0.258, 10.726, 0.270]
MASTER_Basepairs_bonds.append(bonds)
###i = 26 in MASTER_Basepairs (XX_UA_WC)
XX_UA_WC = [] #XX (Watson-Crick UA). Base-pairing pattern UA: UA_2
@@ -355,7 +361,9 @@
#1 N3 N1 2.974 0.188 T
#2 O4 N6 3.140 0.269 T
#STATISTICAL DATA obtained from 2J02.pdb, 30 basepairs
-bonds = [2, "U", "A", "N3", "N1", "O4", "N6", "NA", "NA", 18.60, 0.816, 10.55, 0.298]
+#bonds = [2, "U", "A", "N3", "N1", "O4", "N6", "NA", "NA", 18.60, 0.816, 10.55, 0.298]
+#STATISTICAL DATA obtained from 4TNA.pdb, 7 basepairs (AU and UA combined)
+bonds = [2, "A", "U", "N3", "N1", "O4", "N6", "NA", "NA", 18.46, 0.258, 10.726, 0.270]
MASTER_Basepairs_bonds.append(bonds)
###i = 27 in MASTER_Basepairs (XXI_AU)
XXI_AU = [] #XXI (AU Reversed Watson-Crick). Base-pairing pattern AU: AU_30
@@ -518,26 +526,8 @@
#2 N3 N2 3.4 unk
bonds = [2, "G", "G", "N2", "N1", "N3", "N2", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
-###i = 48 in MASTER_Basepairs (XXXII_AU)
-XXXII_AU = [] #Base-pair between positions A31 and pseudouridine 39 in tRNAphe(4TNA.pdb)
-#Bond A U Length Ave Length Std Attribute
-#1 N6 O2 NA NA T
-#2 N1 N3 NA NA T
-#STATISTICAL DATA obtained from 2J02.pdb,7 basepairs
-bonds = [2, "A", "U", "N6", "O2", "N1", "N3", "NA", "NA", "NA", "NA", "NA", "NA"]
-MASTER_Basepairs_bonds.append(bonds)
-###i = 49 in MASTER_Basepairs (XXXII_UA)
-XXXII_UA = []#Base-pair between positions A31 and pseudouridine 39 in tRNAphe(4TNA.pdb)
-#Bond U A Length Ave Length Std Attribute
-#1 O2 N6 NA NA T
-#2 N3 N1 NA NA T
-#STATISTICAL DATA obtained from 2J02.pdb,7 basepairs
-bonds = [2, "U", "A", "O2", "N6", "N3", "N1", "NA", "NA", "NA", "NA", "NA", "NA"]
-MASTER_Basepairs_bonds.append(bonds)
-
-
########################### Basepair Lists SECTION #################################
#MASTER_Basepairs will be loaded after the sequential reading of First_List. This list is the output of FUNCTION "run(args)" with the lines carrying possible basepair bond information given the CUTOFF (search CUTOFF)
@@ -551,13 +541,13 @@
#k=6, distance
-MASTER_Basepairs_excluded = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+MASTER_Basepairs_excluded = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
#MASTER_Basepairs_schemes only carries strings with the names of the basepairing Schemes
-MASTER_Basepairs_schemes = ["I_AA", "II_AA", "III_GG", "IV_GG", "V_AA", "VI_GG", "VII_GG", "VIII_AG", "VIII_GA", "IX_AG", "IX_GA", "X_AG", "X_GA", "XI_AG", "XI_GA", "XII_UU", "XIII_UU", "XIV_CC", "XV_CC", "XVII_CU", "XVII_UC", "XVIII_CU", "XVIII_UC", "XIX_CG_WC", "XIX_GC_WC", "XX_AU_WC", "XX_UA_WC", "XXI_AU", "XXI_UA", "XXII_CG", "XXII_GC", "XXIII_AU", "XXIII_UA", "XXIV_AU", "XXIV_UA", "XXV_AC", "XXV_CA", "XXVI_AC", "XXVI_CA", "XXVII_GU", "XXVII_UG", "XXVIII_GU", "XXVIII_UG", "XXIX_AC", "XXIX_CA", "XXX_GC", "XXX_CG", "XXXI_GG", "XXXII_AU", "XXXII_UA"]
+MASTER_Basepairs_schemes = ["I_AA", "II_AA", "III_GG", "IV_GG", "V_AA", "VI_GG", "VII_GG", "VIII_AG", "VIII_GA", "IX_AG", "IX_GA", "X_AG", "X_GA", "XI_AG", "XI_GA", "XII_UU", "XIII_UU", "XIV_CC", "XV_CC", "XVII_CU", "XVII_UC", "XVIII_CU", "XVIII_UC", "XIX_CG_WC", "XIX_GC_WC", "XX_AU_WC", "XX_UA_WC", "XXI_AU", "XXI_UA", "XXII_CG", "XXII_GC", "XXIII_AU", "XXIII_UA", "XXIV_AU", "XXIV_UA", "XXV_AC", "XXV_CA", "XXVI_AC", "XXVI_CA", "XXVII_GU", "XXVII_UG", "XXVIII_GU", "XXVIII_UG", "XXIX_AC", "XXIX_CA", "XXX_GC", "XXX_CG", "XXXI_GG"]
#MASTER_Basepairs_summary: The lines in MASTER_Basepairs, carrying possible basepairing bonds, will be sorted into this list, once they have been confirmed as possible basepairs. Same format as MASTER_Basepairs
-MASTER_Basepairs_summary = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+MASTER_Basepairs_summary = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
##########################################################################
@@ -1074,9 +1064,9 @@
#LIST3 = atom
#place the atoms involved in the new bond just detected (currently in MASTER_Basepairs[i][j][2] and MASTER_Basepairs[i][j][5]. Distance is in MASTER_Basepairs[i][j][6]) into the proper location within MASTER_Basepairs_summary[i][k] (See MASTER_Basepairs_summary SCHEME) by first checking the location of these atoms in MASTER_Basepairs_bonds. There are several possibilities
#FOLLOW A LINE
- if (' 31 ' in LIST2) and (' 39 ' in LIST2):
- print "entering BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
- print "entering BOND_PLACING"
+# if (' 31 ' in LIST2) and (' 39 ' in LIST2):
+# print "entering BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
+# print "entering BOND_PLACING"
#FOLLOW A LINE
if LIST1[3] == LIST3[0] and LIST1[4] == LIST3[1]:
@@ -1095,9 +1085,9 @@
LIST2[15] = LIST3[2]
LIST2[6] = LIST2[6] + 1
#FOLLOW A LINE
- if (' 31 ' in LIST2) and (' 39 ' in LIST2):
- print "exiting BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
- print "exiting BOND_PLACING"
+# if (' 31 ' in LIST2) and (' 39 ' in LIST2):
+# print "exiting BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
+# print "exiting BOND_PLACING"
#FOLLOW A LINE
return LIST2
################################################
@@ -1120,7 +1110,11 @@
#A2 = convert[2]
#A3 = convert[3]
print "\n...using the C1\'-C1\' distance criterion"
- diffP_P = LIST1[16] - LIST2[9]
+ if LIST1[16] != []:
+ diffP_P = LIST1[16] - LIST2[9]
+ else:
+ LIST1[16] = LIST2[9] #To avoid crashes when a phosphate is missing, like at the 5' end of the molecule, an average value is given. This will solve problems as long as there is an average value in MASTER_Basepairs_bonds, so it could create problems for rare basepairs, but one would not expect such basepairs at the beginning of helices.
+ diffP_P = "NA"
diffC1_C1 = LIST1[17] - LIST2[11]
line = "The basepair formed by residues " + A0 + A1 + ":" + A2 + A3 + " displays a " + LIST1[0] + " geometry with a P-P distance of " + str(LIST1[16]) + " and a C1\'-C1\' distance of " + str(LIST1[17]) + ".\n Empirically determined average C1\'-C1\' distance for this geometry = " + str(LIST2[11]) + " + SD = " + str(LIST2[12]) + "\n Empirically determined average P-P distance for this geometry = " + str(LIST2[9]) + " + SD = " + str(LIST2[10])
print line
@@ -1395,7 +1389,7 @@
First_List_C1.append(First_List[a])
First_List = First_List_smaller
- MASTER_Basepairs = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+ MASTER_Basepairs = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
#####################################
#FUNCTION "Program". Section: First sorting of basepair candidates BEGINNING
@@ -1405,8 +1399,8 @@
collect = []
for i in range (1, len(First_List)):
#FOLLOW A LINE
- if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
- print "First_List[i] ", First_List[i]
+# if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+# print "First_List[i] ", First_List[i]
#FOLLOW A LINE
if First_List[i][0] != First_List[i][3]:
for j in range(len(MASTER_Basepairs)):
@@ -1415,8 +1409,8 @@
count = 0
transient = MASTER_Basepairs_bonds[j][3:9]
#FOLLOW A LINE
- if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
- print "transient", transient, "\nMASTER_Basepairs_bonds[j]", MASTER_Basepairs_bonds[j]
+# if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+# print "transient", transient, "\nMASTER_Basepairs_bonds[j]", MASTER_Basepairs_bonds[j]
#FOLLOW A LINE
#Matching the ATOMS to those of MASTER_Basepairs_bonds
for k in range ((len(transient)/2)):
@@ -1425,19 +1419,19 @@
collect = [First_List[i][0], First_List[i][1], First_List[i][2], First_List[i][3], First_List[i][4], First_List[i][5], First_List[i][6]]
MASTER_Basepairs[j].append(collect)
#FOLLOW A LINE
- if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
- print "\nMASTER_Basepairs_schemes[j]", MASTER_Basepairs_schemes[j]
- print "MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]", MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]
+# if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+# print "\nMASTER_Basepairs_schemes[j]", MASTER_Basepairs_schemes[j]
+# print "MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]", MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]
#FOLLOW A LINE
elif (transient[2*k] in First_List[i][2]) and (transient[2*k + 1] in First_List[i][5]) and (First_List[i][6] > CUTOFF) and (MAX_CUTOFF_str[0:3] in CUTOFF_str[0:3]):
collect = [First_List[i][0], First_List[i][1], First_List[i][2], First_List[i][3], First_List[i][4], First_List[i][5], First_List[i][6], MASTER_Basepairs_schemes[j]]
MASTER_Basepairs_excluded[j].append(collect)
#FOLLOW A LINE
- if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
- for q in range (len(MASTER_Basepairs_excluded[j])):
- print "MASTER_Basepairs_excluded[j][q]", MASTER_Basepairs_excluded[j][q]
- print "MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]", MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]
+# if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+# for q in range (len(MASTER_Basepairs_excluded[j])):
+# print "MASTER_Basepairs_excluded[j][q]", MASTER_Basepairs_excluded[j][q]
+# print "MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]", MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]
#FOLLOW A LINE
count = count + 1
collect = []
@@ -1493,9 +1487,9 @@
if (resid[1] - resid[0] > 1) or (resid[1] - resid[0] < -1):
#FOLLOW A LINE
- if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
- print "\nBefore Second sorting: MASTER_Basepairs[i][j]", MASTER_Basepairs_schemes[i], MASTER_Basepairs[i][j], "atom", atom
- print "i", i, "j", j, "MASTER_Basepairs_schemes[i]", MASTER_Basepairs_schemes[i], "MASTER_Basepairs_bonds[i]", MASTER_Basepairs_bonds[i]
+# if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
+# print "\nBefore Second sorting: MASTER_Basepairs[i][j]", MASTER_Basepairs_schemes[i], MASTER_Basepairs[i][j], "atom", atom
+# print "i", i, "j", j, "MASTER_Basepairs_schemes[i]", MASTER_Basepairs_schemes[i], "MASTER_Basepairs_bonds[i]", MASTER_Basepairs_bonds[i]
#FOLLOW A LINE
if (len(MASTER_Basepairs_summary[i]) > 0):
@@ -1512,8 +1506,8 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][k] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][k], atom)
#FOLLOW A LINE
- if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
- print "new bond for the basepair: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
+# if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
+# print "new bond for the basepair: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
#FOLLOW A LINE
@@ -1524,8 +1518,8 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][len(MASTER_Basepairs_summary[i])-1] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][len(MASTER_Basepairs_summary[i])-1], atom)
#FOLLOW A LINE
- if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
- print "New basepair detected for a basepairing Scheme: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
+# if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
+# print "New basepair detected for a basepairing Scheme: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
#FOLLOW A LINE
#First basepair for this basepairing Scheme
@@ -1535,8 +1529,8 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][0] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][0], atom)
#FOLLOW A LINE
- if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
- print "First basepair for this basepairing Scheme: MASTER_Basepairs_summary[i][0]", MASTER_Basepairs_summary[i][0]
+# if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
+# print "First basepair for this basepairing Scheme: MASTER_Basepairs_summary[i][0]", MASTER_Basepairs_summary[i][0]
#FOLLOW A LINE
#####################################
# FUNCTION "Program". Section: Second sorting of basepair candidates END
@@ -2093,7 +2087,7 @@
#################################
#####SECTION FUNCTION "DECISSIONS" BEGINNING
-def DECISSION(LIST1, LIST2, A0, A1, A2, A3, A4, A5, A6, A7, removed, undetermined):
+def DECISSION(LIST1, LIST2, A0, A1, A2, A3, A4, A5, A6, A7, removed, undetermined, two_base_shared):
#LIST1 and LIST2 can either be MASTER_Basepairs_summary[i][j] or MASTER_Basepairs_summary[l][m] depending on their scores
#A0 = convert[0]
#A1 = convert[1]
@@ -2104,9 +2098,13 @@
#A6 = convert[6]
#A7 = convert[7]
if undetermined == 'n':
- line = "The basepair formed by residues " + A4 + A5 + ":" + A6 + A7 + " and with geometry " + LIST2[0] + " will be assigned as 'FALSE'. Please inspect this basepair and its surroundings for the presence of additional misassigned basepairs"
+ if two_base_shared == "n":
+ line = "The basepair formed by residues " + A4 + A5 + ":" + A6 + A7 + " and with geometry " + LIST2[0] + " will be assigned as 'FALSE'. Please inspect this basepair and its surroundings for the presence of additional misassigned basepairs"
+ LIST2.append('FALSE')
+ else:
+ line = "The basepair formed by residues " + A4 + A5 + ":" + A6 + A7 + " and with geometry " + LIST2[0] + " will be assigned as 'WRONG'. Please inspect this basepair and its surroundings for the presence of additional misassigned basepairs"
+ LIST2.append('WRONG')
print line
- LIST2.append('FALSE')
line = "The basepair formed by residues " + A0 + A1 + ":" + A2 + A3 + " and with geometry " + LIST1[0] + " will be assigned as 'LEGITIMATE'"
print line
print "################"
@@ -2127,14 +2125,6 @@
#####MAIN part of SECTION DETECTION OF FALSE BASEPAIRS
#MASTER_Basepairs_summary_bak = MASTER_Basepairs_summary
print "SEARCHING FOR ERRONEOUSLY ASSIGNED BASEPAIRS"
-#where_from = "postcontrol"
-#for i in range (len(MASTER_Basepairs_summary)):
-# if (len(MASTER_Basepairs_summary[i]) > 0):
-# for j in range (len(MASTER_Basepairs_summary[i])):
-# if (MASTER_Basepairs_bonds[i][9] != 'NA') and (('FALSE' not in MASTER_Basepairs_summary[i][j]) and ('UNDETERMINED' not in MASTER_Basepairs_summary[i][j]) and ('REMOVED' not in MASTER_Basepairs_summary[i][j])) and (('D' in MASTER_Basepairs_summary[i][j]) or ('MH' in MASTER_Basepairs_summary[i][j]) or ('ELI' in MASTER_Basepairs_summary[i][j])):
-# list = [MASTER_Basepairs_summary[i][j][2], MASTER_Basepairs_summary[i][j][3], MASTER_Basepairs_summary[i][j][4], MASTER_Basepairs_summary[i][j][5]]
-# convert = CONVERT(list)
-# MASTER_Basepairs_summary[i][j] = C1_C1_DISTANCE(MASTER_Basepairs_summary[i][j], MASTER_Basepairs_bonds[i], convert[0], convert[1], convert[2], convert[3], where_from)
CONTINUITY_HELICITY_CRITERION_output = [] #Will collect the output of 'FUNCTION CONTINUITY_HELICITY_CRITERION'
while_control = 'y' #Will end the next 'while' loop when == 'n'
@@ -2161,11 +2151,11 @@
for j in range (len(MASTER_Basepairs_summary[i])):
- if (('REMOVED' not in MASTER_Basepairs_summary[i][j]) and ('FALSE' not in MASTER_Basepairs_summary[i][j]) and ('UNDETERMINED' not in MASTER_Basepairs_summary[i][j])) and (('D' in MASTER_Basepairs_summary[i][j]) or ('MH' in MASTER_Basepairs_summary[i][j]) or ('ELI' in MASTER_Basepairs_summary[i][j])):
+ if (('REMOVED' not in MASTER_Basepairs_summary[i][j]) and ('FALSE' not in MASTER_Basepairs_summary[i][j]) and ('WRONG' not in MASTER_Basepairs_summary[i][j]) and ('UNDETERMINED' not in MASTER_Basepairs_summary[i][j])) and (('D' in MASTER_Basepairs_summary[i][j]) or ('MH' in MASTER_Basepairs_summary[i][j]) or ('ELI' in MASTER_Basepairs_summary[i][j])):
for l in range (len(MASTER_Basepairs_summary)):
if (len(MASTER_Basepairs_summary[l]) > 0):
for m in range (len(MASTER_Basepairs_summary[l])):
- if (('REMOVED' not in MASTER_Basepairs_summary[i][j]) and ('FALSE' not in MASTER_Basepairs_summary[l][m]) and ('UNDETERMINED' not in MASTER_Basepairs_summary[l][m])) and (('D' in MASTER_Basepairs_summary[l][m]) or ('MH' in MASTER_Basepairs_summary[l][m]) or ('ELI' in MASTER_Basepairs_summary[l][m])):
+ if (('REMOVED' not in MASTER_Basepairs_summary[i][j]) and ('FALSE' not in MASTER_Basepairs_summary[l][m]) and ('WRONG' not in MASTER_Basepairs_summary[l][m]) and ('UNDETERMINED' not in MASTER_Basepairs_summary[l][m])) and (('D' in MASTER_Basepairs_summary[l][m]) or ('MH' in MASTER_Basepairs_summary[l][m]) or ('ELI' in MASTER_Basepairs_summary[l][m])):
list = [MASTER_Basepairs_summary[i][j][2], MASTER_Basepairs_summary[i][j][3], MASTER_Basepairs_summary[i][j][4], MASTER_Basepairs_summary[i][j][5], MASTER_Basepairs_summary[l][m][2], MASTER_Basepairs_summary[l][m][3], MASTER_Basepairs_summary[l][m][4], MASTER_Basepairs_summary[l][m][5]]
convert = CONVERT(list)
SCORE = [[],[],[]] #To keep track of the performance of the debated basepairs in each of the three CRITERIA that will be used to sort out their legitimacy. FORMAT: 'SCORE[0] will be used for CONTINUITY_HELICITY_CRITERION', 'SCORE[1] will be used for CUTOFF_CRITERION', and 'SCORE[2] will be used for BOND_CRITERION'
@@ -2181,7 +2171,7 @@
######CASE 1: Only one base is shared. Most of the times this is the case.
#In this case there are three criteria that could be used to sort out which of the two is 'LEGITIMATE' and which one is 'FALSE'.
if single_base_shared == 'y':
- line = "\n################\nBasepair, " + convert[0] + convert[1] + ":" + convert[2] + convert[3] + " and basepair " + convert[4] + convert[5] + ":" + convert[6] + convert[7] + " share one base!!!!!!\nAttempting to deconvolute these two basepairs with " + stringency + " stringency by"
+ line = "\n################\nBasepair, " + convert[0] + convert[1] + ":" + convert[2] + convert[3] + " with geometry " + MASTER_Basepairs_summary[i][j][0] + " and basepair " + convert[4] + convert[5] + ":" + convert[6] + convert[7] + " with geometry " + MASTER_Basepairs_summary[l][m][0] + " share one base!!!!!!\nAttempting to deconvolute these two basepairs with " + stringency + " stringency by"
print line
#CRITERION #1: CONTINUITY_HELICITY_CRITERION: Checking helicity of the basepair. This is done in 'FUNCTION CONTINUITY_HELICITY_CRITERION', where the basepair will be assigned a number between '0' and '2' depending on the number of helical elements that are continuous with it. HIGHEST PRIORITY!!
@@ -2230,22 +2220,22 @@
if (stringency == 'HIGH'):
undetermined = 'n'
if score[0] >= 7:
- decission = DECISSION(MASTER_Basepairs_summary[i][j], MASTER_Basepairs_summary[l][m], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined)
+ decission = DECISSION(MASTER_Basepairs_summary[i][j], MASTER_Basepairs_summary[l][m], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined, two_base_shared)
elif score[1] >= 7:
- decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[4], convert[5], convert[6], convert[7], convert[0], convert[1], convert[2], convert[3], removed, undetermined)
+ decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[4], convert[5], convert[6], convert[7], convert[0], convert[1], convert[2], convert[3], removed, undetermined, two_base_shared)
# print "END DECISSIONS with stringency HIGH: removed", removed, "MASTER_Basepairs_summary[i][j] ", MASTER_Basepairs_summary[i][j], "\nMASTER_Basepairs_summary[l][m] ", MASTER_Basepairs_summary[l][m]
elif (stringency == 'LOW'):
if score[0] > score[1]:
# print "score[0] > score[1]"
undetermined = 'n'
- decission = DECISSION(MASTER_Basepairs_summary[i][j], MASTER_Basepairs_summary[l][m], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined)
+ decission = DECISSION(MASTER_Basepairs_summary[i][j], MASTER_Basepairs_summary[l][m], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined, two_base_shared)
elif score[0] < score[1]:
# print "score[0] < score[1]"
undetermined = 'n'
- decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[4], convert[5], convert[6], convert[7], convert[0], convert[1], convert[2], convert[3], removed, undetermined)
+ decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[4], convert[5], convert[6], convert[7], convert[0], convert[1], convert[2], convert[3], removed, undetermined, two_base_shared)
else:
undetermined = 'y'
- decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined)
+ decission = DECISSION(MASTER_Basepairs_summary[l][m], MASTER_Basepairs_summary[i][j], convert[0], convert[1], convert[2], convert[3], convert[4], convert[5], convert[6], convert[7], removed, undetermined, two_base_shared)
if decission != []:
MASTER_Basepairs_summary[i][j] = decission[0]
@@ -2362,7 +2352,7 @@
def DIFF_CALC(ARR1, ARR2, LIST1, LIST2):
#ARR1 = new_list_end_floats[b,:]
#ARR2 = STATS[c,:]
-#LIST1 = can be 'new_list_end[b]',falsely_assigned[b]
+#LIST1 = can be 'new_list_end[b]',falsely_assigned[b], wrongly_assigned[b]
#LIST2 = MASTER_Basepairs_bonds[c]
# print "ARR1", ARR1, "ARR2", ARR2, "\LIST1", LIST1
diff_1 = str(ARR1[0] - ARR2[0])
@@ -2573,22 +2563,24 @@
# print "AFTER append new_list_end[count_for][missing[2]+1]", new_list_end[count_for][missing[2]+1]
line1 = line1 + new_list_end[count_for][l] + ' '
#Formatting the method ('MH', 'D', 'ELI'), carried in new_list_end[count_for][len(new_list_end[count_for])-3], after appending the 'MULTIPLE CONTACTS' information, right above
- if 'FALSE' in new_list_end[count_for]:
+ if ('FALSE' in new_list_end[count_for]) or ('WRONG' in new_list_end[count_for]):
new_list_end[count_for][len(new_list_end[count_for])-3] = ADD_SPACES(new_list_end[count_for][len(new_list_end[count_for])-3], key[17])
line1 = line1 + new_list_end[count_for][len(new_list_end[count_for])-3] + ' '
else:
new_list_end[count_for][len(new_list_end[count_for])-2] = ADD_SPACES(new_list_end[count_for][len(new_list_end[count_for])-2], key[17])
line1 = line1 + new_list_end[count_for][len(new_list_end[count_for])-2] + ' '
#Formatting the cutoff, carried in new_list_end[count_for][len(new_list_end[count_for])-2], after appending the 'MULTIPLE CONTACTS' information, right above
- if 'FALSE' in new_list_end[count_for]:
+ if ('FALSE' in new_list_end[count_for]) or ('WRONG' in new_list_end[count_for]):
line1 = line1 + new_list_end[count_for][len(new_list_end[count_for])-2] + ' '
else:
line1 = line1 + new_list_end[count_for][len(new_list_end[count_for])-1] + ' '
#Formatting the MULTIPLE CONTACTS information ('0' or '1'), carried in new_list_end[count_for][len(new_list_end[count_for])-3], or at new_list_end[count_for][len(new_list_end[count_for])-4] if the basepair was assigned by 'MH' or 'ELI'. To make it simpler later, the '0' or '1' will be switched to 'NO' or 'YES' and the formatted string will be appended at the end of 'new_list_end[count_for]'
- if ('FALSE' in new_list_end[count_for]) or ('UNDETERMINED' in new_list_end[count_for]):
+ if ('FALSE' in new_list_end[count_for]) or ('WRONG' in new_list_end[count_for]) or ('UNDETERMINED' in new_list_end[count_for]):
place = 4
if ('FALSE' in new_list_end[count_for]):
ending = ' FALSE'
+ elif ('WRONG' in new_list_end[count_for]):
+ ending = 'WRONG'
elif ('UNDETERMINED' in new_list_end[count_for]):
ending = ' UNDETERMINED'
else:
@@ -2620,6 +2612,7 @@
#################Transferring the list of ORDERED and FORMATTED basepairs to run_cutoff_LISTS, in which they will be further order by CUTOFF. Also 'FALSE', 'LEGITIMATE', and 'UNDETERMINED' basepairs get transferred to corresponding lists
LEGITIMATE_tagged = [] #Will collect basepairs with a 'LEGITIMATE' tag from MASTER_Basepairs_summary, from largest first residue to smallest
falsely_assigned = [] #Will collect FALSE basepairs from MASTER_Basepairs_summary, from largest first residue to smallest
+wrongly_assigned = [] #Will collect basepairs with 'WRONG' geometry from MASTER_Basepairs_summary, from largest first residue to smallest
undetermined = [] #Will collect 'UNDETERMINED' basepairs from MASTER_Basepairs_summary, from largest first residue to smallest
missing_bond = [] #Will collect basepairs with missing bonds. Tagged as " miss"
file = [[], []]
@@ -2637,7 +2630,7 @@
for h in range (len(run_cutoff)/2):
run_cutoff_LISTS.append([])
for b in range (len(new_list_end)):
- if 'REMOVED' not in new_list_end[b] and'FALSE' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b] and " miss" not in new_list_end[b]:
+ if 'REMOVED' not in new_list_end[b] and 'FALSE' not in new_list_end[b] and 'WRONG' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b] and " miss" not in new_list_end[b]:
PYMOL_OUTPUT(new_list_end[b], b, pdb_file_main, From, file)
if ('LEGITIMATE' in new_list_end[b]):
LEGITIMATE_tagged.append(new_list_end[b])
@@ -2645,6 +2638,9 @@
elif ('FALSE' in new_list_end[b]):
falsely_assigned.append(new_list_end[b])
falsely_assigned[len(falsely_assigned)-1].append(b) #For easy future access to the corresponding line in 'new_list_end'
+ elif ('WRONG' in new_list_end[b]):
+ wrongly_assigned.append(new_list_end[b])
+ wrongly_assigned[len(wrongly_assigned)-1].append(b) #For easy future access to the corresponding line in 'new_list_end'
elif ('UNDETERMINED' in new_list_end[b]):
undetermined.append(new_list_end[b])
undetermined[len(undetermined)-1].append(b) #For easy future access to the corresponding line in 'new_list_end'
@@ -2652,7 +2648,7 @@
missing_bond.append(new_list_end[b])
missing_bond[len(missing_bond)-1].append(b) #For easy future access to the corresponding line in 'new_list_end'
for h in range (len(run_cutoff_LISTS)):
- if run_cutoff[h*2 + 1] in new_list_end[b] and ('REMOVED' not in new_list_end[b]) and ('FALSE' not in new_list_end[b]) and ('UNDETERMINED' not in new_list_end[b]) and " miss" not in new_list_end[b]:
+ if run_cutoff[h*2 + 1] in new_list_end[b] and ('REMOVED' not in new_list_end[b]) and ('FALSE' not in new_list_end[b]) and ('WRONG' not in new_list_end[b]) and ('UNDETERMINED' not in new_list_end[b]) and " miss" not in new_list_end[b]:
run_cutoff_LISTS[h].append(new_list_end[b])
basepair_count = basepair_count + 1
@@ -2744,7 +2740,33 @@
print "Number of FALSELY ASSIGNED BASEPAIRS =", len(falsely_assigned)
CLOSE(file)
-##### 4) LIST OF UNDETERMINED BASEPAIRS BEGINNING
+##### 4) LIST OF BASEPAIRS WITH WRONG GEOMETRY
+if wrongly_assigned != []:
+ file = [[], []]
+ pymol1 = directory + "/" + pdb_file_main + "_WRONG-basepairs" + "_PYMOL" + "_script.pml"
+ file[1] = open(pymol1, 'w')
+ line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
+ file[1].write(line1)
+ color = 'RED'
+ From = ''
+
+ print "\n\nLIST OF BASEPAIRS WITH WRONG GEOMETRY"
+ print "==============================================================================="
+ print " Scheme Resid Base Resid Base Expect. Found ATOM ATOM DIST. Method M.I."
+ print " #1 #1 #2 #2 Bonds Bonds #1 #2"
+ print "==============================================================================="
+ for h in range (len(wrongly_assigned)):
+ PYMOL_OUTPUT(wrongly_assigned[h], h, pdb_file_main, From, file)
+ print wrongly_assigned[h][0], " ", wrongly_assigned[h][2], " ", wrongly_assigned[h][3], " ", wrongly_assigned[h][4], " ", wrongly_assigned[h][5], " ", wrongly_assigned[h][1], " ", wrongly_assigned[h][6], " ", wrongly_assigned[h][7], " ", wrongly_assigned[h][8], wrongly_assigned[h][9], " ", wrongly_assigned[h][len(wrongly_assigned[h])-5], wrongly_assigned[h][len(wrongly_assigned[h])-2]
+ print " ", wrongly_assigned[h][10], " ", wrongly_assigned[h][11], wrongly_assigned[h][12]
+ print " ", wrongly_assigned[h][13], " ", wrongly_assigned[h][14], wrongly_assigned[h][15]
+ print "==============================================================================="
+ print "############### '*' notes bonds with length larger tan maximum distance cutoff ###############"
+ print "Number of BASEPAIRS WITH WRONG GEOMETRY =", len(wrongly_assigned)
+ CLOSE(file)
+
+
+##### 5) LIST OF UNDETERMINED BASEPAIRS BEGINNING
if undetermined != []:
file = [[], []]
pymol1 = directory + "/" + pdb_file_main + "_UNDETERMINED-basepairs" + "_PYMOL" + "_script.pml"
@@ -2767,9 +2789,9 @@
print "Number of BASE-SHARING BASEPAIRS THAT CANNOT BE DECONVOLUTED =", len(undetermined)
print "############### '*' notes bonds with length larger tan maximum distance cutoff ###############"
CLOSE(file)
-##### 4) LIST OF UNDETERMINED BASEPAIRS END
+##### 5) LIST OF UNDETERMINED BASEPAIRS END
-##### 5) LIST OF MISSING-BOND BASEPAIRS BEGINNING
+##### 6) LIST OF MISSING-BOND BASEPAIRS BEGINNING
if missing_bond != []:
file = [[], []]
pymol1 = directory + "/" + pdb_file_main + "_MISSING-BOND-basepairs" + "_PYMOL" + "_script.pml"
@@ -2792,11 +2814,11 @@
print "Number of MISSING-BOND BASEPAIRS =", len(missing_bond)
print "############### 'NF' notes Not-found bond ###############"
CLOSE(file)
-##### 5) LIST OF MISSING-BOND BASEPAIRS END
+##### 6) LIST OF MISSING-BOND BASEPAIRS END
-##### 6) LIST OF BASEPAIRS BY GEOMETRY BEGINNIG
+##### 7) LIST OF BASEPAIRS BY GEOMETRY BEGINNIG
###BOND STATISTICS. Important arrays:
# new_list_end_floats = numpy.zeros(4 * len(new_list_end)).reshape(len(new_list_end), 4) #Will have as many lines as 'new_list_end', so it can be accessed just like 'new_list_end, but will carry only the bond- and P-distances as float, so they can be used in statistical operations
#Defined in Subsection "DELETING UNWANTED SPACES and SAVING THE DISTANCE AS FLOATS" above
@@ -2824,7 +2846,7 @@
# print "MASTER_Basepairs_schemes[a]", MASTER_Basepairs_schemes[a]
for e in range (len(new_list_end)):
# print "OUTSIDE \"for e\" new_list_end[e]", new_list_end[e]
- if MASTER_Basepairs_schemes[a] in new_list_end[e][0] and 'REMOVED' not in new_list_end[e] and 'FALSE' not in new_list_end[e] and 'UNDETERMINED' not in new_list_end[e] and 'miss' not in new_list_end[e]:
+ if MASTER_Basepairs_schemes[a] in new_list_end[e][0] and 'REMOVED' not in new_list_end[e] and 'FALSE' not in new_list_end[e] and 'WRONG' not in new_list_end[e] and 'UNDETERMINED' not in new_list_end[e] and 'miss' not in new_list_end[e]:
# print "IN \"for e\" new_list_end[e]", new_list_end[e]
SUM.append(new_list_end_floats[e,:])
counter = counter + 1
@@ -2868,11 +2890,11 @@
print " Scheme Resid Base Resid Base Expect. Found ATOM ATOM DIST. DIFF. DIST DIFF. DIST DIFF."
print " #1 #1 #2 #2 Bonds Bonds #1 #2 BOND P-P C1'-C1'"
print "======================================================================================================="
- if 'REMOVED' not in new_list_end[b] and 'FALSE' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b]:
+ if 'REMOVED' not in new_list_end[b] and 'FALSE' not in new_list_end[b] and 'WRONG' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b]:
geometry_counter_real = geometry_counter_real + 1
list = DIFF_CALC(new_list_end_floats[b,:], STATS[c,:], new_list_end[b], MASTER_Basepairs_bonds[c])
- if geometry_counter_real > 0 and 'REMOVED' not in new_list_end[b] and 'FALSE' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b]:
+ if geometry_counter_real > 0 and 'REMOVED' not in new_list_end[b] and 'FALSE' not in new_list_end[b] and 'WRONG' not in new_list_end[b] and 'UNDETERMINED' not in new_list_end[b]:
list = [str(STATS[c,0]), str(STATS[c,1]), str(STATS[c,2]), str(STATS[c,3]), str(STATS[c,4]), str(STATS[c,5]), str(STATS[c,6]), str(STATS[c,7]), str(STATS[c,8]), str(STATS[c,9])]
print "PRECALCULATED STATISTICAL DATA:", "\nP-to-P distance =", MASTER_Basepairs_bonds[c][9], " SD =", MASTER_Basepairs_bonds[c][10], "\nC1\'-to-C1\' distance =", MASTER_Basepairs_bonds[c][11], " SD =", MASTER_Basepairs_bonds[c][12]
print "STATISTICAL DATA FROM CURRENT STRUCTURE:", "\nBond1: MEAN =", list[0][:5], "SD =", list[1][:5], "\nBond2: MEAN =", list[2][:5], " SD =", list[3][:5], "\nBond3: MEAN =", list[4][:5], " SD =", list[5][:5], "\nP-to-P distance =", list[6][:5], " SD =", list[7][:5], "\nC1\'-to-C1\' distance =", list[8][:5], " SD =", list[9][:5]
@@ -2903,7 +2925,7 @@
print "==============================================================================="
-#### 5) LIST OF BASEPAIRS BY GEOMETRY END
+#### 7) LIST OF BASEPAIRS BY GEOMETRY END
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-29 14:45:38
|
Revision: 10792
http://cctbx.svn.sourceforge.net/cctbx/?rev=10792&view=rev
Author: luc_j_bourhis
Date: 2010-05-29 14:45:32 +0000 (Sat, 29 May 2010)
Log Message:
-----------
Pass the same -Defines to pch build as to shared boost python libs, thus elmininating warning about redefined macros emitted for each and every boost python extension
Modified Paths:
--------------
trunk/boost_adaptbx/SConscript
Modified: trunk/boost_adaptbx/SConscript
===================================================================
--- trunk/boost_adaptbx/SConscript 2010-05-29 01:58:49 UTC (rev 10791)
+++ trunk/boost_adaptbx/SConscript 2010-05-29 14:45:32 UTC (rev 10792)
@@ -54,7 +54,8 @@
env_no_includes_boost_python_ext.Append(
LIBPATH=env_etc.libpath_python)
env_no_includes_boost_python_ext.Append(
- SHCXXFLAGS=env_etc.cxxflags_bpl_defines_base)
+ SHCXXFLAGS=env_etc.cxxflags_bpl_defines_base,
+ PCHPDBFLAGS=env_etc.cxxflags_bpl_defines_base)
env_no_includes_boost_python_ext.Replace(
SHLIBSUFFIX=env_etc.extension_module_suffix)
if (env_etc.compiler == "win32_cl" and env_etc.have_manifest_tool):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ant...@us...> - 2010-05-29 01:58:56
|
Revision: 10791
http://cctbx.svn.sourceforge.net/cctbx/?rev=10791&view=rev
Author: antonvila
Date: 2010-05-29 01:58:49 +0000 (Sat, 29 May 2010)
Log Message:
-----------
added the capability to write files in other directories and added pseudouridine basepairs
Modified Paths:
--------------
trunk/mmtbx/pdb_distances.py
Modified: trunk/mmtbx/pdb_distances.py
===================================================================
--- trunk/mmtbx/pdb_distances.py 2010-05-28 22:46:26 UTC (rev 10790)
+++ trunk/mmtbx/pdb_distances.py 2010-05-29 01:58:49 UTC (rev 10791)
@@ -212,7 +212,7 @@
#1 N1 N1 2.88 0.15 T
#2 O6 N6 2.95 0.21 T
#STATISTICAL DATA obtained from 2J02.pdb, 11 basepairs. Combined VIII_AG and VIII_GA. Needs to be revised
-bonds = [2, "A", "G", "N1", "N1", "N6", "O6", "NA", "NA", 19.598, 1.085, 12.795, 0.222]
+bonds = [2, "G", "A", "N1", "N1", "O6", "N6", "NA", "NA", 19.598, 1.085, 12.795, 0.222]
MASTER_Basepairs_bonds.append(bonds)
###i = 9 in MASTER_Basepairs (IX_AG)
IX_AG = [] #IX Base-pairing pattern AG: AG_81
@@ -489,14 +489,14 @@
bonds = [2, "A", "C", "N6", "N3", "N1", "O2", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
###i = 44 in MASTER_Basepairs (XXX_CA)
-XXIX_CA = [] #XXX (CA Wobble). Base-pairing pattern CA
+XXIX_CA = [] #XXIX (CA Wobble). Base-pairing pattern CA
#Bond C A Length Ave Length Std Attribute
#1 N3 N6 unk unk
#2 O2 N1 unk unk
bonds = [2, "A", "C", "N6", "N3", "N1", "O2", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
###i = 45 in MASTER_Basepairs (XXXI_GC)
-XXX_GC = [] #XXXI Base-pair between positions G1034 and C1028 of T. thermophilus 16S rRNA (E. coli numbering)
+XXX_GC = [] #XXX Base-pair between positions G1034 and C1028 of T. thermophilus 16S rRNA (E. coli numbering)
#Bond G C Length Ave Length Std Attribute
#1 N2 N4 3.1 unk
#2 N3 N3 3.2 unk
@@ -504,7 +504,7 @@
bonds = [2, "G", "C", "N2", "N4", "N3", "N3", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
###i = 46 in MASTER_Basepairs (XXXII_CG)
-XXX_CG = [] #XXXII Base-pair between positions G1034 and C1028 of T. thermophilus 16S rRNA (E. coli numbering)
+XXX_CG = [] #XXX Base-pair between positions G1034 and C1028 of T. thermophilus 16S rRNA (E. coli numbering)
#Bond C G Length Ave Length Std Attribute
#1 N4 N2 3.1 unk
#2 N3 N3 3.2 unk
@@ -512,12 +512,28 @@
bonds = [2, "C", "G", "N4", "N2", "N3", "N3", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
###i = 47 in MASTER_Basepairs (XXXIII_GG)
-XXXI_GG = [] #XXXIII Base-pair between positions G1030A and C1031 of T. thermophilus 16S rRNA (E. coli numbering)
+XXXI_GG = [] #XXXI Base-pair between positions G1030A and C1031 of T. thermophilus 16S rRNA (E. coli numbering)
#Bond G G Length Ave Length Std Attribute
#1 N2 N1 2.9 unk
#2 N3 N2 3.4 unk
bonds = [2, "G", "G", "N2", "N1", "N3", "N2", "NA", "NA", "NA", "NA", "NA", "NA"]
MASTER_Basepairs_bonds.append(bonds)
+###i = 48 in MASTER_Basepairs (XXXII_AU)
+XXXII_AU = [] #Base-pair between positions A31 and pseudouridine 39 in tRNAphe(4TNA.pdb)
+#Bond A U Length Ave Length Std Attribute
+#1 N6 O2 NA NA T
+#2 N1 N3 NA NA T
+#STATISTICAL DATA obtained from 2J02.pdb,7 basepairs
+bonds = [2, "A", "U", "N6", "O2", "N1", "N3", "NA", "NA", "NA", "NA", "NA", "NA"]
+MASTER_Basepairs_bonds.append(bonds)
+###i = 49 in MASTER_Basepairs (XXXII_UA)
+XXXII_UA = []#Base-pair between positions A31 and pseudouridine 39 in tRNAphe(4TNA.pdb)
+#Bond U A Length Ave Length Std Attribute
+#1 O2 N6 NA NA T
+#2 N3 N1 NA NA T
+#STATISTICAL DATA obtained from 2J02.pdb,7 basepairs
+bonds = [2, "U", "A", "O2", "N6", "N3", "N1", "NA", "NA", "NA", "NA", "NA", "NA"]
+MASTER_Basepairs_bonds.append(bonds)
@@ -534,15 +550,14 @@
#k=5, atmname_j
#k=6, distance
-#MASTER_Basepairs = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
-MASTER_Basepairs_excluded = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+MASTER_Basepairs_excluded = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
#MASTER_Basepairs_schemes only carries strings with the names of the basepairing Schemes
-MASTER_Basepairs_schemes = ["I_AA", "II_AA", "III_GG", "IV_GG", "V_AA", "VI_GG", "VII_GG", "VIII_AG", "VIII_GA", "IX_AG", "IX_GA", "X_AG", "X_GA", "XI_AG", "XI_GA", "XII_UU", "XIII_UU", "XIV_CC", "XV_CC", "XVII_CU", "XVII_UC", "XVIII_CU", "XVIII_UC", "XIX_CG_WC", "XIX_GC_WC", "XX_AU_WC", "XX_UA_WC", "XXI_AU", "XXI_UA", "XXII_CG", "XXII_GC", "XXIII_AU", "XXIII_UA", "XXIV_AU", "XXIV_UA", "XXV_AC", "XXV_CA", "XXVI_AC", "XXVI_CA", "XXVII_GU", "XXVII_UG", "XXVIII_GU", "XXVIII_UG", "XXIX_AC", "XXIX_CA", "XXX_GC", "XXX_CG", "XXXI_GG"]
+MASTER_Basepairs_schemes = ["I_AA", "II_AA", "III_GG", "IV_GG", "V_AA", "VI_GG", "VII_GG", "VIII_AG", "VIII_GA", "IX_AG", "IX_GA", "X_AG", "X_GA", "XI_AG", "XI_GA", "XII_UU", "XIII_UU", "XIV_CC", "XV_CC", "XVII_CU", "XVII_UC", "XVIII_CU", "XVIII_UC", "XIX_CG_WC", "XIX_GC_WC", "XX_AU_WC", "XX_UA_WC", "XXI_AU", "XXI_UA", "XXII_CG", "XXII_GC", "XXIII_AU", "XXIII_UA", "XXIV_AU", "XXIV_UA", "XXV_AC", "XXV_CA", "XXVI_AC", "XXVI_CA", "XXVII_GU", "XXVII_UG", "XXVIII_GU", "XXVIII_UG", "XXIX_AC", "XXIX_CA", "XXX_GC", "XXX_CG", "XXXI_GG", "XXXII_AU", "XXXII_UA"]
#MASTER_Basepairs_summary: The lines in MASTER_Basepairs, carrying possible basepairing bonds, will be sorted into this list, once they have been confirmed as possible basepairs. Same format as MASTER_Basepairs
-MASTER_Basepairs_summary = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+MASTER_Basepairs_summary = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
##########################################################################
@@ -1059,8 +1074,9 @@
#LIST3 = atom
#place the atoms involved in the new bond just detected (currently in MASTER_Basepairs[i][j][2] and MASTER_Basepairs[i][j][5]. Distance is in MASTER_Basepairs[i][j][6]) into the proper location within MASTER_Basepairs_summary[i][k] (See MASTER_Basepairs_summary SCHEME) by first checking the location of these atoms in MASTER_Basepairs_bonds. There are several possibilities
#FOLLOW A LINE
-# if (' 827 ' in LIST2) and (' 859 ' in LIST2):
-# print "entering BOND_PLACING", "LIST1", LIST1, "LIST2", LIST2, "LIST3", LIST3
+ if (' 31 ' in LIST2) and (' 39 ' in LIST2):
+ print "entering BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
+ print "entering BOND_PLACING"
#FOLLOW A LINE
if LIST1[3] == LIST3[0] and LIST1[4] == LIST3[1]:
@@ -1079,8 +1095,9 @@
LIST2[15] = LIST3[2]
LIST2[6] = LIST2[6] + 1
#FOLLOW A LINE
-# if (' 827 ' in LIST2) and (' 859 ' in LIST2):
-# print "exiting BOND_PLACING", "LIST1", LIST1, "LIST2", LIST2, "LIST3", LIST3
+ if (' 31 ' in LIST2) and (' 39 ' in LIST2):
+ print "exiting BOND_PLACING", "LIST1", LIST1, "\nLIST2", LIST2, "\nLIST3", LIST3
+ print "exiting BOND_PLACING"
#FOLLOW A LINE
return LIST2
################################################
@@ -1105,7 +1122,7 @@
print "\n...using the C1\'-C1\' distance criterion"
diffP_P = LIST1[16] - LIST2[9]
diffC1_C1 = LIST1[17] - LIST2[11]
- line = "The basepair formed by residues " + A0 + A1 + ":" + A2 + A3 + " displays a " + LIST1[0] + " geometry.\n Empirically determined average C1\'-C1\' distance for this geometry = " + str(LIST2[11]) + " + SD = " + str(LIST2[12]) + "\n Empirically determined average P-P distance for this geometry = " + str(LIST2[9]) + " + SD = " + str(LIST2[10])
+ line = "The basepair formed by residues " + A0 + A1 + ":" + A2 + A3 + " displays a " + LIST1[0] + " geometry with a P-P distance of " + str(LIST1[16]) + " and a C1\'-C1\' distance of " + str(LIST1[17]) + ".\n Empirically determined average C1\'-C1\' distance for this geometry = " + str(LIST2[11]) + " + SD = " + str(LIST2[12]) + "\n Empirically determined average P-P distance for this geometry = " + str(LIST2[9]) + " + SD = " + str(LIST2[10])
print line
if abs(diffC1_C1) > 3 * LIST2[12]:
LIST1.append('REMOVED')
@@ -1372,13 +1389,13 @@
C1 = [' C1\'', ' C1*']
if First_List[a][2] in C1 and First_List[a][5] in C1:
#FOLLOW A LINE
-# if (' 19 ' in First_List[a][0] and ' 56 ' in First_List[a][3]):
+# if (' 31 ' in First_List[a][0] and ' 39 ' in First_List[a][3]):
# print "First_List[a] ", First_List[a]
#FOLLOW A LINE
First_List_C1.append(First_List[a])
First_List = First_List_smaller
- MASTER_Basepairs = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
+ MASTER_Basepairs = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
#####################################
#FUNCTION "Program". Section: First sorting of basepair candidates BEGINNING
@@ -1388,8 +1405,8 @@
collect = []
for i in range (1, len(First_List)):
#FOLLOW A LINE
-# if (' 19 ' in First_List[i][0] and ' 56 ' in First_List[i][3]):
-# print "First_List[i] ", First_List[i]
+ if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+ print "First_List[i] ", First_List[i]
#FOLLOW A LINE
if First_List[i][0] != First_List[i][3]:
for j in range(len(MASTER_Basepairs)):
@@ -1398,8 +1415,8 @@
count = 0
transient = MASTER_Basepairs_bonds[j][3:9]
#FOLLOW A LINE
-# if (' 19 ' in First_List[i][0] and ' 56 ' in First_List[i][3]):
-# print "transient", transient, "MASTER_Basepairs_bonds[j]", MASTER_Basepairs_bonds[j]
+ if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+ print "transient", transient, "\nMASTER_Basepairs_bonds[j]", MASTER_Basepairs_bonds[j]
#FOLLOW A LINE
#Matching the ATOMS to those of MASTER_Basepairs_bonds
for k in range ((len(transient)/2)):
@@ -1408,18 +1425,19 @@
collect = [First_List[i][0], First_List[i][1], First_List[i][2], First_List[i][3], First_List[i][4], First_List[i][5], First_List[i][6]]
MASTER_Basepairs[j].append(collect)
#FOLLOW A LINE
-# if (' 19 ' in First_List[i][0] and ' 56 ' in First_List[i][3]):
-# print "MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]", MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]
+ if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+ print "\nMASTER_Basepairs_schemes[j]", MASTER_Basepairs_schemes[j]
+ print "MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]", MASTER_Basepairs[j][len(MASTER_Basepairs[j])-1]
#FOLLOW A LINE
elif (transient[2*k] in First_List[i][2]) and (transient[2*k + 1] in First_List[i][5]) and (First_List[i][6] > CUTOFF) and (MAX_CUTOFF_str[0:3] in CUTOFF_str[0:3]):
collect = [First_List[i][0], First_List[i][1], First_List[i][2], First_List[i][3], First_List[i][4], First_List[i][5], First_List[i][6], MASTER_Basepairs_schemes[j]]
MASTER_Basepairs_excluded[j].append(collect)
#FOLLOW A LINE
-# if (' 19 ' in First_List[i][0] and ' 56 ' in First_List[i][3]):
-# for q in range (len(MASTER_Basepairs_excluded[j])):
-# print "MASTER_Basepairs_excluded[j][q]", MASTER_Basepairs_excluded[j][q]
-# print "MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]", MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]
+ if (' 31 ' in First_List[i][0] and ' 39 ' in First_List[i][3]):
+ for q in range (len(MASTER_Basepairs_excluded[j])):
+ print "MASTER_Basepairs_excluded[j][q]", MASTER_Basepairs_excluded[j][q]
+ print "MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]", MASTER_Basepairs_excluded[j][len(MASTER_Basepairs_excluded[j])-1]
#FOLLOW A LINE
count = count + 1
collect = []
@@ -1475,9 +1493,9 @@
if (resid[1] - resid[0] > 1) or (resid[1] - resid[0] < -1):
#FOLLOW A LINE
-# if (' 827 ' in MASTER_Basepairs[i][j][0]) and (' 859 ' in MASTER_Basepairs[i][j][3]):
-# print "\nBefore Second sorting: MASTER_Basepairs[i][j]", MASTER_Basepairs_schemes[i], MASTER_Basepairs[i][j], "atom", atom
-# print "i", i, "j", j, "MASTER_Basepairs_schemes[i]", MASTER_Basepairs_schemes[i], "MASTER_Basepairs_bonds[i]", MASTER_Basepairs_bonds[i]
+ if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
+ print "\nBefore Second sorting: MASTER_Basepairs[i][j]", MASTER_Basepairs_schemes[i], MASTER_Basepairs[i][j], "atom", atom
+ print "i", i, "j", j, "MASTER_Basepairs_schemes[i]", MASTER_Basepairs_schemes[i], "MASTER_Basepairs_bonds[i]", MASTER_Basepairs_bonds[i]
#FOLLOW A LINE
if (len(MASTER_Basepairs_summary[i]) > 0):
@@ -1494,7 +1512,7 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][k] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][k], atom)
#FOLLOW A LINE
- if (' 827 ' in MASTER_Basepairs[i][j][0]) and (' 859 ' in MASTER_Basepairs[i][j][3]):
+ if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
print "new bond for the basepair: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
#FOLLOW A LINE
@@ -1506,7 +1524,7 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][len(MASTER_Basepairs_summary[i])-1] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][len(MASTER_Basepairs_summary[i])-1], atom)
#FOLLOW A LINE
- if (' 827 ' in MASTER_Basepairs[i][j][0]) and (' 859 ' in MASTER_Basepairs[i][j][3]):
+ if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
print "New basepair detected for a basepairing Scheme: MASTER_Basepairs_summary[i][k]", MASTER_Basepairs_summary[i][k]
#FOLLOW A LINE
@@ -1517,7 +1535,7 @@
#Bond ATOMS and distances will be placed at their proper position in "FUNCTION BOND_PLACING"
MASTER_Basepairs_summary[i][0] = BOND_PLACING(MASTER_Basepairs_bonds[i], MASTER_Basepairs_summary[i][0], atom)
#FOLLOW A LINE
- if (' 827 ' in MASTER_Basepairs[i][j][0]) and (' 859 ' in MASTER_Basepairs[i][j][3]):
+ if (' 31 ' in MASTER_Basepairs[i][j][0]) and (' 39 ' in MASTER_Basepairs[i][j][3]):
print "First basepair for this basepairing Scheme: MASTER_Basepairs_summary[i][0]", MASTER_Basepairs_summary[i][0]
#FOLLOW A LINE
#####################################
@@ -1846,9 +1864,17 @@
dir = os.getcwd()
import re
-mm=re.search(r'\.', pdb_file)
+ma=re.compile(r'\/+')
+iterator = ma.finditer(pdb_file)
+aaa=[]
+for match in iterator:
+ aaa.append(match.span())
+directory = pdb_file[0:aaa[len(aaa)-1][1]]
+FILE = pdb_file[aaa[len(aaa)-1][1]:len(pdb_file)]
+mm=re.search(r'\.', FILE)
START = mm.start()
-pdb_file_main = pdb_file[0:START]
+pdb_file_main = FILE[0:START]
+
##########################################################################
#Sub SECTION file name
##########################################################################
@@ -2597,11 +2623,11 @@
undetermined = [] #Will collect 'UNDETERMINED' basepairs from MASTER_Basepairs_summary, from largest first residue to smallest
missing_bond = [] #Will collect basepairs with missing bonds. Tagged as " miss"
file = [[], []]
-pymol0 = dir + "/" + pdb_file_main + "_all-basepairs_REVERSED" + "_PYMOL" + "_script.pml"
+pymol0 = directory + "/" + pdb_file_main + "_all-basepairs_REVERSED" + "_PYMOL" + "_script.pml"
file[0] = open(pymol0, 'w')
line0 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n' + "show sticks" + '\n'
file[0].write(line0)
-pymol1 = dir + "/" + pdb_file_main + "_all-basepairs" + "_PYMOL" + "_script.pml"
+pymol1 = directory + "/" + pdb_file_main + "_all-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2649,7 +2675,7 @@
print "==============================================================================="
#For PYMOL output
- pymol1 = dir + "/" + pdb_file_main + "_basepairs-at-cutoff_" + run_cutoff[h*2 + 1] + "_PYMOL" + "_script.pml"
+ pymol1 = directory + "/" + pdb_file_main + "_basepairs-at-cutoff_" + run_cutoff[h*2 + 1] + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2671,7 +2697,7 @@
##### 2) LIST OF LEGITIMATE BASEPAIRS
if LEGITIMATE_tagged != []:
file = [[], []]
- pymol1 = dir + "/" + pdb_file_main + "_LEGITIMATED-basepairs" + "_PYMOL" + "_script.pml"
+ pymol1 = directory + "/" + pdb_file_main + "_LEGITIMATED-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2696,7 +2722,7 @@
##### 3) LIST OF FALSE BASEPAIRS
if falsely_assigned != []:
file = [[], []]
- pymol1 = dir + "/" + pdb_file_main + "_FALSE-basepairs" + "_PYMOL" + "_script.pml"
+ pymol1 = directory + "/" + pdb_file_main + "_FALSE-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2721,7 +2747,7 @@
##### 4) LIST OF UNDETERMINED BASEPAIRS BEGINNING
if undetermined != []:
file = [[], []]
- pymol1 = dir + "/" + pdb_file_main + "_UNDETERMINED-basepairs" + "_PYMOL" + "_script.pml"
+ pymol1 = directory + "/" + pdb_file_main + "_UNDETERMINED-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2746,7 +2772,7 @@
##### 5) LIST OF MISSING-BOND BASEPAIRS BEGINNING
if missing_bond != []:
file = [[], []]
- pymol1 = dir + "/" + pdb_file_main + "_MISSING-BOND-basepairs" + "_PYMOL" + "_script.pml"
+ pymol1 = directory + "/" + pdb_file_main + "_MISSING-BOND-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
@@ -2904,7 +2930,7 @@
#OUTPUT REGARDING BASES WITH POSSIBLE MULTIPLE CONTACTS
#print "\n\nThe following group of bases have been identified as possible basepairs but cannot be assigned to a single basepair interaction\nPlease visually check the assignment in Pymol.\n##### These bases will be displayed in RED #####."
file = [[], []]
-pymol1 = dir + "/" + pdb_file_main + "_UNASSIGNABLE-basepairs" + "_PYMOL" + "_script.pml"
+pymol1 = directory + "/" + pdb_file_main + "_UNASSIGNABLE-basepairs" + "_PYMOL" + "_script.pml"
file[1] = open(pymol1, 'w')
line1 = "load " + pdb_file + '\n' + "color white, /" + pdb_file_main + "/*" + '\n' + "set stick_ball, on" + '\n' + "set stick_ball_ratio, 2.00000" + '\n'
file[1].write(line1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-28 22:46:32
|
Revision: 10790
http://cctbx.svn.sourceforge.net/cctbx/?rev=10790&view=rev
Author: luc_j_bourhis
Date: 2010-05-28 22:46:26 +0000 (Fri, 28 May 2010)
Log Message:
-----------
[Windows only] Precompile boost/python.hpp, resulting in 25% to 40% faster compilation.
Modified Paths:
--------------
trunk/boost_adaptbx/SConscript
trunk/libtbx/env_config.py
Added Paths:
-----------
trunk/boost_adaptbx/precompiled.cpp
trunk/boost_adaptbx/precompiled.h
Modified: trunk/boost_adaptbx/SConscript
===================================================================
--- trunk/boost_adaptbx/SConscript 2010-05-28 20:37:31 UTC (rev 10789)
+++ trunk/boost_adaptbx/SConscript 2010-05-28 22:46:26 UTC (rev 10790)
@@ -76,6 +76,16 @@
env=env_boost_python_ext,
paths=[env_etc.libtbx_include])
Export("env_boost_python_ext")
+
+ ## Precompiled headers for Boost Python extensions
+ if libtbx.env.build_options.precompile_headers:
+ precompiled_cpp = '#' + os.path.join('boost_adaptbx', 'precompiled.cpp')
+ precompiled_h = 'boost_adaptbx/precompiled.h'
+ if sys.platform == 'win32':
+ env_no_includes_boost_python_ext['PCH'], _ \
+ = env_boost_python_ext.PCH(precompiled_cpp)
+ env_no_includes_boost_python_ext['PCHSTOP'] = precompiled_h
+ env_no_includes_boost_python_ext.Append(CPPFLAGS=[ '/FI' + precompiled_h ])
env_pure_boost_python_ext.SharedLibrary(
target="#lib/boost_python_hybrid_times_ext",
Added: trunk/boost_adaptbx/precompiled.cpp
===================================================================
--- trunk/boost_adaptbx/precompiled.cpp (rev 0)
+++ trunk/boost_adaptbx/precompiled.cpp 2010-05-28 22:46:26 UTC (rev 10790)
@@ -0,0 +1,3 @@
+/// This file should not be edited
+#include "precompiled.h"
+
Property changes on: trunk/boost_adaptbx/precompiled.cpp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: trunk/boost_adaptbx/precompiled.h
===================================================================
--- trunk/boost_adaptbx/precompiled.h (rev 0)
+++ trunk/boost_adaptbx/precompiled.h 2010-05-28 22:46:26 UTC (rev 10790)
@@ -0,0 +1,2 @@
+/// List headers to precompile here
+#include <boost/python.hpp>
Property changes on: trunk/boost_adaptbx/precompiled.h
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/libtbx/env_config.py
===================================================================
--- trunk/libtbx/env_config.py 2010-05-28 20:37:31 UTC (rev 10789)
+++ trunk/libtbx/env_config.py 2010-05-28 22:46:26 UTC (rev 10790)
@@ -643,6 +643,7 @@
enable_boost_threads=command_line.options.enable_boost_threads,
enable_openmp_if_possible
=command_line.options.enable_openmp_if_possible,
+ precompile_headers=command_line.options.precompile_headers,
use_environment_flags=command_line.options.use_environment_flags,
force_32bit=command_line.options.force_32bit,
msvc_arch_flag=command_line.options.msvc_arch_flag)
@@ -1584,6 +1585,7 @@
boost_python_bool_int_strict=True,
enable_boost_threads=default_enable_boost_threads,
enable_openmp_if_possible=default_enable_openmp_if_possible,
+ precompile_headers=False,
use_environment_flags=False,
force_32bit=False,
msvc_arch_flag=default_msvc_arch_flag):
@@ -1804,6 +1806,10 @@
help="use OpenMP if available and known to work (default: %s)"
% bool_literal(default_enable_openmp_if_possible),
metavar="True|False")
+ parser.option(None, "--precompile_headers",
+ action="store_true",
+ default=False,
+ help="Precompile headers, especially Boost Python ones (default: don't)")
if (not self.warm_start):
parser.option(None, "--boost_python_no_py_signatures",
action="store_true",
@@ -1929,6 +1935,9 @@
# XXX backward compatibility 2009-10-13
if (not hasattr(env.build_options, "msvc_arch_flag")) :
env.build_options.msvc_arch_flag = default_msvc_arch_flag
+ # XXX backward compatibility 2010-5-28
+ if not hasattr(env.build_options, 'precompile_headers'):
+ env.build_options.precompile_headers = False
return env
def warm_start(args):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rw...@us...> - 2010-05-28 20:37:37
|
Revision: 10789
http://cctbx.svn.sourceforge.net/cctbx/?rev=10789&view=rev
Author: rwgk
Date: 2010-05-28 20:37:31 +0000 (Fri, 28 May 2010)
Log Message:
-----------
clean clutter (please do not forget)
Modified Paths:
--------------
trunk/cctbx/geometry_restraints/manager.py
trunk/cctbx/maptbx/boost_python/maptbx_ext.cpp
trunk/cctbx/xray/structure.py
Modified: trunk/cctbx/geometry_restraints/manager.py
===================================================================
--- trunk/cctbx/geometry_restraints/manager.py 2010-05-28 20:36:21 UTC (rev 10788)
+++ trunk/cctbx/geometry_restraints/manager.py 2010-05-28 20:37:31 UTC (rev 10789)
@@ -42,7 +42,7 @@
assert nonbonded_types.size() == site_symmetry_table.indices().size()
adopt_init_args(self, locals())
self.reset_internals()
-
+
def reset_internals(self):
self._sites_cart_used_for_pair_proxies = None
self._flags_bond_used_for_pair_proxies = False
@@ -53,7 +53,7 @@
self.adjusted_nonbonded_distance_cutoff = self.nonbonded_distance_cutoff
self.effective_nonbonded_buffer = self.nonbonded_buffer
self.n_updates_pair_proxies = 0
-
+
def replace_site_symmetry(self, new_site_symmetry_table):
assert self.site_symmetry_table is not None
self.site_symmetry_table = new_site_symmetry_table
Modified: trunk/cctbx/maptbx/boost_python/maptbx_ext.cpp
===================================================================
--- trunk/cctbx/maptbx/boost_python/maptbx_ext.cpp 2010-05-28 20:36:21 UTC (rev 10788)
+++ trunk/cctbx/maptbx/boost_python/maptbx_ext.cpp 2010-05-28 20:37:31 UTC (rev 10789)
@@ -187,7 +187,7 @@
arg("n_real_2"),
arg("rotation_matrix"),
arg("translation_vector")));
-
+
def("combine_and_maximize_maps",
(af::versa<double, af::c_grid<3> >(*)
(af::const_ref<double, af::c_grid<3> > const&,
Modified: trunk/cctbx/xray/structure.py
===================================================================
--- trunk/cctbx/xray/structure.py 2010-05-28 20:36:21 UTC (rev 10788)
+++ trunk/cctbx/xray/structure.py 2010-05-28 20:37:31 UTC (rev 10789)
@@ -467,7 +467,7 @@
return flex.bool([ label_regex.search(sc.label) is not None
for sc in self.scatterers() ])
- def apply_rigid_body_shift(self, rot, trans, selection = None,
+ def apply_rigid_body_shift(self, rot, trans, selection = None,
recompute_site_symmetries=True):
if(selection is None):
selection = flex.bool(self._scatterers.size(), True).iselection()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rw...@us...> - 2010-05-28 20:36:27
|
Revision: 10788
http://cctbx.svn.sourceforge.net/cctbx/?rev=10788&view=rev
Author: rwgk
Date: 2010-05-28 20:36:21 +0000 (Fri, 28 May 2010)
Log Message:
-----------
libtbx/SConscript: new patch_scons_env_for_ad_hoc_debug()
Modified Paths:
--------------
trunk/libtbx/SConscript
Modified: trunk/libtbx/SConscript
===================================================================
--- trunk/libtbx/SConscript 2010-05-28 20:33:45 UTC (rev 10787)
+++ trunk/libtbx/SConscript 2010-05-28 20:36:21 UTC (rev 10788)
@@ -85,6 +85,17 @@
def disable_strict_aliasing(env): pass
env_etc.disable_strict_aliasing = disable_strict_aliasing
+def patch_scons_env_for_ad_hoc_debug(env):
+ assert not env_etc.compiler.startswith("win")
+ dbg_ccflags = []
+ for f in env["CCFLAGS"]:
+ if (f in ["-O1", "-O2", "-O3"]):
+ dbg_ccflags.extend(["-O0", "-g"])
+ elif (f != "-ffast-math"):
+ dbg_ccflags.append(f)
+ env.Replace(CCFLAGS=dbg_ccflags)
+env_etc.patch_scons_env_for_ad_hoc_debug = patch_scons_env_for_ad_hoc_debug
+
compiler = libtbx.env.build_options.compiler
if (sys.platform == "win32"):
if (compiler == "default"):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rw...@us...> - 2010-05-28 20:33:52
|
Revision: 10787
http://cctbx.svn.sourceforge.net/cctbx/?rev=10787&view=rev
Author: rwgk
Date: 2010-05-28 20:33:45 +0000 (Fri, 28 May 2010)
Log Message:
-----------
libtbx/utils.py: getenv_bool(): also accept 0 and 1
Modified Paths:
--------------
trunk/libtbx/utils.py
Modified: trunk/libtbx/utils.py
===================================================================
--- trunk/libtbx/utils.py 2010-05-28 15:05:30 UTC (rev 10786)
+++ trunk/libtbx/utils.py 2010-05-28 20:33:45 UTC (rev 10787)
@@ -155,11 +155,11 @@
value = os.environ.get(variable_name, None)
if (value is None): return default
value_lower = value.lower()
- if (value_lower not in ["false", "true"]):
+ if (value_lower not in ["false", "true", "0", "1"]):
raise Sorry(
- 'Environment variable %s must be "True" or "False"'
+ 'Environment variable %s must be "True", "False", "0", or "1"'
' (current value: "%s").' % (variable_name, value))
- return (value_lower == "true")
+ return (value_lower in ["true", "1"])
def file_size(file_name):
return os.stat(file_name).st_size
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2010-05-28 15:05:37
|
Revision: 10786
http://cctbx.svn.sourceforge.net/cctbx/?rev=10786&view=rev
Author: rjgildea
Date: 2010-05-28 15:05:30 +0000 (Fri, 28 May 2010)
Log Message:
-----------
libtbx/subprocess_with_fixes.py: apply SCons svn r4656 from _scons_subprocess.py - essential for running with Python 2.3 on Windows
Modified Paths:
--------------
trunk/libtbx/subprocess_with_fixes.py
Modified: trunk/libtbx/subprocess_with_fixes.py
===================================================================
--- trunk/libtbx/subprocess_with_fixes.py 2010-05-28 13:41:18 UTC (rev 10785)
+++ trunk/libtbx/subprocess_with_fixes.py 2010-05-28 15:05:30 UTC (rev 10786)
@@ -375,7 +375,21 @@
if mswindows:
import threading
import msvcrt
- if 0: # <-- change this to use pywin32 instead of the _subprocess driver
+ try:
+ # Try to get _subprocess
+ from _subprocess import *
+ class STARTUPINFO(object):
+ dwFlags = 0
+ hStdInput = None
+ hStdOutput = None
+ hStdError = None
+ wShowWindow = 0
+ class pywintypes(object):
+ error = IOError
+ except ImportError:
+ # If not there, then drop back to requiring pywin32
+ # TODO: Should this be wrapped in try as well? To notify user to install
+ # pywin32 ? With URL to it?
import pywintypes
from win32api import GetStdHandle, STD_INPUT_HANDLE, \
STD_OUTPUT_HANDLE, STD_ERROR_HANDLE
@@ -387,16 +401,6 @@
GetExitCodeProcess, STARTF_USESTDHANDLES, \
STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE
from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0
- else:
- from _subprocess import *
- class STARTUPINFO:
- dwFlags = 0
- hStdInput = None
- hStdOutput = None
- hStdError = None
- wShowWindow = 0
- class pywintypes:
- error = IOError
else:
import select
import errno
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2010-05-28 13:41:25
|
Revision: 10785
http://cctbx.svn.sourceforge.net/cctbx/?rev=10785&view=rev
Author: rjgildea
Date: 2010-05-28 13:41:18 +0000 (Fri, 28 May 2010)
Log Message:
-----------
libtbx/containers.py: OrderedSet: provide specialised __copy__() and __deepcopy__() functions for Python 2.3 compatibility when MutableSet isn't available
Modified Paths:
--------------
trunk/libtbx/containers.py
Property Changed:
----------------
trunk/libtbx/containers.py
Modified: trunk/libtbx/containers.py
===================================================================
--- trunk/libtbx/containers.py 2010-05-28 12:46:30 UTC (rev 10784)
+++ trunk/libtbx/containers.py 2010-05-28 13:41:18 UTC (rev 10785)
@@ -140,6 +140,23 @@
def __del__(self):
self.clear() # remove circular references
+ def __copy__(self):
+ from copy import copy
+ result = OrderedSet()
+ for elt in self:
+ result.add(elt)
+ return result
+
+ copy = __copy__
+
+ def __deepcopy__(self, memo):
+ from copy import deepcopy
+ result = OrderedSet()
+ for elt in self:
+ result.add(deepcopy(elt, memo))
+ return result
+
+
from UserDict import DictMixin
class OrderedDict(dict, DictMixin):
"""
Property changes on: trunk/libtbx/containers.py
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-28 12:46:36
|
Revision: 10784
http://cctbx.svn.sourceforge.net/cctbx/?rev=10784&view=rev
Author: luc_j_bourhis
Date: 2010-05-28 12:46:30 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Better to produce the correct normalisation there as well
Modified Paths:
--------------
trunk/smtbx/refinement/least_squares.py
trunk/smtbx/refinement/tests/tst_least_squares.py
Modified: trunk/smtbx/refinement/least_squares.py
===================================================================
--- trunk/smtbx/refinement/least_squares.py 2010-05-28 12:12:38 UTC (rev 10783)
+++ trunk/smtbx/refinement/least_squares.py 2010-05-28 12:46:30 UTC (rev 10784)
@@ -81,7 +81,13 @@
self.solve()
self.apply_shifts()
- def covariance_matrix(self):
+ def goof(self):
+ from stdlib import math
+ return math.sqrt(self.objective/(
+ self.fo_sq.size()
+ - self.special_position_constraints.n_independent_params))
+
+ def covariance_matrix(self, normalised_by_goof=True):
""" Covariance matrix for crystallographic parameters
They are ordered scatterer by scatterer, in the order
they are stored in self.xray_structure, as follow:
@@ -89,6 +95,8 @@
If a parameter is not refined, it is taken out from the list.
The upper diagonal of the covariance matrix is returned packed by rows
(packed-u format).
+ If normalised_by_goof is False, the mere inverse of the normal
+ matrix is returned (mostly for debugging purposes).
"""
from scitbx import sparse
@@ -135,4 +143,5 @@
cov_ind_params = linalg.inverse_of_u_transpose_u(
self.reduced.cholesky_factor_packed_u)
cov = jac.self_times_symmetric_times_self_transpose(cov_ind_params)
+ if normalised_by_goof: cov *= self.goof()**2
return cov
Modified: trunk/smtbx/refinement/tests/tst_least_squares.py
===================================================================
--- trunk/smtbx/refinement/tests/tst_least_squares.py 2010-05-28 12:12:38 UTC (rev 10783)
+++ trunk/smtbx/refinement/tests/tst_least_squares.py 2010-05-28 12:46:30 UTC (rev 10784)
@@ -452,7 +452,8 @@
assert approx_equal(normal_eqns.scale_factor, 1, eps=1e-4)
## Test covariance matrix
- cov = normal_eqns.covariance_matrix().matrix_packed_u_as_symmetric()
+ cov = normal_eqns.covariance_matrix(normalised_by_goof=False)\
+ .matrix_packed_u_as_symmetric()
m, n = cov.accessor().focus()
# x,y for point group 3 sites are fixed: no variance or correlation
for i in (0, 9, 18, 27,):
@@ -467,6 +468,7 @@
# diagonal coefficients of U_cart for point group 3 sites are such that
# U_11 and U_22 are totally correlated, with the same variance
for i in (3, 12, 21, 30,):
+ assert cov[i, i] != 0
assert approx_equal(cov[i, i], cov[i+1, i+1], eps=1e-15)
assert approx_equal(cov[i, i+1]/cov[i, i], 1, eps=1e-12)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-28 12:14:09
|
Revision: 10782
http://cctbx.svn.sourceforge.net/cctbx/?rev=10782&view=rev
Author: luc_j_bourhis
Date: 2010-05-28 12:12:20 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Expose Jacobian of the transformation from independent params to all params for Cartesian ADP constraints
Modified Paths:
--------------
trunk/cctbx/sgtbx/boost_python/tensor_rank_2.cpp
trunk/cctbx/sgtbx/tensor_rank_2.h
Modified: trunk/cctbx/sgtbx/boost_python/tensor_rank_2.cpp
===================================================================
--- trunk/cctbx/sgtbx/boost_python/tensor_rank_2.cpp 2010-05-28 12:11:29 UTC (rev 10781)
+++ trunk/cctbx/sgtbx/boost_python/tensor_rank_2.cpp 2010-05-28 12:12:20 UTC (rev 10782)
@@ -74,6 +74,7 @@
arg("independent_params"))
.def("independent_gradients", &wt::independent_gradients,
arg("all_gradients"))
+ .def("jacobian", &wt::jacobian)
;
}
};
Modified: trunk/cctbx/sgtbx/tensor_rank_2.h
===================================================================
--- trunk/cctbx/sgtbx/tensor_rank_2.h 2010-05-28 12:11:29 UTC (rev 10781)
+++ trunk/cctbx/sgtbx/tensor_rank_2.h 2010-05-28 12:12:20 UTC (rev 10782)
@@ -5,6 +5,7 @@
#include <scitbx/matrix/delta_tensors.h>
#include <scitbx/matrix/row_echelon.h>
#include <scitbx/matrix/row_echelon_full_pivoting_small.h>
+#include <scitbx/array_family/owning_ref.h>
#include <boost/shared_array.hpp>
namespace cctbx { namespace sgtbx {
@@ -261,15 +262,14 @@
template <typename T=double>
class cartesian_constraints
{
- /* This is the cartesian_constraints_n_all_params x n_independent_params
+ /* This is the n_all_params x n_independent_params
matrix Z whose columns make a basis of the null space of A:
A u = 0 => u = Z u'
where u' is the vector of independent parameters and therefore
grad_u' = Z^T grad_u
*/
- boost::shared_array<T> z_;
- af::ref<T, af::mat_grid> z;
+ af::ref_owning_versa<T, af::mat_grid> z;
unsigned n_independent_params;
// the min absolute value for a pivot value to be considered null
@@ -318,8 +318,8 @@
r_e(a_, pivot_zero_attractor);
n_independent_params = r_e.nullity;
af::small<T, n_all_params> x_N(n_independent_params, 0);
- z_ = boost::shared_array<T>(new T[n_all_params * n_independent_params]);
- z = af::ref<T, af::mat_grid>(z_.get(), n_all_params, n_independent_params);
+ af::mat_grid dim(n_all_params, n_independent_params);
+ z = af::ref_owning_versa<T, af::mat_grid>(dim);
for (unsigned j=0; j< n_independent_params; j++) {
x_N[j] = 1;
af::tiny<T, n_all_params>
@@ -408,6 +408,18 @@
unsigned n_independent_parameters() const {
return n_independent_params;
}
+
+ /// The Jacobian of the transformation from independent params to all params
+ /** It reads
+ \f[
+ \left[ \frac{\partial u_i}{\partial v_j} \right]
+ \f]
+ where $u = (U_11, U_22, U_33, U_12, U_13, U_23)$, and
+ where $v$ are the independent parameters $u$ is function of after
+ solving for the special position constraints.
+
+ */
+ af::versa<T, af::mat_grid> jacobian() const { return z.array(); }
};
}}} // namespace cctbx::sgtbx::tensor_rank_2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-28 12:14:05
|
Revision: 10783
http://cctbx.svn.sourceforge.net/cctbx/?rev=10783&view=rev
Author: luc_j_bourhis
Date: 2010-05-28 12:12:38 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Prototype in Python of covariance matrix for crystallographic parameters
Modified Paths:
--------------
trunk/smtbx/refinement/least_squares.py
trunk/smtbx/refinement/tests/tst_least_squares.py
Modified: trunk/smtbx/refinement/least_squares.py
===================================================================
--- trunk/smtbx/refinement/least_squares.py 2010-05-28 12:12:20 UTC (rev 10782)
+++ trunk/smtbx/refinement/least_squares.py 2010-05-28 12:12:38 UTC (rev 10783)
@@ -80,3 +80,59 @@
def solve_and_apply_shifts(self):
self.solve()
self.apply_shifts()
+
+ def covariance_matrix(self):
+ """ Covariance matrix for crystallographic parameters
+ They are ordered scatterer by scatterer, in the order
+ they are stored in self.xray_structure, as follow:
+ x, y, z, u_iso, u_11, u_22, u_33, u_12, u_13, u_23, occupancy
+ If a parameter is not refined, it is taken out from the list.
+ The upper diagonal of the covariance matrix is returned packed by rows
+ (packed-u format).
+ """
+ from scitbx import sparse
+
+ # compute jacobian matrix (sparse)
+ jac = sparse.matrix(
+ self.special_position_constraints.n_crystallographic_params,
+ self.special_position_constraints.n_independent_params)
+ site_symmetry_table = self.xray_structure.site_symmetry_table()
+ i = 0 # crystallographic param index
+ j = 0 # independent param index
+ for i_sc, sc in enumerate(self.xray_structure.scatterers()):
+ site_symm = site_symmetry_table.get(i_sc)
+ if sc.flags.grad_site():
+ if site_symm.is_point_group_1():
+ jac[i, j] = jac[i+1, j+1] = jac[i+2, j+2] = 1
+ i += 3; j += 3
+ else:
+ site_constraints = site_symm.site_constraints()
+ site_jac_tr = site_constraints.gradient_sum_matrix()
+ for k in xrange(3):
+ for l in xrange(site_constraints.n_independent_params()):
+ jac[i+k, j+l] = site_jac_tr[l, k]
+ i += 3; j += site_constraints.n_independent_params()
+ if sc.flags.use_u_iso() and sc.flags.grad_u_iso():
+ jac[i,j] = 1
+ i += 1; j += 1
+ if sc.flags.use_u_aniso() and sc.flags.grad_u_aniso():
+ if site_symm.is_point_group_1():
+ for l in xrange(6): jac[i+l, j+l] = 1
+ i += 6; j += 6
+ else:
+ adp_constraints = site_symm.cartesian_adp_constraints(
+ self.xray_structure.unit_cell())
+ adp_jac = adp_constraints.jacobian()
+ for k in xrange(6):
+ for l in xrange(adp_constraints.n_independent_params()):
+ jac[i+k, j+l] = adp_jac[k, l]
+ i += 6; j += adp_constraints.n_independent_params()
+ if sc.flags.grad_occupancy():
+ jac[i,j] = 1
+ i += 1; j += 1
+
+ # compute covariance matrix for crystallographic parameters
+ cov_ind_params = linalg.inverse_of_u_transpose_u(
+ self.reduced.cholesky_factor_packed_u)
+ cov = jac.self_times_symmetric_times_self_transpose(cov_ind_params)
+ return cov
Modified: trunk/smtbx/refinement/tests/tst_least_squares.py
===================================================================
--- trunk/smtbx/refinement/tests/tst_least_squares.py 2010-05-28 12:12:20 UTC (rev 10782)
+++ trunk/smtbx/refinement/tests/tst_least_squares.py 2010-05-28 12:12:38 UTC (rev 10783)
@@ -437,6 +437,8 @@
normal_eqns.solve_and_apply_shifts()
shifts.append(normal_eqns.shifts)
+ ## Test whether refinement brought back the shaked structure to its
+ ## original state
match = emma.model_matches(xs0.as_emma_model(),
xs.as_emma_model()).refined_matches[0]
assert match.rt.r == matrix.identity(3)
@@ -449,6 +451,26 @@
assert approx_equal(normal_eqns.scale_factor, 1, eps=1e-4)
+ ## Test covariance matrix
+ cov = normal_eqns.covariance_matrix().matrix_packed_u_as_symmetric()
+ m, n = cov.accessor().focus()
+ # x,y for point group 3 sites are fixed: no variance or correlation
+ for i in (0, 9, 18, 27,):
+ assert cov.matrix_copy_block(i, 0, 2, n) == 0
+
+ # off-diagonal coefficients of U_cart for point group 3 sites are fixed
+ # to 0: again no variance or correlation with any other param
+ for i in (6, 15, 24, 33,):
+ assert cov.matrix_copy_block(i, 0, 3, n).as_1d()\
+ .all_approx_equal(0., 1e-20)
+
+ # diagonal coefficients of U_cart for point group 3 sites are such that
+ # U_11 and U_22 are totally correlated, with the same variance
+ for i in (3, 12, 21, 30,):
+ assert approx_equal(cov[i, i], cov[i+1, i+1], eps=1e-15)
+ assert approx_equal(cov[i, i+1]/cov[i, i], 1, eps=1e-12)
+
+
def run():
libtbx.utils.show_times_at_exit()
import sys
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2010-05-28 12:11:35
|
Revision: 10781
http://cctbx.svn.sourceforge.net/cctbx/?rev=10781&view=rev
Author: luc_j_bourhis
Date: 2010-05-28 12:11:29 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Python interface for inversion of U^T U
Modified Paths:
--------------
trunk/scitbx/linalg/boost_python/cholesky.cpp
Modified: trunk/scitbx/linalg/boost_python/cholesky.cpp
===================================================================
--- trunk/scitbx/linalg/boost_python/cholesky.cpp 2010-05-27 23:46:32 UTC (rev 10780)
+++ trunk/scitbx/linalg/boost_python/cholesky.cpp 2010-05-28 12:11:29 UTC (rev 10781)
@@ -91,5 +91,8 @@
>::wrap("u_transpose_u_cholesky_decomposition_in_place");
cholesky_failure_info_wrapper::wrap("cholesky_failure_info");
+
+ def("inverse_of_u_transpose_u",
+ cholesky::inverse_of_u_transpose_u<double>);
}
}}}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nat...@us...> - 2010-05-27 23:46:38
|
Revision: 10780
http://cctbx.svn.sourceforge.net/cctbx/?rev=10780&view=rev
Author: natechols
Date: 2010-05-27 23:46:32 +0000 (Thu, 27 May 2010)
Log Message:
-----------
check for switched resolution limits
Modified Paths:
--------------
trunk/mmtbx/command_line/fmodel.py
Modified: trunk/mmtbx/command_line/fmodel.py
===================================================================
--- trunk/mmtbx/command_line/fmodel.py 2010-05-27 11:05:36 UTC (rev 10779)
+++ trunk/mmtbx/command_line/fmodel.py 2010-05-27 23:46:32 UTC (rev 10780)
@@ -343,6 +343,11 @@
params.data_column_label is None) :
raise Sorry("Please select a column label to use in the reference "+
"data file.")
+ if params.low_resolution is not None :
+ if params.low_resolution < params.high_resolution :
+ raise Sorry("Low-resolution cutoff must be larger than the high-"+
+ "resolution cutoff.")
+ return True
if (__name__ == "__main__"):
run(args=sys.argv[1:])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2010-05-27 11:05:43
|
Revision: 10779
http://cctbx.svn.sourceforge.net/cctbx/?rev=10779&view=rev
Author: rjgildea
Date: 2010-05-27 11:05:36 +0000 (Thu, 27 May 2010)
Log Message:
-----------
iotbx/cif/model.py: common_prefix -> common_substring, since DDL1 permits cif loop to contain a local prefix as the first element of any data name; check data name for leading underscore;
Modified Paths:
--------------
trunk/iotbx/cif/model.py
trunk/iotbx/cif/tests/tst_model.py
Modified: trunk/iotbx/cif/model.py
===================================================================
--- trunk/iotbx/cif/model.py 2010-05-27 00:43:05 UTC (rev 10778)
+++ trunk/iotbx/cif/model.py 2010-05-27 11:05:36 UTC (rev 10779)
@@ -39,12 +39,11 @@
def __copy__(self):
return cif(self.blocks.copy())
+ copy = __copy__
+
def __deepcopy__(self, memo):
return cif(copy.deepcopy(self.blocks, memo))
- def copy(self):
- return copy.copy(self)
-
def deepcopy(self):
return copy.deepcopy(self)
@@ -70,6 +69,7 @@
self.keys_lower = {}
def __setitem__(self, key, value):
+ assert key.startswith('_')
if isinstance(value, loop):
self.loops[key] = value
for k in value.keys():
@@ -149,6 +149,8 @@
new.keys_lower = self.keys_lower.copy()
return new
+ copy = __copy__
+
def __deepcopy__(self, memo):
new = block()
new._items = copy.deepcopy(self._items, memo)
@@ -157,9 +159,6 @@
new.keys_lower = copy.deepcopy(self.keys_lower, memo)
return new
- def copy(self):
- return copy.copy(self)
-
def deepcopy(self):
return copy.deepcopy(self)
@@ -202,6 +201,7 @@
[(key.lower(), key) for key in self._columns.keys()])
def __setitem__(self, key, value):
+ assert key.startswith('_')
if len(self) > 0:
assert len(value) == self.size()
if not isinstance(value, flex.std_string):
@@ -234,7 +234,7 @@
return repr(OrderedDict(self.iteritems()))
def name(self):
- return common_prefix(self.keys()).rstrip('_').rstrip('.')
+ return common_substring(self.keys()).rstrip('_').rstrip('.')
def size(self):
size = 0
@@ -264,15 +264,14 @@
new.keys_lower = self.keys_lower.copy()
return new
+ copy = __copy__
+
def __deepcopy__(self, memo):
new = loop()
new._columns = copy.deepcopy(self._columns, memo)
new.keys_lower = copy.deepcopy(self.keys_lower, memo)
return new
- def copy(self):
- return copy.copy(self)
-
def deepcopy(self):
return copy.deepcopy(self)
@@ -297,18 +296,38 @@
for j in range(self.size())])
-def common_prefix(seq):
- if not seq:return ""
- seq.sort()
- s1, s2 = seq[0], seq[-1]
- l = min(len(s1), len(s2))
- if l == 0 :
- return ""
- for i in xrange(l) :
- if s1[i] != s2[i] :
- return s1[0:i]
- return s1[0:l]
+def common_substring(seq):
+ # DDL1 dictionaries permit a cif loop to contain a local prefix as the
+ # first element of any data name:
+ #
+ # http://www.iucr.org/resources/cif/spec/ancillary/reserved-prefixes
+ substr = seq[0]
+ for s in seq:
+ substr = LCSubstr_set(substr, s).pop()
+ return substr
+
+def LCSubstr_set(S, T):
+ """Longest common substring function taken from:
+ http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring#Python"""
+
+ m = len(S); n = len(T)
+ L = [[0] * (n+1) for i in xrange(m+1)]
+ LCS = set()
+ longest = 0
+ for i in xrange(m):
+ for j in xrange(n):
+ if S[i] == T[j]:
+ v = L[i][j] + 1
+ L[i+1][j+1] = v
+ if v > longest:
+ longest = v
+ LCS = set()
+ if v == longest:
+ LCS.add(S[i-v+1:i+1])
+ return LCS
+
+
import re
quoted_string_re = re.compile(r"(?!'|\").*?(?!'|\")")
semicolon_string_re = re.compile(r"(\s*)(;).*?(;)(\s*)", re.DOTALL)
Modified: trunk/iotbx/cif/tests/tst_model.py
===================================================================
--- trunk/iotbx/cif/tests/tst_model.py 2010-05-27 00:43:05 UTC (rev 10778)
+++ trunk/iotbx/cif/tests/tst_model.py 2010-05-27 11:05:36 UTC (rev 10779)
@@ -6,8 +6,7 @@
def exercise_cif_model():
import iotbx.cif
from iotbx.cif import model
- cif_model = model.cif()
- #
+
loop = model.loop()
loop["_loop_a"] = (1,2,3)
loop.add_columns({'_loop_c': [4,5,6],
@@ -19,6 +18,9 @@
assert len(loop) == 3 # the number of columns (keys)
assert loop.size() == 4 # the number of rows (loop iterations)
assert loop.keys() == ['_loop_a', '_loop_c', '_loop_b']
+ try: loop["no_leading_underscore"] = 3
+ except AssertionError: pass
+ else: raise Exception_expected
loop2 = model.loop(header=("_loop2_a", "_loop2_b"), data=(1,2,3,4,5,6))
assert loop2.keys() == ["_loop2_a", "_loop2_b"]
assert loop2.values() == [flex.std_string(['1', '3', '5']),
@@ -37,6 +39,9 @@
assert block["_another_tag"] == "3.142"
assert block.keys() == ['_tag', '_tag1', '_another_tag']
assert block.values() == ["3", 'a string', "3.142"]
+ try: block["no_leading_underscore"] = 3
+ except AssertionError: pass
+ else: raise Exception_expected
block.add_loop(loop)
assert len(block) == 6
assert block.items() == [
@@ -65,6 +70,7 @@
except KeyError: pass
else: raise Exception_expected
#
+ cif_model = model.cif()
cif_model["fred"] = block
assert "fred" in cif_model
assert cif_model["frEd"] is block
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rw...@us...> - 2010-05-27 00:43:12
|
Revision: 10778
http://cctbx.svn.sourceforge.net/cctbx/?rev=10778&view=rev
Author: rwgk
Date: 2010-05-27 00:43:05 +0000 (Thu, 27 May 2010)
Log Message:
-----------
iotbx/mtz: new object.space_group_confidence()
Modified Paths:
--------------
trunk/iotbx/mtz/object.h
trunk/iotbx/mtz/object_bpl.cpp
trunk/iotbx/mtz/tst_ext.py
Modified: trunk/iotbx/mtz/object.h
===================================================================
--- trunk/iotbx/mtz/object.h 2010-05-26 23:20:43 UTC (rev 10777)
+++ trunk/iotbx/mtz/object.h 2010-05-27 00:43:05 UTC (rev 10778)
@@ -275,6 +275,17 @@
n_symmetry_matrices() const { return ptr()->mtzsymm.nsym; }
//! Read-only access.
+ char
+ space_group_confidence() const
+ {
+#if defined(CCP4_MTZDATA) && CCP4_MTZDATA > 20100418
+ return ptr()->mtzsymm.spg_confidence;
+#else
+ return '\0';
+#endif
+ }
+
+ //! Read-only access.
cctbx::sgtbx::space_group
space_group() const;
Modified: trunk/iotbx/mtz/object_bpl.cpp
===================================================================
--- trunk/iotbx/mtz/object_bpl.cpp 2010-05-26 23:20:43 UTC (rev 10777)
+++ trunk/iotbx/mtz/object_bpl.cpp 2010-05-27 00:43:05 UTC (rev 10778)
@@ -104,6 +104,7 @@
&w_t::set_lattice_centring_type, (
arg("symbol")), return_self<>())
.def("n_symmetry_matrices", &w_t::n_symmetry_matrices)
+ .def("space_group_confidence", &w_t::space_group_confidence)
.def("space_group", &w_t::space_group)
.def("set_space_group", &w_t::set_space_group, (
arg("space_group")), return_self<>())
Modified: trunk/iotbx/mtz/tst_ext.py
===================================================================
--- trunk/iotbx/mtz/tst_ext.py 2010-05-26 23:20:43 UTC (rev 10777)
+++ trunk/iotbx/mtz/tst_ext.py 2010-05-27 00:43:05 UTC (rev 10778)
@@ -35,6 +35,7 @@
assert mtz_object.space_group_name() == ""
assert mtz_object.space_group_number() == 0
assert mtz_object.n_symmetry_matrices() == 0
+ assert mtz_object.space_group_confidence() == "\x00"
assert mtz_object.space_group().order_z() == 1
assert mtz_object.point_group_name() == ""
assert mtz_object.lattice_centring_type() == "\0"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <af...@us...> - 2010-05-26 23:20:50
|
Revision: 10777
http://cctbx.svn.sourceforge.net/cctbx/?rev=10777&view=rev
Author: afonine
Date: 2010-05-26 23:20:43 +0000 (Wed, 26 May 2010)
Log Message:
-----------
suppress mask optimization in spurious places
Modified Paths:
--------------
trunk/mmtbx/f_model.py
trunk/mmtbx/refinement/rigid_body.py
trunk/mmtbx/utils.py
Modified: trunk/mmtbx/f_model.py
===================================================================
--- trunk/mmtbx/f_model.py 2010-05-26 18:05:22 UTC (rev 10776)
+++ trunk/mmtbx/f_model.py 2010-05-26 23:20:43 UTC (rev 10777)
@@ -1568,7 +1568,7 @@
k_sol = self.k_sol(),
b_sol = self.b_sol(),
b_cart = self.b_cart())
- fmodel.update_solvent_and_scale(params = bss_params)
+ fmodel.update_solvent_and_scale(params = bss_params, optimize_mask=False)
# replace 'F_obs' -> alpha * 'F_obs' for filled F_obs
alpha, beta = maxlik.alpha_beta_est_manager(
f_obs = fmodel.f_obs,
@@ -1718,7 +1718,8 @@
b_cart = self.b_cart(),
mask_params = self.mask_params,
filled_f_obs_selection = filled_f_obs_selection)
- fmodel_result.update_solvent_and_scale(params = bss_params)
+ fmodel_result.update_solvent_and_scale(params = bss_params,
+ optimize_mask=False)
return fmodel_result
def remove_filled_f_obs(self):
Modified: trunk/mmtbx/refinement/rigid_body.py
===================================================================
--- trunk/mmtbx/refinement/rigid_body.py 2010-05-26 18:05:22 UTC (rev 10776)
+++ trunk/mmtbx/refinement/rigid_body.py 2010-05-26 23:20:43 UTC (rev 10777)
@@ -503,9 +503,8 @@
if(bss is not None and params.bulk_solvent_and_scale):
if(fmodel_copy.f_obs.d_min() > 3.0):
bss.anisotropic_scaling=False
- fmodel_copy.update_solvent_and_scale(params = bss,
- out = log,
- verbose = -1)
+ fmodel_copy.update_solvent_and_scale(
+ params = bss, out = log, verbose = -1, optimize_mask=False)
if(fmodel_copy.f_obs.d_min() > 3.0):
assert save_bss_anisotropic_scaling is not None
bss.anisotropic_scaling = save_bss_anisotropic_scaling
@@ -549,7 +548,8 @@
update_f_mask = True,
out = log)
if(bss is not None and params.bulk_solvent_and_scale):
- fmodel.update_solvent_and_scale(params = bss, out = log, verbose= -1)
+ fmodel.update_solvent_and_scale(params = bss, out = log, verbose= -1,
+ optimize_mask=False)
self.show(fmodel = fmodel,
r_mat = self.total_rotation,
t_vec = self.total_translation,
@@ -559,7 +559,7 @@
monitors_call_back_handler(
monitor=None, model=None, fmodel=fmodel, method="rigid_body")
if(bss is not None and params.bulk_solvent_and_scale):
- fmodel.update_solvent_and_scale(out = log, verbose = -1)
+ fmodel.update_solvent_and_scale(out=log, verbose=-1, optimize_mask=False)
print >> log
self.show(fmodel = fmodel,
r_mat = self.total_rotation,
Modified: trunk/mmtbx/utils.py
===================================================================
--- trunk/mmtbx/utils.py 2010-05-26 18:05:22 UTC (rev 10776)
+++ trunk/mmtbx/utils.py 2010-05-26 23:20:43 UTC (rev 10777)
@@ -437,7 +437,7 @@
selection_zero = f_obs.data() == 0
print >> self.log, \
"Number of F-obs=0 (these reflections will be used in refinement):", \
- selection_zero.count(False)
+ selection_zero.count(True)
selection &= selection_positive
selection_by_fsigma = self._apply_sigma_cutoff(
f_obs = f_obs,
@@ -1486,7 +1486,7 @@
bss_params = bss.master_params.extract()
bss_params.bulk_solvent = bulk_solvent_correction
bss_params.anisotropic_scaling = anisotropic_scaling
- def get_fmodel(f_obs, xrs, flags, mp, tl, bssf, bssp, ro):
+ def get_fmodel(f_obs, xrs, flags, mp, tl, bssf, bssp, ro, om):
fmodel = fmodel_manager(
xray_structure = xrs.deep_copy_scatterers(),
f_obs = f_obs.deep_copy(),
@@ -1497,23 +1497,27 @@
if(tl is None and ro):
sel = fmodel.outlier_selection()
fmodel = fmodel.select(selection = sel)
- fmodel.update_solvent_and_scale(params = bssp, verbose = -1, out = log)
+ fmodel.update_solvent_and_scale(params = bssp, verbose = -1, out = log,
+ optimize_mask=om)
return fmodel
if((twin_laws is None or twin_laws==[None]) and not skip_twin_detection):
twin_laws = xtriage(f_obs = f_obs.deep_copy())
+ optimize_mask = True
+ if(twin_laws is not None and len(twin_laws)>1): optimize_mask=False
# DEBUG twin_laws=None
if(len(xray_structures) == 1):
if(twin_laws is None): twin_laws = [None]
if(twin_laws.count(None)==0): twin_laws.append(None)
fmodel = get_fmodel(f_obs=f_obs, xrs=xray_structures[0], flags=r_free_flags,
mp=mask_params, tl=None, bssf=bulk_solvent_and_scaling, bssp=bss_params,
- ro = outliers_rejection)
+ ro = outliers_rejection,om=optimize_mask)
r_work = fmodel.r_work()
for twin_law in twin_laws:
if(twin_law is not None):
fmodel_ = get_fmodel(f_obs=f_obs, xrs=xray_structures[0],
flags=r_free_flags, mp=mask_params, tl=twin_law,
- bssf=bulk_solvent_and_scaling, bssp=bss_params, ro = outliers_rejection)
+ bssf=bulk_solvent_and_scaling, bssp=bss_params, ro = outliers_rejection,
+ om=optimize_mask)
r_work_ = fmodel_.r_work()
if(abs(r_work-r_work_)*100 > twin_switch_tolerance and r_work_<r_work):
r_work = r_work_
@@ -1829,7 +1833,8 @@
f_obs = f_obs,
r_free_flags = r_free_flags,
target_name = "ls_wunit_k1")
- fmodel.update_solvent_and_scale(params = bss_params, verbose = -1)
+ fmodel.update_solvent_and_scale(params = bss_params, verbose = -1,
+ optimize_mask = False)
r_work_ = fmodel.r_work()
if(r_work_ < r_work):
r_work = r_work_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nat...@us...> - 2010-05-26 18:05:28
|
Revision: 10776
http://cctbx.svn.sourceforge.net/cctbx/?rev=10776&view=rev
Author: natechols
Date: 2010-05-26 18:05:22 +0000 (Wed, 26 May 2010)
Log Message:
-----------
catch unpickleable boost errors, substitute RuntimeError with message preserved
Modified Paths:
--------------
trunk/libtbx/thread_utils.py
Modified: trunk/libtbx/thread_utils.py
===================================================================
--- trunk/libtbx/thread_utils.py 2010-05-26 18:04:52 UTC (rev 10775)
+++ trunk/libtbx/thread_utils.py 2010-05-26 18:05:22 UTC (rev 10776)
@@ -140,6 +140,9 @@
except Abort :
message = child_process_message(message_type="abort", data=None)
except Exception, e :
+ if e.__class__.__module__ == "Boost.Python" :
+ e = RuntimeError("Boost.Python.%s: %s" % (e.__class__.__name__,
+ str(e)))
Sorry.reset_module()
traceback_str = "\n".join(traceback.format_tb(sys.exc_info()[2]))
message = child_process_message(message_type="exception",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nat...@us...> - 2010-05-26 18:04:58
|
Revision: 10775
http://cctbx.svn.sourceforge.net/cctbx/?rev=10775&view=rev
Author: natechols
Date: 2010-05-26 18:04:52 +0000 (Wed, 26 May 2010)
Log Message:
-----------
fixed space group type bug
Modified Paths:
--------------
trunk/mmtbx/command_line/cif_as_mtz.py
Modified: trunk/mmtbx/command_line/cif_as_mtz.py
===================================================================
--- trunk/mmtbx/command_line/cif_as_mtz.py 2010-05-25 23:28:47 UTC (rev 10774)
+++ trunk/mmtbx/command_line/cif_as_mtz.py 2010-05-26 18:04:52 UTC (rev 10775)
@@ -865,7 +865,7 @@
args=["-x", params.input.pdb_id],
log=log)
symm = crystal_symmetry_from_any.extract_from(params.input.pdb_file)
- params.crystal_symmetry.space_group = symm.space_group()
+ params.crystal_symmetry.space_group = symm.space_group_info()
params.crystal_symmetry.unit_cell = symm.unit_cell()
params.input.pdb_id = None
if check_params :
@@ -876,8 +876,10 @@
if not params.options.use_model :
params.input.pdb_file = None
if symm is None :
+ assert (type(params.crystal_symmetry.space_group).__name__ ==
+ "space_group_info")
symm = crystal.symmetry(
- space_group=params.crystal_symmetry.space_group,
+ space_group_info=params.crystal_symmetry.space_group,
unit_cell=params.crystal_symmetry.unit_cell)
process_files(
file_name=params.input.cif_file,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nat...@us...> - 2010-05-25 23:28:53
|
Revision: 10774
http://cctbx.svn.sourceforge.net/cctbx/?rev=10774&view=rev
Author: natechols
Date: 2010-05-25 23:28:47 +0000 (Tue, 25 May 2010)
Log Message:
-----------
captions for phenix GUI
Modified Paths:
--------------
trunk/mmtbx/maps/__init__.py
Modified: trunk/mmtbx/maps/__init__.py
===================================================================
--- trunk/mmtbx/maps/__init__.py 2010-05-25 22:42:58 UTC (rev 10773)
+++ trunk/mmtbx/maps/__init__.py 2010-05-25 23:28:47 UTC (rev 10774)
@@ -51,9 +51,12 @@
sharpening = False
.type = bool
.help = Apply B-factor sharpening
+ .short_caption = Apply B-factor sharpening
+ .style = bold
sharpening_b_factor = None
.type = float
.help = Optional sharpening B-factor value
+ .short_caption = Sharpening B-factor value (optional)
}
"""
@@ -106,9 +109,12 @@
sharpening = False
.type = bool
.help = Apply B-factor sharpening
+ .short_caption = Apply B-factor sharpening
+ .style = bold
sharpening_b_factor = None
.type = float
.help = Optional sharpening B-factor value
+ .short_caption = Sharpening B-factor value (optional)
}
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|