Skip to content

Reference XYZMolecule XYZMolecule.generate_cluster

XYZMolecule.generate_cluster

generate_cluster(normal_axis, radius, side_amount, origin=XYZCoord('X', 0, 0, 0), angle=0.0, unit='deg', inplace=False)

Generates a cluster model with a polygon cut out of n sides. Used in ABCMolecule.generate_cluster() .

Parameters:

  • normal_axis ("{0 or 'x', 1 or 'y', 2 or 'z'}") –

    Axis normal to the plane that is being cut with the polygon.

  • radius (int | float) –

    Radius of the polygon to be cut.

  • side_amount (int {0 or >=3}) –

    n amount of sides for the polygon. 0 is for circle and 3 is for triangle, 4 for square, 5 for pentagon etc...

  • origin (CoordType, default: XYZCoord("X", 0, 0, 0) ) –

    Supply if you want to move the slab surface to cut in a seperate spot.

  • angle (float, default: 0.0 ) –

    Angle you want to rotate the polygon by.

  • unit ('deg' or 'rad', default: "deg" ) –

    Unit of angle argument.

  • inplace (bool, default: False ) –

    If True, perform operation in-place.

Returns:

  • XYZMolecule

    XYZMolecule instance with atoms deleted outside of the polygon boundaries.