diff --git a/lib/python_binding/include/python_binding/api/selection/helper.hpp b/lib/python_binding/include/python_binding/api/selection/helper.hpp index f9f7c5222..a44644f74 100644 --- a/lib/python_binding/include/python_binding/api/selection/helper.hpp +++ b/lib/python_binding/include/python_binding/api/selection/helper.hpp @@ -1,7 +1,7 @@ #ifndef __VTX_PYTHON_API_SELECTION_HELPER__ #define __VTX_PYTHON_API_SELECTION_HELPER__ -#include +#include #include #include #include @@ -13,7 +13,7 @@ namespace VTX::PythonBinding::API::Selection { - using SelectionObj = App::Application::Selection::Selection; + using SelectionObj = App::Selection::Selection; // Function that manage a param that can be a single T1 or a list of T1 and convert it into a vector of str template diff --git a/lib/python_binding/include/python_binding/api/selection/selection_interpretor.hpp b/lib/python_binding/include/python_binding/api/selection/selection_interpretor.hpp index 7d68ac64f..1e265a93e 100644 --- a/lib/python_binding/include/python_binding/api/selection/selection_interpretor.hpp +++ b/lib/python_binding/include/python_binding/api/selection/selection_interpretor.hpp @@ -2,13 +2,13 @@ #define __VTX_PYTHON_API_SELECTION_SELECTION_INTERPRETOR__ #include "_fwd.hpp" -#include #include +#include #include namespace VTX::PythonBinding::API::Selection { - using Selection = App::Application::Selection::Selection; + using Selection = App::Selection::Selection; class SelectionInterpretor { diff --git a/lib/python_binding/include/python_binding/api/selection/selection_wrapper.hpp b/lib/python_binding/include/python_binding/api/selection/selection_wrapper.hpp index 5bf53f556..882d018ae 100644 --- a/lib/python_binding/include/python_binding/api/selection/selection_wrapper.hpp +++ b/lib/python_binding/include/python_binding/api/selection/selection_wrapper.hpp @@ -3,7 +3,7 @@ #include "_fwd.hpp" #include "python_binding/api/selection/helper.hpp" -#include +#include #include #include #include @@ -11,7 +11,7 @@ namespace VTX::PythonBinding::API::Selection { - using Selection = App::Application::Selection::Selection; + using Selection = App::Selection::Selection; class SelectionWrapper { diff --git a/lib/python_binding/include/python_binding/api/selection/system_interpretor.hpp b/lib/python_binding/include/python_binding/api/selection/system_interpretor.hpp index d2e6b926b..0dda4bb44 100644 --- a/lib/python_binding/include/python_binding/api/selection/system_interpretor.hpp +++ b/lib/python_binding/include/python_binding/api/selection/system_interpretor.hpp @@ -1,8 +1,8 @@ #ifndef __VTX_PYTHON_API_SELECTION_MOLECULE_INTERPRETOR__ #define __VTX_PYTHON_API_SELECTION_MOLECULE_INTERPRETOR__ -#include -#include +#include +#include #include #include #include @@ -49,31 +49,31 @@ namespace VTX::PythonBinding::API::Selection }; public: - static void interpretSystems( App::Application::Selection::Selection &, const pybind11::kwargs & ); + static void interpretSystems( App::Selection::Selection &, const pybind11::kwargs & ); private: static std::set _getSystems( const InterpretedKwargs & p_kwargs ); static void _selectChains( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ); static void _selectResidues( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ); static void _selectAtoms( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ); static void _addAtomsFollowingKwargs( const atom_index_t p_firstAtom, const atom_index_t p_lastAtom, App::Component::Chemistry::System & p_system, - App::Application::Selection::SystemData & p_systemSelectionData, + App::Selection::SystemData & p_systemSelectionData, const InterpretedKwargs & p_kwargs ); }; diff --git a/lib/python_binding/src/python_binding/api/selection/selection_wrapper.cpp b/lib/python_binding/src/python_binding/api/selection/selection_wrapper.cpp index 3c877c97b..238f58f03 100644 --- a/lib/python_binding/src/python_binding/api/selection/selection_wrapper.cpp +++ b/lib/python_binding/src/python_binding/api/selection/selection_wrapper.cpp @@ -1,13 +1,13 @@ #include "python_binding/api/selection/selection_wrapper.hpp" #include -#include -#include #include #include #include #include #include #include +#include +#include #include #include @@ -84,9 +84,10 @@ namespace VTX::PythonBinding::API::Selection { App::Component::Chemistry::System & mol = *it; - const App::Application::Selection::SystemData & molSelection - //= PythonFixture::ECS_REGISTRY().getComponent( *it ); - = _selection->getSelectionDataFromComponent( mol + const App::Selection::SystemData & molSelection + //= PythonFixture::ECS_REGISTRY().getComponent( *it + //); + = _selection->getSelectionDataFromComponent( mol ); // TODO : is this working properly ? for ( const size_t & chainID : molSelection.getChainIds() ) @@ -107,9 +108,10 @@ namespace VTX::PythonBinding::API::Selection { App::Component::Chemistry::System & mol = *it; - const App::Application::Selection::SystemData & molSelection - //= PythonFixture::ECS_REGISTRY().getComponent( *it ); - = _selection->getSelectionDataFromComponent( mol + const App::Selection::SystemData & molSelection + //= PythonFixture::ECS_REGISTRY().getComponent( *it + //); + = _selection->getSelectionDataFromComponent( mol ); // TODO : is this working properly ? for ( const size_t & residueID : molSelection.getResidueIds() ) @@ -130,8 +132,8 @@ namespace VTX::PythonBinding::API::Selection { App::Component::Chemistry::System & mol = *it; - const App::Application::Selection::SystemData & molSelection - = _selection->getSelectionDataFromComponent( mol ); + const App::Selection::SystemData & molSelection + = _selection->getSelectionDataFromComponent( mol ); for ( const atom_index_t & atomID : molSelection.getAtomIds() ) { diff --git a/lib/python_binding/src/python_binding/api/selection/system_interpretor.cpp b/lib/python_binding/src/python_binding/api/selection/system_interpretor.cpp index 5d305e4fa..848fd0097 100644 --- a/lib/python_binding/src/python_binding/api/selection/system_interpretor.cpp +++ b/lib/python_binding/src/python_binding/api/selection/system_interpretor.cpp @@ -72,7 +72,7 @@ namespace VTX::PythonBinding::API::Selection bool SystemInterpretor::InterpretedKwargs::hasSpecifyAtom() const { return _hasAtomParams; } void SystemInterpretor::interpretSystems( - App::Application::Selection::Selection & p_selection, + App::Selection::Selection & p_selection, const pybind11::kwargs & p_kwargs ) { @@ -92,9 +92,9 @@ namespace VTX::PythonBinding::API::Selection App::Component::Scene::Selectable & selectableComponent = App::ECS_REGISTRY().getComponent( *system ); - App::Application::Selection::SystemData & systemSelectionData - = p_selection.select( - selectableComponent, App::Application::Selection::AssignmentType::APPEND + App::Selection::SystemData & systemSelectionData + = p_selection.select( + selectableComponent, App::Selection::AssignmentType::APPEND ); if ( !selectFullSystem ) @@ -158,7 +158,7 @@ namespace VTX::PythonBinding::API::Selection void SystemInterpretor::_selectChains( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ) { System & system = p_systemSelectionData.getSystem(); @@ -203,11 +203,11 @@ namespace VTX::PythonBinding::API::Selection void SystemInterpretor::_selectResidues( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ) { const System & system = p_systemSelectionData.getSystem(); - const App::Application::Selection::SystemData::IndexRangeList & chainIDs + const App::Selection::SystemData::IndexRangeList & chainIDs = p_systemSelectionData.getChainIds(); const bool selectFullResidue = !p_kwargs.hasSpecifyAtom(); @@ -303,17 +303,17 @@ namespace VTX::PythonBinding::API::Selection void SystemInterpretor::_selectAtoms( const InterpretedKwargs & p_kwargs, - App::Application::Selection::SystemData & p_systemSelectionData + App::Selection::SystemData & p_systemSelectionData ) { System & system = p_systemSelectionData.getSystem(); - const App::Application::Selection::SystemData::IndexRangeList & residueIDs + const App::Selection::SystemData::IndexRangeList & residueIDs = p_systemSelectionData.getResidueIds(); if ( residueIDs.isEmpty() ) { - const App::Application::Selection::SystemData::IndexRangeList & chainIDs + const App::Selection::SystemData::IndexRangeList & chainIDs = p_systemSelectionData.getChainIds(); if ( chainIDs.isEmpty() ) @@ -343,7 +343,7 @@ namespace VTX::PythonBinding::API::Selection } else { - const App::Application::Selection::SystemData::IndexRangeList & residueIDs + const App::Selection::SystemData::IndexRangeList & residueIDs = p_systemSelectionData.getResidueIds(); for ( const size_t residueID : residueIDs ) @@ -368,7 +368,7 @@ namespace VTX::PythonBinding::API::Selection const atom_index_t p_firstAtom, const atom_index_t p_lastAtom, System & p_system, - App::Application::Selection::SystemData & p_systemSelectionData, + App::Selection::SystemData & p_systemSelectionData, const InterpretedKwargs & p_kwargs ) { diff --git a/lib/python_binding/src/python_binding/binding/binders/selection.cpp b/lib/python_binding/src/python_binding/binding/binders/selection.cpp index 34edc8356..bf25db6f4 100644 --- a/lib/python_binding/src/python_binding/binding/binders/selection.cpp +++ b/lib/python_binding/src/python_binding/binding/binders/selection.cpp @@ -2,7 +2,7 @@ #include "python_binding/api/selection/selection_interpretor.hpp" #include "python_binding/api/selection/selection_wrapper.hpp" #include "python_binding/api/selection/system_interpretor.hpp" -#include +#include #include #include #include @@ -35,7 +35,7 @@ namespace VTX::PythonBinding::Binding::Binders p_apiModule.def( "intersect", &API::Selection::SelectionWrapper::intersect ); p_apiModule.def( "exclusive", &API::Selection::SelectionWrapper::exclusive ); - pybind11::class_( + pybind11::class_( p_apiModule, "_VTXSelection", pybind11::module_local() ); diff --git a/lib/python_binding/test/src/util/selection.cpp b/lib/python_binding/test/src/util/selection.cpp index 9e4726a16..0c3eefa10 100644 --- a/lib/python_binding/test/src/util/selection.cpp +++ b/lib/python_binding/test/src/util/selection.cpp @@ -1,6 +1,6 @@ #include "selection.hpp" #include -#include +#include #include #include #include diff --git a/lib/python_binding/test/src/util/selection.hpp b/lib/python_binding/test/src/util/selection.hpp index 7adb1ef86..b7bf1f8e0 100644 --- a/lib/python_binding/test/src/util/selection.hpp +++ b/lib/python_binding/test/src/util/selection.hpp @@ -1,10 +1,10 @@ #ifndef __VTX_APP_TEST_UTIL_SELECTION__ #define __VTX_APP_TEST_UTIL_SELECTION__ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -13,9 +13,9 @@ namespace VTX::App::Test::Util { class Selection { - using SystemData = VTX::App::Application::Selection::SystemData; - using SelectionData = VTX::App::Application::Selection::SelectionData; - using SelectionObj = VTX::App::Application::Selection::Selection; + using SystemData = VTX::App::Selection::SystemData; + using SelectionData = VTX::App::Selection::SelectionData; + using SelectionObj = VTX::App::Selection::Selection; public: static bool checkSelection( @@ -27,7 +27,7 @@ namespace VTX::App::Test::Util static SelectionObj createSelection( const SelectionData & p_item ); static SelectionObj createSelection( const std::unique_ptr & p_itemPtr ); - template + template static SelectionObj createSelection( const std::initializer_list & p_items ) { SelectionObj res = SelectionObj(); @@ -35,9 +35,7 @@ namespace VTX::App::Test::Util for ( const T & sourceItemPtr : p_items ) { res.select( - sourceItemPtr.getSelectionComponent(), - sourceItemPtr, - VTX::App::Application::Selection::AssignmentType::APPEND + sourceItemPtr.getSelectionComponent(), sourceItemPtr, VTX::App::Selection::AssignmentType::APPEND ); } @@ -52,9 +50,7 @@ namespace VTX::App::Test::Util for ( const SelectionData * const sourceItemPtr : p_items ) { res.select( - sourceItemPtr->getSelectionComponent(), - *sourceItemPtr, - VTX::App::Application::Selection::AssignmentType::APPEND + sourceItemPtr->getSelectionComponent(), *sourceItemPtr, VTX::App::Selection::AssignmentType::APPEND ); } @@ -68,5 +64,5 @@ namespace VTX::App::Test::Util const std::vector & p_atoms = {} ); }; -} // namespace VTX::PythonFixture::Test::Util +} // namespace VTX::App::Test::Util #endif diff --git a/lib/python_binding/test/src/vtx_api_selection.cpp b/lib/python_binding/test/src/vtx_api_selection.cpp index 141f34ff0..ace0a86a5 100644 --- a/lib/python_binding/test/src/vtx_api_selection.cpp +++ b/lib/python_binding/test/src/vtx_api_selection.cpp @@ -1,8 +1,8 @@ #include "util/app.hpp" #include "util/selection.hpp" #include -#include -#include +#include +#include #include #include #include @@ -60,7 +60,7 @@ TEST_CASE( "VTX_PYTHON_BINDING - VTX API Selection Tests", "[integration]" ) *SelectionUtil::generateSystemData( "8QHQ", { 0, 6 } ) } ) ) ); - std::unique_ptr allHistidineOn4HHB = SelectionUtil::generateSystemData( + std::unique_ptr allHistidineOn4HHB = SelectionUtil::generateSystemData( "4HHB", {}, { @@ -172,7 +172,7 @@ TEST_CASE( "VTX_PYTHON_BINDING - VTX API Selection Tests", "[integration]" ) ) ); CHECK( SelectionUtil::checkSelection( - "test_empty_1", "select( mol_n='Nimportequoi', chain_i=1 )", App::Application::Selection::Selection() + "test_empty_1", "select( mol_n='Nimportequoi', chain_i=1 )", App::Selection::Selection() ) ); CHECK( SelectionUtil::checkSelection(