Exemplo n.º 1
0
    def __init__(self):
        super(Silane, self).__init__()

        mb.load('silane.pdb',
                compound=self,
                relative_to_module=self.__module__)
        mb.x_axis_transform(self, new_origin=self[0], point_on_x_axis=self[1])

        self.add(mb.Port(anchor=self[0], orientation=[0, 0, -1], shift=0.07),
                 name='down')
Exemplo n.º 2
0
    def __init__(self, ):
        super(Silane, self).__init__()
        mb.load('silane.pdb', compound=self, relative_to_module=self.__module__)

        # Transform the coordinate system such that the silicon atom is at the
        # origin and the oxygen atoms are on the x axis.
        mb.x_axis_transform(self, new_origin=self[0], point_on_x_axis=self[1])

        # Add bottom port.
        self.add(mb.Port(anchor=self[0]), 'down')
        self['down'].translate(np.array([0, -.07, 0]))

        # Add top port.
        self.add(mb.Port(anchor=self[0]), 'up')
        self['up'].translate(np.array([0, .07, 0]))
Exemplo n.º 3
0
    def __init__(self, ):
        super(Silane, self).__init__()
        mb.load('silane.pdb', compound=self, relative_to_module=self.__module__)

        # Transform the coordinate system such that the silicon atom is at the
        # origin and the oxygen atoms are on the x axis.
        mb.x_axis_transform(self, new_origin=self[0], point_on_x_axis=self[1])

        # Add bottom port.
        self.add(mb.Port(anchor=self[0]), 'down')
        mb.translate(self['down'], np.array([0, -.07, 0]))

        # Add top port.
        self.add(mb.Port(anchor=self[0]), 'up')
        mb.translate(self['up'], np.array([0, .07, 0]))
Exemplo n.º 4
0
    def __init__(self, ):
        super(Silane, self).__init__()
        mb.load(
            "silane.pdb",
            compound=self,
            relative_to_module=self.__module__,
            infer_hierarchy=False,
            backend="parmed",
            skip_bonds=True,
        )

        # Transform the coordinate system such that the silicon atom is at the
        # origin and the oxygen atoms are on the x axis.
        mb.x_axis_transform(self, new_origin=self[0], point_on_x_axis=self[1])

        # Add bottom port.
        self.add(mb.Port(anchor=self[0]), "down")
        self["down"].translate(np.array([0, -0.07, 0]))

        # Add top port.
        self.add(mb.Port(anchor=self[0]), "up")
        self["up"].translate(np.array([0, 0.07, 0]))