diff --git a/deployment/win/create_archive.bat b/deployment/win/create_archive.bat index 98f7aeb441ae2d67a3d3411a7f7819549d3ce0d3..06902f502663f74180ca21132c842f14d606a6e4 100644 --- a/deployment/win/create_archive.bat +++ b/deployment/win/create_archive.bat @@ -2,20 +2,23 @@ REM create a zip archive for deployment on windows REM no regisrty entries REM no PATHs will be changed except in the DNG session -if exist openstructure rmdir /S /Q openstructure -if exist OpenStructure_WIN32.zip del OpenStructure_WIN32.zip -REM dir /S openstructure -mkdir openstructure\share\openstructure\examples -mkdir openstructure\lib\site-packages -mkdir openstructure\bin -xcopy /E /I ..\..\examples openstructure\share\openstructure\examples -xcopy /E /I ..\..\stage\share openstructure\share\ +set inst_dir=openstructure1.0.0a1_1885 +set archive_name=OpenStructureWin32 +if exist "%inst_dir%" rmdir /S /Q "%inst_dir%" +if exist %archive_name%.zip del %archive_name%.zip*.* +REM dir /S %inst_dir% +mkdir "%inst_dir%\share\openstructure\examples" +mkdir "%inst_dir%\lib\site-packages" +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 -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 /EXCLUDE:excludes d:\programs\lib openstructure\lib -xcopy /E /I ..\..\stage\lib openstructure\lib -xcopy /E /I ..\..\stage\bin openstructure\bin +xcopy /E /I /EXCLUDE:excludes d:\programs\lib "%inst_dir%\lib" +xcopy /E /I ..\..\stage\lib "%inst_dir%\lib" +xcopy /E /I /EXCLUDE:excludes ..\..\stage\bin "%inst_dir%\bin" set PATH="c:\Program Files (x86)"\7-Zip\;%PATH% -7z a -r -tzip OpenStructure_WIN32.zip openstructure > log \ No newline at end of file +REM 7z a -r -t7z %archive_name% "%inst_dir%" > log +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 diff --git a/modules/gfx/src/impl/entity_renderer.hh b/modules/gfx/src/impl/entity_renderer.hh index fe0d541383fff746d73770f7458b259decfbcad2..3a262d073254fa9079e79303688f4bc05eef5255 100644 --- a/modules/gfx/src/impl/entity_renderer.hh +++ b/modules/gfx/src/impl/entity_renderer.hh @@ -23,6 +23,10 @@ Author: Stefan Scheuber, Marco Biasini */ + +#if defined(GetProp) +#undef GetProp +#endif #include <vector> #include <ost/mol/query_view_wrapper.hh> diff --git a/modules/mol/base/pymod/export_chain.cc b/modules/mol/base/pymod/export_chain.cc index dba3791fdaa203c6206ee46451e5ba317570a37b..71896935b6b8855c899df06d1638c38da540ab93 100644 --- a/modules/mol/base/pymod/export_chain.cc +++ b/modules/mol/base/pymod/export_chain.cc @@ -53,6 +53,8 @@ void export_Chain() ; generic_prop_def<ChainBase>(chain_base); class_<ChainHandle, bases<ChainBase> >("ChainHandle", init<>()) + .def("GetAtomList", &ChainHandle::GetAtomList) + .add_property("atoms", &ChainHandle::GetAtomList) .def("GetResidueList", &ChainHandle::GetResidueList) .add_property("residues", &ChainHandle::GetResidueList) .add_property("entity", &ChainHandle::GetEntity) diff --git a/modules/mol/base/src/chain_handle.cc b/modules/mol/base/src/chain_handle.cc index 3306f2421963ea2378d93948af62e4cfcf9d52d5..156eca176a4d4b8b54a120e56f1f384bb87e78f2 100644 --- a/modules/mol/base/src/chain_handle.cc +++ b/modules/mol/base/src/chain_handle.cc @@ -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 reslist; diff --git a/modules/mol/base/src/chain_handle.hh b/modules/mol/base/src/chain_handle.hh index f2796309beb000e9e82d8ea3f967d4e2046a57e5..0faa7ee8fc2f691b3acc86d539300b93ca211843 100644 --- a/modules/mol/base/src/chain_handle.hh +++ b/modules/mol/base/src/chain_handle.hh @@ -115,12 +115,21 @@ public: /// /// \sa EntityHandle::GetResidueCount() 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 /// /// The residues are ordered by residue number in ascending order. If you only /// want to determine the number of residues, use the dedicated - /// \c ResidueHandle::GetResidueCount + /// \c ChainHandle::GetResidueCount ResidueHandleList GetResidueList() const; /// \brief Get iterator pointing to begin of residues diff --git a/modules/mol/base/src/entity_view.cc b/modules/mol/base/src/entity_view.cc index 16cbc6cc29b67195bf156ff92328e09a1958c786..00e9585ce2b5717c3ca339386a48b2ad08ffdfa8 100644 --- a/modules/mol/base/src/entity_view.cc +++ b/modules/mol/base/src/entity_view.cc @@ -582,6 +582,7 @@ EntityView EntityView::Copy() const ChainView EntityView::AddChain(const ChainView& chain_view, ViewAddFlags flags) { + this->CheckValidity(); ChainView cv; if (flags & ViewAddFlag::CHECK_DUPLICATES && (cv=this->FindChain(chain_view.GetHandle()))) { @@ -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 // to use the FindWithin method of the handle or do a full search of // all atoms included in the view. + this->CheckValidity(); AtomHandleList ahl=this->GetHandle().FindWithin(center, radius); AtomViewList avl; for (AtomHandleList::iterator i=ahl.begin(), e=ahl.end(); i!=e; ++i) {