Skip to content
Snippets Groups Projects
Commit 73239df5 authored by juergen's avatar juergen
Browse files

-updating bundling script for windows

-adding GetAtomList to chainhandles and enabling .atoms property
-fixing already defined getprop in windows in entitity_view

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1886 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 56349dd8
No related branches found
No related tags found
No related merge requests found
...@@ -2,20 +2,23 @@ ...@@ -2,20 +2,23 @@
REM create a zip archive for deployment on windows REM create a zip archive for deployment on windows
REM no regisrty entries REM no regisrty entries
REM no PATHs will be changed except in the DNG session REM no PATHs will be changed except in the DNG session
if exist openstructure rmdir /S /Q openstructure set inst_dir=openstructure1.0.0a1_1885
if exist OpenStructure_WIN32.zip del OpenStructure_WIN32.zip set archive_name=OpenStructureWin32
REM dir /S openstructure if exist "%inst_dir%" rmdir /S /Q "%inst_dir%"
mkdir openstructure\share\openstructure\examples if exist %archive_name%.zip del %archive_name%.zip*.*
mkdir openstructure\lib\site-packages REM dir /S %inst_dir%
mkdir openstructure\bin mkdir "%inst_dir%\share\openstructure\examples"
xcopy /E /I ..\..\examples openstructure\share\openstructure\examples mkdir "%inst_dir%\lib\site-packages"
xcopy /E /I ..\..\stage\share openstructure\share\ mkdir "%inst_dir%\bin"
xcopy /E /I ..\..\examples "%inst_dir%\share\openstructure\examples"
xcopy /E /I ..\..\stage\share "%inst_dir%\share\"
REM xcopy /E /I ..\..\website\html "%inst_dir%\share\doc"
copy d:\programs\bin\python.exe "%inst_dir%\bin"
xcopy /E /I d:\programs\bin openstructure\bin xcopy /E /I /EXCLUDE:excludes d:\programs\lib "%inst_dir%\lib"
REM copy d:\programs\lib\boost*iostreams*.* d:\programs\lib\boost*unit_test_frame*.* d:\programs\lib\boost*python*.* d:\programs\lib\boost*math*.* d:\programs\lib\boost*system*.* d:\programs\lib\boost*program_options*.* d:\programs\lib\boost*regex*.* d:\programs\lib\_*.* d:\programs\lib\*.py d:\programs\lib\*png*13*.* d:\programs\lib\*zlib*.* d:\programs\lib\*tif*.* d:\programs\lib\py*.* d:\programs\lib\*select*.* d:\programs\lib\*unicode*.* openstructure\lib xcopy /E /I ..\..\stage\lib "%inst_dir%\lib"
xcopy /E /I /EXCLUDE:excludes ..\..\stage\bin "%inst_dir%\bin"
xcopy /E /I /EXCLUDE:excludes d:\programs\lib openstructure\lib
xcopy /E /I ..\..\stage\lib openstructure\lib
xcopy /E /I ..\..\stage\bin openstructure\bin
set PATH="c:\Program Files (x86)"\7-Zip\;%PATH% set PATH="c:\Program Files (x86)"\7-Zip\;%PATH%
7z a -r -tzip OpenStructure_WIN32.zip openstructure > log REM 7z a -r -t7z %archive_name% "%inst_dir%" > log
\ No newline at end of file REM if exist %archive_name%.7z copy /b 7zS.sfx + config.txt + %archive_name%.7z %archive_name%.exe
7z a -r -tzip %archive_name% "%inst_dir%" > log
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
Author: Stefan Scheuber, Marco Biasini Author: Stefan Scheuber, Marco Biasini
*/ */
#if defined(GetProp)
#undef GetProp
#endif
#include <vector> #include <vector>
#include <ost/mol/query_view_wrapper.hh> #include <ost/mol/query_view_wrapper.hh>
......
...@@ -53,6 +53,8 @@ void export_Chain() ...@@ -53,6 +53,8 @@ void export_Chain()
; ;
generic_prop_def<ChainBase>(chain_base); generic_prop_def<ChainBase>(chain_base);
class_<ChainHandle, bases<ChainBase> >("ChainHandle", init<>()) class_<ChainHandle, bases<ChainBase> >("ChainHandle", init<>())
.def("GetAtomList", &ChainHandle::GetAtomList)
.add_property("atoms", &ChainHandle::GetAtomList)
.def("GetResidueList", &ChainHandle::GetResidueList) .def("GetResidueList", &ChainHandle::GetResidueList)
.add_property("residues", &ChainHandle::GetResidueList) .add_property("residues", &ChainHandle::GetResidueList)
.add_property("entity", &ChainHandle::GetEntity) .add_property("entity", &ChainHandle::GetEntity)
......
...@@ -92,6 +92,14 @@ AtomHandle ChainHandle::FindAtom(const ResNum& num, ...@@ -92,6 +92,14 @@ AtomHandle ChainHandle::FindAtom(const ResNum& num,
} }
AtomHandleList ChainHandle::GetAtomList() const
{
this->CheckValidity();
AtomHandleList atoms;
std::copy(AtomsBegin(), AtomsEnd(), std::back_inserter(atoms));
return atoms;
}
ResidueHandleList ChainHandle::GetResidueList() const ResidueHandleList ChainHandle::GetResidueList() const
{ {
ResidueHandleList reslist; ResidueHandleList reslist;
......
...@@ -115,12 +115,21 @@ public: ...@@ -115,12 +115,21 @@ public:
/// ///
/// \sa EntityHandle::GetResidueCount() /// \sa EntityHandle::GetResidueCount()
int GetResidueCount() const; int GetResidueCount() const;
/// \brief Retrieve atoms of this chain as a list
///
/// The atoms are ordered by atom number in ascending order. If you only
/// want to determine the number of atoms, use the dedicated
/// \c ChainHandle::GetAtomCount
AtomHandleList GetAtomList() const;
/// \brief Get residues of this chain as a list /// \brief Get residues of this chain as a list
/// ///
/// The residues are ordered by residue number in ascending order. If you only /// The residues are ordered by residue number in ascending order. If you only
/// want to determine the number of residues, use the dedicated /// want to determine the number of residues, use the dedicated
/// \c ResidueHandle::GetResidueCount /// \c ChainHandle::GetResidueCount
ResidueHandleList GetResidueList() const; ResidueHandleList GetResidueList() const;
/// \brief Get iterator pointing to begin of residues /// \brief Get iterator pointing to begin of residues
......
...@@ -582,6 +582,7 @@ EntityView EntityView::Copy() const ...@@ -582,6 +582,7 @@ EntityView EntityView::Copy() const
ChainView EntityView::AddChain(const ChainView& chain_view, ChainView EntityView::AddChain(const ChainView& chain_view,
ViewAddFlags flags) ViewAddFlags flags)
{ {
this->CheckValidity();
ChainView cv; ChainView cv;
if (flags & ViewAddFlag::CHECK_DUPLICATES && if (flags & ViewAddFlag::CHECK_DUPLICATES &&
(cv=this->FindChain(chain_view.GetHandle()))) { (cv=this->FindChain(chain_view.GetHandle()))) {
...@@ -623,6 +624,7 @@ AtomViewList EntityView::FindWithin(const geom::Vec3& center, Real radius) const ...@@ -623,6 +624,7 @@ AtomViewList EntityView::FindWithin(const geom::Vec3& center, Real radius) const
// could use some heuristic here to decide whether it is useful // could use some heuristic here to decide whether it is useful
// to use the FindWithin method of the handle or do a full search of // to use the FindWithin method of the handle or do a full search of
// all atoms included in the view. // all atoms included in the view.
this->CheckValidity();
AtomHandleList ahl=this->GetHandle().FindWithin(center, radius); AtomHandleList ahl=this->GetHandle().FindWithin(center, radius);
AtomViewList avl; AtomViewList avl;
for (AtomHandleList::iterator i=ahl.begin(), e=ahl.end(); i!=e; ++i) { for (AtomHandleList::iterator i=ahl.begin(), e=ahl.end(); i!=e; ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment