diff --git a/Core/Export/SampleToPython.cpp b/Core/Export/SampleToPython.cpp index 57a3a7465a6ba76de7f780a29c5f116a8fe91db8..037d4ea6e30082a96c2fb5d79d377df441994f02 100644 --- a/Core/Export/SampleToPython.cpp +++ b/Core/Export/SampleToPython.cpp @@ -78,13 +78,13 @@ void setRotationInformation(const IParticle* particle, std::string name, std::os void setPositionInformation(const IParticle* particle, std::string name, std::ostringstream& result) { - R3 pos = particle->position(); + R3 pos = particle->particlePosition(); if (pos == R3()) return; result << indent() << name << "_position = R3(" << Py::Fmt::printNm(pos.x()) << ", " << Py::Fmt::printNm(pos.y()) << ", " << Py::Fmt::printNm(pos.z()) << ")\n"; - result << indent() << name << ".setPosition(" << name << "_position)\n"; + result << indent() << name << ".setParticlePosition(" << name << "_position)\n"; } } // namespace diff --git a/Examples/fit61_Galaxi/sample_builder.py b/Examples/fit61_Galaxi/sample_builder.py index 66b35372be79554478370bb4150c56d67011dc39..50b0c3193c55031c54be6a505124edea31437fcc 100755 --- a/Examples/fit61_Galaxi/sample_builder.py +++ b/Examples/fit61_Galaxi/sample_builder.py @@ -57,7 +57,7 @@ class SampleBuilder: sphere = ba.Particle(m_Ag, sphere_ff) position = ba.R3(0, 0, -1*self.hmdso_thickness) - sphere.setPosition(position) + sphere.setParticlePosition(position) ln_distr = ba.DistributionLogNormal(self.radius, self.sigma) par_distr = ba.ParameterDistribution( "/Particle/FullSphere/Radius", ln_distr, nparticles, nfwhm, diff --git a/Examples/scatter2d/BiMaterialCylinders.py b/Examples/scatter2d/BiMaterialCylinders.py index dbc647065f2db2bd88fc238cb315533f18c5121e..5bedc072c7caad4fa25a75feed5aac3caec6ec53 100755 --- a/Examples/scatter2d/BiMaterialCylinders.py +++ b/Examples/scatter2d/BiMaterialCylinders.py @@ -27,14 +27,14 @@ def get_sample(): # Define particles subparticle_1 = ba.Particle(material_Ag, ff_1) - subparticle_1.setPosition(R3(0, 0, 10*nm)) + subparticle_1.setParticlePosition(R3(0, 0, 10*nm)) subparticle_2 = ba.Particle(material_Teflon, ff_2) # Define composition of particles at specific positions particle = ba.ParticleComposition() particle.addParticle(subparticle_1) particle.addParticle(subparticle_2) - particle.setPosition(R3(0, 0, -10*nm)) + particle.setParticlePosition(R3(0, 0, -10*nm)) # Define particle layouts layout = ba.ParticleLayout() diff --git a/Examples/scatter2d/BuriedParticles.py b/Examples/scatter2d/BuriedParticles.py index 29acc0f0da11e57e0a23c3feafd3709b2d9d0bbd..656d6ff67a4ba0fc741c84d82cca823c61050e92 100755 --- a/Examples/scatter2d/BuriedParticles.py +++ b/Examples/scatter2d/BuriedParticles.py @@ -26,7 +26,7 @@ def get_sample(): # Define particles particle = ba.Particle(material_Particle, ff) particle_position = R3(0, 0, -25.2*nm) - particle.setPosition(particle_position) + particle.setParticlePosition(particle_position) # Define particle layouts layout = ba.ParticleLayout() diff --git a/Examples/scatter2d/HexagonalLatticesWithBasis.py b/Examples/scatter2d/HexagonalLatticesWithBasis.py index 63e4f9657a1d90018ecc79c7e316d7ce6b6146ea..a448e4ef867d7bcc54ffd4e9886f4dfd7ff7faa1 100755 --- a/Examples/scatter2d/HexagonalLatticesWithBasis.py +++ b/Examples/scatter2d/HexagonalLatticesWithBasis.py @@ -25,7 +25,7 @@ def get_sample(): particle_1 = ba.Particle(material_Particle, ff_1) particle_2 = ba.Particle(material_Particle, ff_2) particle_2_position = R3(10*nm, 10*nm, 17.3205080757*nm) - particle_2.setPosition(particle_2_position) + particle_2.setParticlePosition(particle_2_position) # Define composition of particles at specific positions basis = ba.ParticleComposition() diff --git a/Examples/scatter2d/Interference2DCenteredSquareLattice.py b/Examples/scatter2d/Interference2DCenteredSquareLattice.py index 8ff99f7ef7e8ef6530e947fe8185b2d923acb186..65a84080fd60e1f82197edd44de2e561c382e632 100755 --- a/Examples/scatter2d/Interference2DCenteredSquareLattice.py +++ b/Examples/scatter2d/Interference2DCenteredSquareLattice.py @@ -24,7 +24,7 @@ def get_sample(): ff = ba.FormFactorCylinder(r, r) particle_1 = ba.Particle(material_Particle, ff) particle_2 = ba.Particle(material_Particle, ff) - particle_2.setPosition(R3(a/2, a/2, 0)) + particle_2.setParticlePosition(R3(a/2, a/2, 0)) # Define composition of particles at specific positions basis = ba.ParticleComposition() diff --git a/Examples/scatter2d/MagneticSpheres.py b/Examples/scatter2d/MagneticSpheres.py index 9c0d1d0504465351ee92af5a9e7ff50f7086fc50..dbd0e76feacd7eae97f5b067a1c8e33dc5a0dd3c 100755 --- a/Examples/scatter2d/MagneticSpheres.py +++ b/Examples/scatter2d/MagneticSpheres.py @@ -25,7 +25,7 @@ def get_sample(): # Define particles particle = ba.Particle(material_Particle, ff) particle_position = R3(0, 0, -10*nm) - particle.setPosition(particle_position) + particle.setParticlePosition(particle_position) # Define particle layouts layout = ba.ParticleLayout() diff --git a/Examples/scatter2d/ParticlesCrossingInterface.py b/Examples/scatter2d/ParticlesCrossingInterface.py index b4ae43e79a1313be77e23df6858bfa76a81d455f..3bb2f5448c8f74b4c6bfd56d68918a9902fde535 100755 --- a/Examples/scatter2d/ParticlesCrossingInterface.py +++ b/Examples/scatter2d/ParticlesCrossingInterface.py @@ -38,10 +38,10 @@ def get_sample(): # Define particles particle_1 = ba.Particle(material_Particle, ff_1) particle_1_position = R3(0, 0, -3*nm) - particle_1.setPosition(particle_1_position) + particle_1.setParticlePosition(particle_1_position) particle_2 = ba.Particle(material_Particle, ff_2) particle_2_position = R3(0, 0, -3*nm) - particle_2.setPosition(particle_2_position) + particle_2.setParticlePosition(particle_2_position) # Define interference functions iff = ba.InterferenceNone() diff --git a/Examples/scatter2d/PolarizedSANS.py b/Examples/scatter2d/PolarizedSANS.py index 0636adeaadda78facc1d0cc7bf65c3bf3feb83af..98bb1742159894a5a34a0d7e041fed060c240efa 100755 --- a/Examples/scatter2d/PolarizedSANS.py +++ b/Examples/scatter2d/PolarizedSANS.py @@ -27,7 +27,7 @@ def get_sample(): # Define particles particle_1 = ba.Particle(material_Core, ff_1) particle_1_position = R3(0, 0, 2*nm) - particle_1.setPosition(particle_1_position) + particle_1.setParticlePosition(particle_1_position) particle_2 = ba.Particle(material_Shell, ff_2) # Define core shell particles diff --git a/Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py b/Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py index 5796c7a87399a8c7d94292dbfdde04803d8a4b69..674bd5e7ad19f31af7295ed5f69f1ee03ffb4d25 100755 --- a/Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py +++ b/Examples/scatter2d/disabled/Interference2DLatticeSumOfRotated.py @@ -24,7 +24,7 @@ def get_sample(): ff = ba.FormFactorCylinder(3*nm, 3*nm) position = ba.R3(0, 0, 0) cylinder = ba.Particle(m_particle, ff.clone()) - cylinder.setPosition(position) + cylinder.setParticlePosition(position) particle_layout.addParticle(cylinder) particle_layout.setInterference(p_interparticle) diff --git a/GUI/Model/From/GUIDomainSampleVisitor.cpp b/GUI/Model/From/GUIDomainSampleVisitor.cpp index cf65051d6ea2f7be2fd7cccc7e790405db444895..b8702754c15e3b6abdaa526d0e7f83b1fdc545d4 100644 --- a/GUI/Model/From/GUIDomainSampleVisitor.cpp +++ b/GUI/Model/From/GUIDomainSampleVisitor.cpp @@ -618,7 +618,7 @@ template <typename T> T* GUIDomainSampleVisitor::InsertIParticle(const IParticle ASSERT(particle_item); particle_item->setAbundance(particle->abundance()); - particle_item->setPosition(particle->position()); + particle_item->setPosition(particle->particlePosition()); m_levelToParentItem[depth()] = particle_item; m_itemToSample[particle_item] = particle; diff --git a/GUI/Model/Sample/ItemWithParticles.cpp b/GUI/Model/Sample/ItemWithParticles.cpp index 02b5da7dbdce8210f55a04e82ad9bb8cfdfc5ce7..828512179f60bb798e39dabd824b5ee3d45bf936 100644 --- a/GUI/Model/Sample/ItemWithParticles.cpp +++ b/GUI/Model/Sample/ItemWithParticles.cpp @@ -181,7 +181,7 @@ bool ItemWithParticles::isShellParticle() const void ItemWithParticles::setTransformationInfo(IParticle* result) const { - result->setPosition(position()); + result->setParticlePosition(position()); const Transform3D r = rotation(); if (!r.isIdentity()) { std::unique_ptr<IRotation> rotation(IRotation::createRotation(r)); diff --git a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp index 9a549926c7fc6f6a7f33cbb2280ec02456f0b4e4..be8e3409bd63a9b1d88d4e87cb250e778bcce639 100644 --- a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp +++ b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp @@ -149,9 +149,9 @@ void GUI::RealSpace::BuilderUtils::applyParticleTransformations( particle_rotate = implementParticleRotationfromIRotation(rotation); // translation - float x = static_cast<float>(particle.position().x()); - float y = static_cast<float>(particle.position().y()); - float z = static_cast<float>(particle.position().z()); + float x = static_cast<float>(particle.particlePosition().x()); + float y = static_cast<float>(particle.particlePosition().y()); + float z = static_cast<float>(particle.particlePosition().z()); GUI::RealSpace::Vector3D position(x + static_cast<float>(origin.x()), y + static_cast<float>(origin.y()), z + static_cast<float>(origin.z())); @@ -183,13 +183,13 @@ void GUI::RealSpace::BuilderUtils::applyParticleCoreShellTransformations( particle_rotate = implementParticleRotationfromIRotation(rotation); // translation - R3 positionCoreShell = particleCoreShell.position(); + R3 positionCoreShell = particleCoreShell.particlePosition(); P_clone->translate(positionCoreShell); - GUI::RealSpace::Vector3D position(static_cast<float>(P_clone->position().x() + origin.x()), - static_cast<float>(P_clone->position().y() + origin.y()), - static_cast<float>(P_clone->position().z() + origin.z())); + GUI::RealSpace::Vector3D position(static_cast<float>(P_clone->particlePosition().x() + origin.x()), + static_cast<float>(P_clone->particlePosition().y() + origin.y()), + static_cast<float>(P_clone->particlePosition().z() + origin.z())); particle3D.transform(particle_rotate, position); } diff --git a/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp index fb6eeae81a51e08b83a6b924de57fea18d520a2c..2d562f845bc6ab7a03e336accf699c73502e62a5 100644 --- a/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp +++ b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp @@ -364,7 +364,7 @@ Particle3DContainer RealSpaceMesoCrystal::populateMesoCrystal() auto outerShapeff = m_mesoCrystalItem->getOuterShape(); const auto* mesoCrystal_rotation = M_clone->rotation(); - auto mesoCrystal_translation = M_clone->position(); + auto mesoCrystal_translation = M_clone->particlePosition(); Particle3DContainer mesoCrystalBasis3DContainer; diff --git a/Sample/Particle/IParticle.h b/Sample/Particle/IParticle.h index 8630f769c2079764832bf9725c431b9f330ec740..ef845b8d1907f380a92873e77e77988971d3c568 100644 --- a/Sample/Particle/IParticle.h +++ b/Sample/Particle/IParticle.h @@ -49,19 +49,19 @@ public: void setAbundance(double abundance) { m_abundance = abundance; } //! Returns particle position. - R3 position() const { return m_position; } + R3 particlePosition() const { return m_position; } //! Sets relative position of the particle's reference point in the //! coordinate system of parent. //! @param position: relative position vector (components are in nanometers) - void setPosition(R3 position) { m_position = position; } + void setParticlePosition(R3 position) { m_position = position; } //! Sets relative position of the particle's reference point in the //! coordinate system of parent. //! @param x: x-coordinate in nanometers //! @param y: y-coordinate in nanometers //! @param z: z-coordinate in nanometers - void setPosition(double x, double y, double z) { m_position = R3(x, y, z); } + void setParticlePosition(double x, double y, double z) { m_position = R3(x, y, z); } //! Translates the particle void translate(R3 translation); diff --git a/Sample/Particle/MesoCrystal.cpp b/Sample/Particle/MesoCrystal.cpp index 64ee52daee462e9647e41300500af661975c6302..da339cc05d625acf50ef5e094444f0c8ec69ecaa 100644 --- a/Sample/Particle/MesoCrystal.cpp +++ b/Sample/Particle/MesoCrystal.cpp @@ -38,7 +38,7 @@ MesoCrystal* MesoCrystal::clone() const p_result->setAbundance(m_abundance); if (m_rotation) p_result->setRotation(*m_rotation); - p_result->setPosition(m_position); + p_result->setParticlePosition(m_position); return p_result; } diff --git a/Sample/Particle/Particle.cpp b/Sample/Particle/Particle.cpp index b0cc8d5c06930857ca03e5207366fec83b961fbb..fac4ac691fc5b65cb887c2f457b5deea471d7f2a 100644 --- a/Sample/Particle/Particle.cpp +++ b/Sample/Particle/Particle.cpp @@ -41,7 +41,7 @@ Particle* Particle::clone() const p_result->setAbundance(m_abundance); if (m_rotation) p_result->setRotation(*m_rotation); - p_result->setPosition(m_position); + p_result->setParticlePosition(m_position); return p_result; } diff --git a/Sample/Particle/ParticleComposition.cpp b/Sample/Particle/ParticleComposition.cpp index c99b471bb728a50b23e3424734e4acd7f1c82a5e..0a21ed6f31d384137df52d64b9db335292a5e2a9 100644 --- a/Sample/Particle/ParticleComposition.cpp +++ b/Sample/Particle/ParticleComposition.cpp @@ -37,7 +37,7 @@ ParticleComposition* ParticleComposition::clone() const result->addParticle(*m_particles[index]); if (m_rotation) result->setRotation(*m_rotation); - result->setPosition(m_position); + result->setParticlePosition(m_position); return result; } @@ -87,7 +87,7 @@ SafePointerVector<IParticle> ParticleComposition::decompose() const { SafePointerVector<IParticle> result; const auto* rot = rotation(); - auto translation = position(); + auto translation = particlePosition(); for (const auto& particle : m_particles) { const auto sublist = particle->decompose(); for (auto* subparticle : sublist) { diff --git a/Sample/Particle/ParticleCoreShell.cpp b/Sample/Particle/ParticleCoreShell.cpp index 101875e6bdd5d28ee50f78d84aea9e870f61ff63..41b3d28701c00b00ea18a02a913d82495c315fca 100644 --- a/Sample/Particle/ParticleCoreShell.cpp +++ b/Sample/Particle/ParticleCoreShell.cpp @@ -36,7 +36,7 @@ ParticleCoreShell* ParticleCoreShell::clone() const p_result->setAbundance(m_abundance); if (m_rotation) p_result->setRotation(*m_rotation); - p_result->setPosition(m_position); + p_result->setParticlePosition(m_position); return p_result; } diff --git a/Sample/StandardSamples/BoxCompositionBuilder.cpp b/Sample/StandardSamples/BoxCompositionBuilder.cpp index 16b4e8f66246852bbf1a26c2eeae91489a1c4df4..9f7833986c575786f855468a8917fc1ebb4e3699 100644 --- a/Sample/StandardSamples/BoxCompositionBuilder.cpp +++ b/Sample/StandardSamples/BoxCompositionBuilder.cpp @@ -60,7 +60,7 @@ MultiLayer* ExemplarySamples::createBoxCompositionRotateX() composition.addParticle(box, R3(0.0, 0.0, 0.0)); composition.addParticle(box, R3(length / 2.0, 0.0, 0.0)); composition.setRotation(RotationX(90.0 * deg)); - composition.setPosition(R3(0.0, 0.0, -layer_thickness / 2.0)); + composition.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.0)); return finalizeMultiLayer(composition); } @@ -73,7 +73,7 @@ MultiLayer* ExemplarySamples::createBoxCompositionRotateY() composition.addParticle(box, R3(0.0, 0.0, 0.0)); composition.addParticle(box, R3(length / 2.0, 0.0, 0.0)); composition.setRotation(RotationY(90.0 * deg)); - composition.setPosition(R3(0.0, 0.0, -layer_thickness / 2.0 + length / 4.0)); + composition.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.0 + length / 4.0)); return finalizeMultiLayer(composition); } @@ -86,7 +86,7 @@ MultiLayer* ExemplarySamples::createBoxCompositionRotateZ() composition.addParticle(box, R3(0.0, 0.0, 0.0)); composition.addParticle(box, R3(length / 2.0, 0.0, 0.0)); composition.setRotation(RotationZ(90.0 * deg)); - composition.setPosition(R3(0.0, 0.0, -layer_thickness / 2.0 - height / 2.0)); + composition.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.0 - height / 2.0)); return finalizeMultiLayer(composition); } @@ -100,7 +100,7 @@ MultiLayer* ExemplarySamples::createBoxCompositionRotateZandY() composition.addParticle(box, R3(length / 2.0, 0.0, 0.0)); composition.setRotation(RotationZ(90.0 * deg)); composition.rotate(RotationY(90.0 * deg)); - composition.setPosition(R3(0.0, 0.0, -layer_thickness / 2.0)); + composition.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.0)); return finalizeMultiLayer(composition); } @@ -124,12 +124,12 @@ MultiLayer* ExemplarySamples::createBoxStackComposition() const double box2_height = 50.0; Particle box2(particleMaterial, FormFactorBox(box2_length, box2_width, box2_height)); box2.setRotation(RotationY(90. * deg)); - box2.setPosition(R3(-box2_height / 2.0, 0.0, box2_length / 2.0)); + box2.setParticlePosition(R3(-box2_height / 2.0, 0.0, box2_length / 2.0)); composition.addParticle(box1, R3(0.0, 0.0, 0.0)); composition.addParticle(box2, R3(0.0, 0.0, box1_height)); composition.setRotation(RotationY(90.0 * deg)); - composition.setPosition(R3(0.0, 0.0, -layer_thickness / 2.)); + composition.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.)); return finalizeMultiLayer(composition); } diff --git a/Sample/StandardSamples/CoreShellParticleBuilder.cpp b/Sample/StandardSamples/CoreShellParticleBuilder.cpp index 420cbd96a7e5d8f808514819f4934902002d3727..1e055679e26518c39b76a981808ab924324566a6 100644 --- a/Sample/StandardSamples/CoreShellParticleBuilder.cpp +++ b/Sample/StandardSamples/CoreShellParticleBuilder.cpp @@ -72,7 +72,7 @@ MultiLayer* ExemplarySamples::createCoreShellBoxRotateZandY() ParticleCoreShell coreshell(shell, core, R3(0.0, 0.0, (shell_height - core_height) / 2.0)); coreshell.setRotation(RotationZ(90.0 * deg)); coreshell.rotate(RotationY(90.0 * deg)); - coreshell.setPosition(R3(0.0, 0.0, -layer_thickness / 2.0)); + coreshell.setParticlePosition(R3(0.0, 0.0, -layer_thickness / 2.0)); ParticleLayout layout; layout.addParticle(coreshell); diff --git a/Sample/StandardSamples/CustomMorphologyBuilder.cpp b/Sample/StandardSamples/CustomMorphologyBuilder.cpp index 8a10b81dec2fa4986f853d0aa537fb4f76d600c0..5f2f7fec8ad8d04030546b90990d1d931032e075 100644 --- a/Sample/StandardSamples/CustomMorphologyBuilder.cpp +++ b/Sample/StandardSamples/CustomMorphologyBuilder.cpp @@ -35,70 +35,70 @@ MultiLayer* ExemplarySamples::createCustomMorphology() FormFactorBox ff1(2.0, 2.0, 1.0); R3 pos1(0.0, 0.0, 0.0); Particle p1(mat_particle, ff1); - p1.setPosition(pos1); + p1.setParticlePosition(pos1); particle_layout.addParticle(p1, 0.5); // add particle number 2: FormFactorBox ff2(2.0, 4.0, 1.0); R3 pos2(5.0, 5.0, 0.0); RotationZ m2(10 * deg); Particle p2(mat_particle, ff2, m2); - p2.setPosition(pos2); + p2.setParticlePosition(pos2); particle_layout.addParticle(p2, 0.5); // add particle number 3: FormFactorBox ff3(2.0, 6.0, 1.0); R3 pos3(-5.0, -5.0, 0.0); RotationZ m3(20 * deg); Particle p3(mat_particle, ff3, m3); - p3.setPosition(pos3); + p3.setParticlePosition(pos3); particle_layout.addParticle(p3, 0.5); // add particle number 4: FormFactorBox ff4(2.0, 8.0, 1.0); R3 pos4(5.0, -5.0, 0.0); RotationZ m4(30 * deg); Particle p4(mat_particle, ff4, m4); - p4.setPosition(pos4); + p4.setParticlePosition(pos4); particle_layout.addParticle(p4, 0.5); // add particle number 5: FormFactorBox ff5(2.0, 10.0, 1.0); R3 pos5(-5.0, 5.0, 0.0); RotationZ m5(40 * deg); Particle p5(mat_particle, ff5, m5); - p5.setPosition(pos5); + p5.setParticlePosition(pos5); particle_layout.addParticle(p5, 0.5); // add particle number 6: FormFactorBox ff6(2.0, 2.0, 1.0); R3 pos6(0.0, 0.0, 0.0); RotationZ m6(50 * deg); Particle p6(mat_particle, ff6, m6); - p6.setPosition(pos6); + p6.setParticlePosition(pos6); particle_layout.addParticle(p6, 0.5); // add particle number 7: FormFactorBox ff7(2.0, 4.0, 1.0); R3 pos7(5.0, 5.0, 0.0); RotationZ m7(60 * deg); Particle p7(mat_particle, ff7, m7); - p7.setPosition(pos7); + p7.setParticlePosition(pos7); particle_layout.addParticle(p7, 0.5); // add particle number 8: FormFactorBox ff8(2.0, 6.0, 1.0); R3 pos8(-5.0, -5.0, 0.0); RotationZ m8(70 * deg); Particle p8(mat_particle, ff8, m8); - p8.setPosition(pos8); + p8.setParticlePosition(pos8); particle_layout.addParticle(p8, 0.5); // add particle number 9: FormFactorBox ff9(2.0, 8.0, 1.0); R3 pos9(5.0, -5.0, 0.0); RotationZ m9(80 * deg); Particle p9(mat_particle, ff9, m9); - p9.setPosition(pos9); + p9.setParticlePosition(pos9); particle_layout.addParticle(p9, 0.5); // add particle number 10: FormFactorBox ff10(2.0, 10.0, 1.0); R3 pos10(-5.0, 5.0, 0.0); RotationZ m10(90 * deg); Particle p10(mat_particle, ff10, m10); - p10.setPosition(pos10); + p10.setParticlePosition(pos10); particle_layout.addParticle(p10, 0.5); vacuum_layer.addLayout(particle_layout); diff --git a/Sample/StandardSamples/LayersWithAbsorptionBuilder.cpp b/Sample/StandardSamples/LayersWithAbsorptionBuilder.cpp index bc0804af19e8bcd399ea668ce1ceccf083dc2f47..30a4ae4f107fba4c5a7626631c85d60aeda5d7bd 100644 --- a/Sample/StandardSamples/LayersWithAbsorptionBuilder.cpp +++ b/Sample/StandardSamples/LayersWithAbsorptionBuilder.cpp @@ -31,7 +31,7 @@ MultiLayer* ExemplarySamples::createLayersWithAbsorptionWithFF(const IFormFactor particle.setRotation(RotationZ(10.0 * deg)); particle.rotate(RotationY(10.0 * deg)); particle.rotate(RotationX(10.0 * deg)); - particle.setPosition(R3(0.0, 0.0, -middle_layer_thickness / 2.0)); + particle.setParticlePosition(R3(0.0, 0.0, -middle_layer_thickness / 2.0)); ParticleLayout layout; layout.addParticle(particle); diff --git a/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.cpp b/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.cpp index 4ed5ba2adea258e55e69f49aed163469c26e5814..d4b13ca673fa266080cbc6d049a0d5b84dd315bf 100644 --- a/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.cpp +++ b/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.cpp @@ -38,7 +38,7 @@ MultiLayer* ExemplarySamples::createLayersWithAbsorptionBySLD() particle.setRotation(RotationZ(10.0 * deg)); particle.rotate(RotationY(10.0 * deg)); particle.rotate(RotationX(10.0 * deg)); - particle.setPosition(R3(0.0, 0.0, -middle_layer_thickness / 2.0)); + particle.setParticlePosition(R3(0.0, 0.0, -middle_layer_thickness / 2.0)); ParticleLayout layout; layout.addParticle(particle); diff --git a/Sample/StandardSamples/SlicedCompositionBuilder.cpp b/Sample/StandardSamples/SlicedCompositionBuilder.cpp index 1fa2b7b989f11ea24a98e38f799ea87d6fabae36..1f04cdd953c5244c435eea9996540bc014c00b60 100644 --- a/Sample/StandardSamples/SlicedCompositionBuilder.cpp +++ b/Sample/StandardSamples/SlicedCompositionBuilder.cpp @@ -39,7 +39,7 @@ MultiLayer* ExemplarySamples::createSlicedComposition() ParticleComposition composition; composition.addParticle(topCup, R3(0.0, 0.0, bottom_cup_height)); composition.addParticle(bottomCup, R3(0.0, 0.0, bottom_cup_height)); - composition.setPosition(0, 0, -composition_shift); + composition.setParticlePosition(0, 0, -composition_shift); ParticleLayout particle_layout; particle_layout.addParticle(composition); diff --git a/Sample/StandardSamples/TransformationsBuilder.cpp b/Sample/StandardSamples/TransformationsBuilder.cpp index d8a66f78b966aee99101fad94eacdfa88658c9f4..df21b66b29b3e6ab863aa54ec6a6c0fb3b13574a 100644 --- a/Sample/StandardSamples/TransformationsBuilder.cpp +++ b/Sample/StandardSamples/TransformationsBuilder.cpp @@ -33,7 +33,7 @@ MultiLayer* ExemplarySamples::createTransformBox() Particle box(refMat::Ag, FormFactorBox(length, width, height)); box.setRotation(RotationZ(90. * deg)); box.rotate(RotationY(90. * deg)); - box.setPosition(R3(0, 0, -layer_thickness / 2.)); + box.setParticlePosition(R3(0, 0, -layer_thickness / 2.)); ParticleLayout layout; layout.addParticle(box); diff --git a/Sample/StandardSamples/TwoDimLatticeBuilder.cpp b/Sample/StandardSamples/TwoDimLatticeBuilder.cpp index 430e23f8be64f8c8459c4618fa84570309aadd56..7d015bd345e203e58f0d1b1798524285d81969c7 100644 --- a/Sample/StandardSamples/TwoDimLatticeBuilder.cpp +++ b/Sample/StandardSamples/TwoDimLatticeBuilder.cpp @@ -131,7 +131,7 @@ MultiLayer* ExemplarySamples::createRotatedSquareLattice2D() FormFactorCylinder ff_cyl(5.0, 5.0); R3 position(0.0, 0.0, 0.0); Particle p(refMat::Particle, ff_cyl); - p.setPosition(position); + p.setParticlePosition(position); particle_layout.addParticle(p); particle_layout.setInterference(iff); diff --git a/Tests/Functional/PyCore/sliced_composition.py b/Tests/Functional/PyCore/sliced_composition.py index 9b59544c8144a61f17255d03f7e79a7ca93d0dd0..8e973870ebb77cbd0488fcf6e3da6866ea6c8c3d 100644 --- a/Tests/Functional/PyCore/sliced_composition.py +++ b/Tests/Functional/PyCore/sliced_composition.py @@ -147,7 +147,7 @@ class SlicedSpheresTest(unittest.TestCase): # spherical composition composition = self.get_composition(mAmbience, mSubstrate) - composition.setPosition(0, 0, -shift) + composition.setParticlePosition(0, 0, -shift) data = self.get_result(composition) diff = ba.RelativeDifference(data, reference) @@ -168,12 +168,12 @@ class SlicedSpheresTest(unittest.TestCase): # spherical particle sphere = ba.Particle(mParticle, ba.FormFactorFullSphere(sphere_radius)) - sphere.setPosition(0, 0, -shift) + sphere.setParticlePosition(0, 0, -shift) reference = self.get_result(sphere) # spherical composition composition = self.get_composition(mParticle, mParticle) - composition.setPosition(0, 0, -shift) + composition.setParticlePosition(0, 0, -shift) data = self.get_result(composition) diff = ba.RelativeDifference(data, reference) @@ -201,7 +201,7 @@ class SlicedSpheresTest(unittest.TestCase): composition = self.get_composition(mParticle, mSubstrate) composition_shift = bottom_cup_height - composition.setPosition(0, 0, -composition_shift) + composition.setParticlePosition(0, 0, -composition_shift) data = self.get_result(composition) diff = ba.RelativeDifference(data, reference) diff --git a/Tests/Functional/PyCore/sliced_spheres.py b/Tests/Functional/PyCore/sliced_spheres.py index 3e2d71c5e581161aac2ba35b6256886d04d8b8df..a78130e9126d3a651a9ba5cd9a4a5431a53d025a 100644 --- a/Tests/Functional/PyCore/sliced_spheres.py +++ b/Tests/Functional/PyCore/sliced_spheres.py @@ -64,7 +64,7 @@ class SlicedSpheresTest(unittest.TestCase): # sphere crossing interface to look like truncated sphere above sphere = ba.Particle(mSubstrate, ba.FormFactorFullSphere(sphere_radius)) - sphere.setPosition(0, 0, -sphere_shift) + sphere.setParticlePosition(0, 0, -sphere_shift) data = self.get_result(sphere) diff = ba.RelativeDifference(data, reference) @@ -85,13 +85,13 @@ class SlicedSpheresTest(unittest.TestCase): mAmbience, ba.FormFactorTruncatedSphere(sphere_radius, sphere_radius*2, sphere_radius*2 - sphere_shift)) - truncatedSphere.setPosition(0, 0, -sphere_shift) + truncatedSphere.setParticlePosition(0, 0, -sphere_shift) reference = self.get_result(truncatedSphere) # sphere crossing interface to look like truncated sphere above sphere = ba.Particle(mAmbience, ba.FormFactorFullSphere(sphere_radius)) - sphere.setPosition(0, 0, -sphere_shift) + sphere.setParticlePosition(0, 0, -sphere_shift) data = self.get_result(sphere) diff = ba.RelativeDifference(data, reference) @@ -113,13 +113,13 @@ class SlicedSpheresTest(unittest.TestCase): # Sphere intended for vacuum layer and crossing interface sphere1 = ba.Particle(mParticle, ba.FormFactorFullSphere(sphere_radius)) - sphere1.setPosition(0, 0, -sphere_shift) + sphere1.setParticlePosition(0, 0, -sphere_shift) reference = self.get_result(particle_to_air=sphere1) # Sphere intended for substrate layer and crossing interface sphere2 = ba.Particle(mParticle, ba.FormFactorFullSphere(sphere_radius)) - sphere2.setPosition(0, 0, -sphere_shift) + sphere2.setParticlePosition(0, 0, -sphere_shift) data = self.get_result(particle_to_substrate=sphere2) diff = ba.RelativeDifference(data, reference) diff --git a/Tests/Functional/PyCore/transform_BoxComposition.py b/Tests/Functional/PyCore/transform_BoxComposition.py index 5e4e7d04a64ecbf773c7493887efb495c35bb380..7a7ca8057a6775727fb96381d703c85cbe637ecb 100644 --- a/Tests/Functional/PyCore/transform_BoxComposition.py +++ b/Tests/Functional/PyCore/transform_BoxComposition.py @@ -57,7 +57,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 10.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxComposition.int") @@ -69,7 +69,7 @@ class TransformBoxCompositionTest(unittest.TestCase): # composition = ParticleComposition(box, positions) composition.addParticle(box, R3(0, 0, 0)) composition.addParticle(box, R3(com_length/2, 0, 0)) - composition.setPosition( + composition.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - com_height/2)) data = self.get_result(composition) @@ -90,7 +90,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 20.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateX.int") @@ -102,7 +102,7 @@ class TransformBoxCompositionTest(unittest.TestCase): composition.addParticle(box, R3(0, 0, 0)) composition.addParticle(box, R3(com_length/2, 0, 0)) composition.setRotation(RotationX(90*deg)) - composition.setPosition(R3(0, 0, -layer_thickness/2.)) + composition.setParticlePosition(R3(0, 0, -layer_thickness/2.)) data = self.get_result(composition) @@ -122,7 +122,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 50.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateY.int") @@ -134,7 +134,7 @@ class TransformBoxCompositionTest(unittest.TestCase): composition.addParticle(box, R3(0, 0, 0)) composition.addParticle(box, R3(com_length/2, 0, 0)) composition.setRotation(RotationY(90*deg)) - composition.setPosition( + composition.setParticlePosition( R3(0, 0, -layer_thickness/2. + com_length/4.)) data = self.get_result(composition) @@ -155,7 +155,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 10.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxCompositionRotateZ.int") @@ -167,7 +167,7 @@ class TransformBoxCompositionTest(unittest.TestCase): composition.addParticle(box, R3(0, 0, 0)) composition.addParticle(box, R3(com_length/2, 0, 0)) composition.setRotation(RotationZ(90*deg)) - composition.setPosition( + composition.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - com_height/2)) data = self.get_result(composition) @@ -188,7 +188,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 20.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData( @@ -202,7 +202,7 @@ class TransformBoxCompositionTest(unittest.TestCase): composition.addParticle(box, R3(com_length/2, 0, 0)) composition.setRotation(RotationZ(90*deg)) composition.rotate(RotationY(90*deg)) - composition.setPosition(R3(0, 0, -layer_thickness/2.)) + composition.setParticlePosition(R3(0, 0, -layer_thickness/2.)) data = self.get_result(composition) @@ -222,7 +222,7 @@ class TransformBoxCompositionTest(unittest.TestCase): height = 50.0 particle = Particle(particle_material, FormFactorBox(length, width, height)) - particle.setPosition(R3(0, 0, -layer_thickness/2.0 - height/2)) + particle.setParticlePosition(R3(0, 0, -layer_thickness/2.0 - height/2)) reference_data = self.get_result(particle) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_BoxStackComposition.int") @@ -246,12 +246,12 @@ class TransformBoxCompositionTest(unittest.TestCase): particle_material, FormFactorBox(box2_length, box2_width, box2_height)) box2.setRotation(RotationY(90*deg)) - box2.setPosition(R3(-box2_height/2, 0, box2_length/2)) + box2.setParticlePosition(R3(-box2_height/2, 0, box2_length/2)) composition.addParticle(box1, R3(0, 0, 0)) composition.addParticle(box2, R3(0, 0, box1_height)) composition.setRotation(RotationY(90*deg)) - composition.setPosition(R3(0, 0, -layer_thickness/2.)) + composition.setParticlePosition(R3(0, 0, -layer_thickness/2.)) data = self.get_result(composition) diff --git a/Tests/Functional/PyCore/transform_CoreShellBox.py b/Tests/Functional/PyCore/transform_CoreShellBox.py index 0ab6c8ad81d863ff5977ed9fd026d6e691d3649a..cf03fed88e92b3b1bb10a79309b5117ae19bf581 100644 --- a/Tests/Functional/PyCore/transform_CoreShellBox.py +++ b/Tests/Functional/PyCore/transform_CoreShellBox.py @@ -51,7 +51,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): shell_height = 10.0 particle = Particle( mCore, FormFactorBox(shell_length, shell_width, shell_height)) - particle.setPosition( + particle.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/2)) reference_data = self.get_result(particle) @@ -65,7 +65,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): mCore, FormFactorBox(core_length, core_width, core_height)) coreshell = ParticleCoreShell( shell, core, R3(0, 0, (shell_height - core_height)/2)) - coreshell.setPosition( + coreshell.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/2)) data = self.get_result(coreshell) @@ -98,7 +98,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): mShell, FormFactorBox(shell_length, shell_width, shell_height)) coreshell_ref = ParticleCoreShell( shell_ref, core_ref, R3(0, 0, (shell_height - core_height)/2)) - coreshell_ref.setPosition( + coreshell_ref.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/ 2)) # center of coreshell in center of the layer @@ -119,7 +119,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): coreshell = ParticleCoreShell( shell, core, R3(0, 0, (shell_height - core_height)/2)) coreshell.setRotation(RotationZ(90*deg)) - coreshell.setPosition( + coreshell.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/ 2)) # center of coreshell in center of the layer @@ -153,7 +153,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): mShell, FormFactorBox(shell_length, shell_width, shell_height)) coreshell_ref = ParticleCoreShell( shell_ref, core_ref, R3(0, 0, (shell_height - core_height)/2)) - coreshell_ref.setPosition( + coreshell_ref.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/ 2)) # center of coreshell in center of the layer @@ -174,7 +174,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): coreshell = ParticleCoreShell( shell, core, R3(0, 0, (shell_height - core_height)/2)) coreshell.setRotation(RotationY(90.*deg)) - coreshell.setPosition( + coreshell.setParticlePosition( R3(0, 0, -layer_thickness/ 2)) # center of coreshell in center of the layer @@ -208,7 +208,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): mShell, FormFactorBox(shell_length, shell_width, shell_height)) coreshell_ref = ParticleCoreShell( shell_ref, core_ref, R3(0, 0, (shell_height - core_height)/2)) - coreshell_ref.setPosition( + coreshell_ref.setParticlePosition( R3(0, 0, -layer_thickness/2.0 - shell_height/ 2)) # center of coreshell in center of the layer @@ -232,7 +232,7 @@ class TransformCoreShellBoxTest(unittest.TestCase): coreshell.setRotation(RotationZ(90*deg)) coreshell.rotate(RotationY(90*deg)) # rotation changes reference point, which now coincide with center of the volume - coreshell.setPosition( + coreshell.setParticlePosition( R3(0, 0, -layer_thickness/ 2)) # center of coreshell in center of the layer diff --git a/Tests/Functional/PyCore/transform_box.py b/Tests/Functional/PyCore/transform_box.py index f3ed62798740d7b33998084c31e5dd65e8e10ce1..0c5916a132f8a0ba0ae44ae276a5a69b6e59f884 100644 --- a/Tests/Functional/PyCore/transform_box.py +++ b/Tests/Functional/PyCore/transform_box.py @@ -53,7 +53,7 @@ class BoxTransformationsTest(unittest.TestCase): box = ba.Particle(mParticle, ba.FormFactorBox(length, width, height)) - box.setPosition(R3(0, 0, -layer_thickness/2 - height/2)) + box.setParticlePosition(R3(0, 0, -layer_thickness/2 - height/2)) reference_data = self.get_result(box) #IntensityDataIOFactory.writeIntensityData(reference_data, "ref_TransformBox.int") @@ -65,7 +65,7 @@ class BoxTransformationsTest(unittest.TestCase): ba.FormFactorBox(length, width, height)) box.setRotation(ba.RotationZ(90*deg)) box.rotate(ba.RotationY(90*deg)) - box.setPosition(R3(0, 0, -layer_thickness/2)) + box.setParticlePosition(R3(0, 0, -layer_thickness/2)) data = self.get_result(box) diff --git a/Tests/Functional/PyCore/transform_cube.py b/Tests/Functional/PyCore/transform_cube.py index 9e44cb15988dc68ec58efca453ecd08c4702c818..403acf31035839f640516930e6674600c627c513 100644 --- a/Tests/Functional/PyCore/transform_cube.py +++ b/Tests/Functional/PyCore/transform_cube.py @@ -26,7 +26,7 @@ class RotationsCubeTest(unittest.TestCase): particle = Particle(mParticle, formfactor) if pos: - particle.setPosition(pos) + particle.setParticlePosition(pos) if rot: particle.setRotation(rot) diff --git a/Tests/Unit/Sample/ParticleCompositionTest.cpp b/Tests/Unit/Sample/ParticleCompositionTest.cpp index 1edc5085e335962508071314998db68a7682dc3f..e4d3774267cb4aec28982a96f9e5dada4c191772 100644 --- a/Tests/Unit/Sample/ParticleCompositionTest.cpp +++ b/Tests/Unit/Sample/ParticleCompositionTest.cpp @@ -31,5 +31,5 @@ TEST_F(ParticleCompositionTest, ParticleCompositionClone) EXPECT_EQ(children.size(), 1u); const auto* p_particle = dynamic_cast<const IParticle*>(children[0]); EXPECT_EQ(p_particle->rotation(), nullptr); - EXPECT_EQ(p_particle->position(), position); + EXPECT_EQ(p_particle->particlePosition(), position); } diff --git a/Tests/Unit/Sample/ParticleCoreShellTest.cpp b/Tests/Unit/Sample/ParticleCoreShellTest.cpp index 7cacedcddc35199d30cc4b6a92ba9b85eb757d0e..a66b8e534a2780fe62faeba84fddc34df9bab0c4 100644 --- a/Tests/Unit/Sample/ParticleCoreShellTest.cpp +++ b/Tests/Unit/Sample/ParticleCoreShellTest.cpp @@ -26,10 +26,10 @@ TEST_F(ParticleCoreShellTest, ComplexCoreShellClone) R3 relative_pos(0, 0, (shell_height - core_height) / 2); ParticleCoreShell coreshell(shell, core, relative_pos); coreshell.setRotation(RotationY(90 * Units::deg)); - coreshell.setPosition(R3(0, 0, -10)); + coreshell.setParticlePosition(R3(0, 0, -10)); ParticleCoreShell* clone = coreshell.clone(); - EXPECT_EQ(coreshell.coreParticle()->position(), relative_pos); - EXPECT_EQ(clone->coreParticle()->position(), relative_pos); + EXPECT_EQ(coreshell.coreParticle()->particlePosition(), relative_pos); + EXPECT_EQ(clone->coreParticle()->particlePosition(), relative_pos); delete clone; } diff --git a/auto/Wrap/doxygenSample.i b/auto/Wrap/doxygenSample.i index 7cfdd889e5e8ecaa32c3eae8e12f57c394a41a97..a192d735b30e37ad27a79a9f308f2fd17eb384e2 100644 --- a/auto/Wrap/doxygenSample.i +++ b/auto/Wrap/doxygenSample.i @@ -3728,12 +3728,12 @@ abundance: proportion of this type of particles normalized to the total number of particles in the layout. "; -%feature("docstring") IParticle::position "R3 IParticle::position() const +%feature("docstring") IParticle::particlePosition "R3 IParticle::particlePosition() const Returns particle position. "; -%feature("docstring") IParticle::setPosition "void IParticle::setPosition(R3 position) +%feature("docstring") IParticle::setParticlePosition "void IParticle::setParticlePosition(R3 position) Sets relative position of the particle's reference point in the coordinate system of parent. @@ -3744,7 +3744,7 @@ position: relative position vector (components are in nanometers) "; -%feature("docstring") IParticle::setPosition "void IParticle::setPosition(double x, double y, double z) +%feature("docstring") IParticle::setParticlePosition "void IParticle::setParticlePosition(double x, double y, double z) Sets relative position of the particle's reference point in the coordinate system of parent. diff --git a/auto/Wrap/libBornAgainSample.py b/auto/Wrap/libBornAgainSample.py index e00d5737128586124c59ae05a404593428b70e08..6d890076877194dd1206b2db103313d9cc707da8 100644 --- a/auto/Wrap/libBornAgainSample.py +++ b/auto/Wrap/libBornAgainSample.py @@ -4462,21 +4462,21 @@ class IParticle(ISampleNode): """ return _libBornAgainSample.IParticle_setAbundance(self, abundance) - def position(self): + def particlePosition(self): r""" - position(IParticle self) -> R3 - R3 IParticle::position() const + particlePosition(IParticle self) -> R3 + R3 IParticle::particlePosition() const Returns particle position. """ - return _libBornAgainSample.IParticle_position(self) + return _libBornAgainSample.IParticle_particlePosition(self) - def setPosition(self, *args): + def setParticlePosition(self, *args): r""" - setPosition(IParticle self, R3 position) - setPosition(IParticle self, double x, double y, double z) - void IParticle::setPosition(double x, double y, double z) + setParticlePosition(IParticle self, R3 position) + setParticlePosition(IParticle self, double x, double y, double z) + void IParticle::setParticlePosition(double x, double y, double z) Sets relative position of the particle's reference point in the coordinate system of parent. @@ -4493,7 +4493,7 @@ class IParticle(ISampleNode): z-coordinate in nanometers """ - return _libBornAgainSample.IParticle_setPosition(self, *args) + return _libBornAgainSample.IParticle_setParticlePosition(self, *args) def translate(self, translation): r""" diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp index a5e5ef68faaac32b3e48e92adaf56bfe3ba8cbc7..e082b053366e12aa18989a42bd14c6d330cbf394 100644 --- a/auto/Wrap/libBornAgainSample_wrap.cpp +++ b/auto/Wrap/libBornAgainSample_wrap.cpp @@ -44421,7 +44421,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IParticle_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_IParticle_particlePosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IParticle *arg1 = (IParticle *) 0 ; void *argp1 = 0 ; @@ -44433,10 +44433,10 @@ SWIGINTERN PyObject *_wrap_IParticle_position(PyObject *SWIGUNUSEDPARM(self), Py swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IParticle, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_position" "', argument " "1"" of type '" "IParticle const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_particlePosition" "', argument " "1"" of type '" "IParticle const *""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); - result = ((IParticle const *)arg1)->position(); + result = ((IParticle const *)arg1)->particlePosition(); resultobj = SWIG_NewPointerObj((new R3(static_cast< const R3& >(result))), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: @@ -44444,7 +44444,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IParticle_setPosition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IParticle_setParticlePosition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; IParticle *arg1 = (IParticle *) 0 ; R3 arg2 ; @@ -44456,23 +44456,23 @@ SWIGINTERN PyObject *_wrap_IParticle_setPosition__SWIG_0(PyObject *SWIGUNUSEDPAR if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IParticle, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_setPosition" "', argument " "1"" of type '" "IParticle *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_setParticlePosition" "', argument " "1"" of type '" "IParticle *""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IParticle_setPosition" "', argument " "2"" of type '" "R3""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IParticle_setParticlePosition" "', argument " "2"" of type '" "R3""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IParticle_setPosition" "', argument " "2"" of type '" "R3""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IParticle_setParticlePosition" "', argument " "2"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } - (arg1)->setPosition(arg2); + (arg1)->setParticlePosition(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44480,7 +44480,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IParticle_setPosition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IParticle_setParticlePosition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; IParticle *arg1 = (IParticle *) 0 ; double arg2 ; @@ -44498,25 +44498,25 @@ SWIGINTERN PyObject *_wrap_IParticle_setPosition__SWIG_1(PyObject *SWIGUNUSEDPAR if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IParticle, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_setPosition" "', argument " "1"" of type '" "IParticle *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParticle_setParticlePosition" "', argument " "1"" of type '" "IParticle *""'"); } arg1 = reinterpret_cast< IParticle * >(argp1); ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IParticle_setPosition" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IParticle_setParticlePosition" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IParticle_setPosition" "', argument " "3"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IParticle_setParticlePosition" "', argument " "3"" of type '" "double""'"); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IParticle_setPosition" "', argument " "4"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IParticle_setParticlePosition" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); - (arg1)->setPosition(arg2,arg3,arg4); + (arg1)->setParticlePosition(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -44524,13 +44524,13 @@ fail: } -SWIGINTERN PyObject *_wrap_IParticle_setPosition(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_IParticle_setParticlePosition(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[5] = { 0 }; - if (!(argc = SWIG_Python_UnpackTuple(args, "IParticle_setPosition", 0, 4, argv))) SWIG_fail; + if (!(argc = SWIG_Python_UnpackTuple(args, "IParticle_setParticlePosition", 0, 4, argv))) SWIG_fail; --argc; if (argc == 2) { int _v; @@ -44541,7 +44541,7 @@ SWIGINTERN PyObject *_wrap_IParticle_setPosition(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_IParticle_setPosition__SWIG_0(self, argc, argv); + return _wrap_IParticle_setParticlePosition__SWIG_0(self, argc, argv); } } } @@ -44566,7 +44566,7 @@ SWIGINTERN PyObject *_wrap_IParticle_setPosition(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_IParticle_setPosition__SWIG_1(self, argc, argv); + return _wrap_IParticle_setParticlePosition__SWIG_1(self, argc, argv); } } } @@ -44574,10 +44574,10 @@ SWIGINTERN PyObject *_wrap_IParticle_setPosition(PyObject *self, PyObject *args) } fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IParticle_setPosition'.\n" + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IParticle_setParticlePosition'.\n" " Possible C/C++ prototypes are:\n" - " IParticle::setPosition(R3)\n" - " IParticle::setPosition(double,double,double)\n"); + " IParticle::setParticlePosition(R3)\n" + " IParticle::setParticlePosition(double,double,double)\n"); return 0; } @@ -72545,17 +72545,17 @@ static PyMethodDef SwigMethods[] = { "proportion of this type of particles normalized to the total number of particles in the layout. \n" "\n" ""}, - { "IParticle_position", _wrap_IParticle_position, METH_O, "\n" - "IParticle_position(IParticle self) -> R3\n" - "R3 IParticle::position() const\n" + { "IParticle_particlePosition", _wrap_IParticle_particlePosition, METH_O, "\n" + "IParticle_particlePosition(IParticle self) -> R3\n" + "R3 IParticle::particlePosition() const\n" "\n" "Returns particle position. \n" "\n" ""}, - { "IParticle_setPosition", _wrap_IParticle_setPosition, METH_VARARGS, "\n" - "IParticle_setPosition(IParticle self, R3 position)\n" - "IParticle_setPosition(IParticle self, double x, double y, double z)\n" - "void IParticle::setPosition(double x, double y, double z)\n" + { "IParticle_setParticlePosition", _wrap_IParticle_setParticlePosition, METH_VARARGS, "\n" + "IParticle_setParticlePosition(IParticle self, R3 position)\n" + "IParticle_setParticlePosition(IParticle self, double x, double y, double z)\n" + "void IParticle::setParticlePosition(double x, double y, double z)\n" "\n" "Sets relative position of the particle's reference point in the coordinate system of parent.\n" "\n"