sknano.generators.GeneratorBase.save_data

GeneratorBase.save_data(fname=None, outpath=None, structure_format=None, rotation_angle=None, rot_axis=None, anchor_point=None, deg2rad=True, center_CM=True, savecopy=True, **kwargs)[source][source]

Save structure data.

Todo

Use the unit cell to set the bounds on output.

Parameters:

fname : {None, str}, optional

file name string

outpath : str, optional

Output path for structure data file.

structure_format : {None, str}, optional

chemical file format of saved structure data. Must be one of:

  • xyz
  • data

If None, then guess based on fname file extension or default to xyz format.

rotation_angle : {None, float}, optional

Angle of rotation

rot_axis : {‘x’, ‘y’, ‘z’}, optional

Rotation axis

anchor_point : array_like, optional

Rotation axis origin

deg2rad : bool, optional

Convert rotation_angle from degrees to radians.

center_CM : bool, optional

Center center-of-mass on origin.