geom.classes.input_class

Classes

input_class

Manages user-defined parameters for geometric transformations and structure generation.

Module Contents

class geom.classes.input_class.input_class[source]

Manages user-defined parameters for geometric transformations and structure generation.

This class stores user inputs related to translation, rotation, structure creation, and other transformations for metal nanoparticles and graphene structures.

- Transformation Flags

Enable operations such as translation, rotation, mirroring, and structure generation.

- Geometry Files

Stores input filenames for molecular structures.

- Translation & Rotation

Contains direction, distances, angles, and axis information.

- Structure Generation

Flags and parameters for generating different nanostructures.

- Miscellaneous

Handles alloy composition, verbosity settings, and file extensions.

Notes

  • The full list of attributes is initialized in __init__().

  • Methods validate inputs, read data, and apply transformations.

rdkit = False[source]
rdkit_visualize = False[source]
rdkit_visualize_2d = False[source]
rdkit_visualize_3d = False[source]
rdkit_bw = False[source]
rdkit_match = False[source]
rdkit_abbreviations = False[source]
rdkit_file_conversion = False[source]
rdkit_opt = False[source]
rdkit_conformers = False[source]
stereo_annotations = False[source]
atom_index = False[source]
remove_H = False[source]
check_aromaticity = False[source]
match_smiles = ''[source]
rdkit_mol_file = ''[source]
rdkit_mol_file_extension = ''[source]
rdkit_force_field = ''[source]
rdkit_output_file = ''[source]
rdkit_confs_ext = '.pdb'[source]
rdkit_max_iters = 200[source]
rdkit_confs = 50[source]
rdkit_confs_prune_rms = 0.3[source]
small_tasks = False[source]
translate = False[source]
translate_controlled_distance = False[source]
translate_1 = False[source]
translate_center = False[source]
move_geom_to_000 = False[source]
move_geom_1_to_000 = False[source]
move_geom_2_to_000 = False[source]
distances = [][source]
dir_factor = [][source]
file_geom2_translated = ''[source]
distances_input = ''[source]
geom_file = ''[source]
geom1_file = ''[source]
geom2_file = ''[source]
dir_axis_input = ''[source]
origin_CM = ''[source]
origin_CM_1 = ''[source]
origin_CM_2 = ''[source]
direction = 1.0[source]
dimer_distance = 0.0[source]
min_dist = False[source]
rotate = False[source]
rotate_angles = False[source]
rotate_1 = False[source]
angles = [][source]
angles_input = ''[source]
file_geom_rotated = ''[source]
angle = 0.0[source]
geom_center = False[source]
geom_specular = False[source]
create_dimer = False[source]
create_bowtie = False[source]
create_geom = False[source]
create_ase_bulk = False[source]
gen_3d_mesh = False[source]
gen_3d_mesh_sphere = False[source]
gen_3d_mesh_rod = False[source]
gen_graphene = False[source]
gen_core_shell = False[source]
gen_sphere = False[source]
gen_sphere_core_shell = False[source]
gen_rod = False[source]
gen_rod_core_shell = False[source]
gen_tip = False[source]
gen_cone = False[source]
gen_icosahedra = False[source]
gen_cto = False[source]
gen_idh = False[source]
gen_pyramid = False[source]
gen_pentpyramid = False[source]
gen_microscope = False[source]
gen_bipyramid = False[source]
gen_pencil = False[source]
gen_pentbipyramid = False[source]
pentbipyramid_type = ''[source]
alloy = False[source]
mesh_size = 1.0[source]
alloy_perc = 0.0[source]
elliptic_parabola_a = 1.0[source]
elliptic_parabola_b = 1.0[source]
elliptic_parabola_c = 0.0[source]
z_min = 0.0[source]
z_max = 0.0[source]
z_max_paraboloid = 0.0[source]
z_max_pyramid = 0.0[source]
rod_length = 0.0[source]
rod_length_in = 0.0[source]
rod_length_out = 0.0[source]
rod_width = 0.0[source]
rod_width_in = 0.0[source]
rod_width_out = 0.0[source]
bipyramid_width = 0.0[source]
bipyramid_length = 0.0[source]
side_length = 0.0[source]
base_width = 0.0[source]
radius = 0.0[source]
radius_in = 0.0[source]
radius_out = 0.0[source]
X_length = 0.0[source]
Y_length = 0.0[source]
sphere_center = [0.0, 0.0, 0.0][source]
xyz_output = ''[source]
mesh_output = ''[source]
tmp_folder = ''[source]
alloy_string = ''[source]
atomtype = ''[source]
atomtype_in = ''[source]
atomtype_out = ''[source]
atomtypes_alloys = ['ag', 'au'][source]
atomtypes_core_shell = ['ag', 'au'][source]
axes = ['x', 'y', 'z'][source]
graphene_structures = ['rib', 'disk', 'ring', 'triangle'][source]
graphene_structure = ''[source]
graphene_edge_types = ['armchair', 'zigzag'][source]
graphene_edge_type = ''[source]
merge = False[source]
merge_cutoff = 0.0[source]
verbose = False[source]
verbose_inp = ''[source]
check_input_case()[source]

Validates and checks input requirements for selected operations.

Returns:

Performs necessary checks and raises errors if conditions are not met.

Return type:

None

Notes

  • Ensures input files exist before processing.

  • Checks file extensions for validity.

  • Validates direction axis input.

  • Ensures selected operations are correctly configured.

read_input(what)[source]

Reads an input file containing distances or angles.

Parameters:

what (str) – Specifies whether to read ‘distances’ or ‘angles’.

Returns:

Populates the respective list attribute (self.distances or self.angles).

Return type:

None

Raises:

RuntimeError – If a blank line or multiple values are found in a single line.

Notes

  • Reads a file line by line and converts values to floats.

  • Ensures valid input formatting before processing.

change_trans_sense()[source]

Reverses the direction factor for translations.

Returns:

The modified input_class instance with updated dir_factor.

Return type:

input_class

Notes

  • Multiplies all direction factors by -1.

  • Used to invert translation direction dynamically.