Example #1
0
    def fill_root_node(self, node: Node) -> None:
        """
        Fill the root node with a random water composite object.

        Parameters
        ----------
        node : base.node.Node
            The root node.
        """
        molecule_center = setting.random_position()
        particles = self._create_random_water_molecule(molecule_center)
        for particle in particles:
            node.add_child(Node(particle))
        node.value = Particle(position=molecule_center)
Example #2
0
    def fill_root_node(self, node: Node) -> None:
        """
        Fill the root node with a random point mass.

        Parameters
        ----------
        node : base.node.Node
            The root node.
        """
        node.value = Particle(
            setting.random_position(), {
                charge_value.charge_name: charge_value[0]
                for charge_value in self._charge_values
            })