pyprocar.pyposcar.poscar_modify#
- class pyprocar.pyposcar.poscar_modify(poscar: Poscar | str, verbose: bool = False)[source]#
High-level class to change properties of a Poscar-object.
Methods
write(filename, cartesian, xyz) # write the poscar with filename, in cartesian? pos_multiply(factor, cartesian) # multiply the position of each atoms by factor pos_sum(factor, cartesian) # sums factor to each position remove(self, atoms, human) # removes a list of atoms add(element, position, cartesian) # add a single atom with element at position shift(amount, cartesian) # shift all the positions by amount scale_lattice(factor, cartesian) # scale the lattice by factor. are cartesian fixed?
Methods
poscar_modify.__init__
(poscar[, verbose])High-level class to change properties of a Poscar-object.
poscar_modify.add
(element, position[, cartesian])Adds a single atom to the Poscar object.
poscar_modify.change_elements
(indexes, ...)It changes the Element of one or more atoms in this poscar object.
poscar_modify.pos_multiply
(factor[, cartesian])Multiplies each (x,y,z) position by the Factor (Fx,Fy,Fz)
poscar_modify.pos_sum
(factor[, cartesian])Add the Factor (Fx,Fy,Fz) to each position
poscar_modify.remove
(atoms[, human])Removes a list of atoms from the Poscar object.
poscar_modify.scale_lattice
(factor[, ...])Scale the lattice vectors by factor [a,b,c]
poscar_modify.shift
(amount[, cartesian])Shift all the positions by amount, given in Cartesian or direct coordinates.
poscar_modify.write
(filename[, cartesian, xyz])Writes the content of this class into a file.