radtools.dump_poscar#
- radtools.dump_poscar(crystal_like, file_object='POSCAR', comment: str = None, decimals=8, mode: str = 'Direct')[source]#
Write
Crystal-like object to the POSCAR file.- Parameters:
- crystal_like: any
Object to be written. It has to have
.celland.atomsattributes.cellhas to be a 3x3 array-like object,atomshas to be a list ofAtomobjects.- file_object: str of file-like object, optional
File to be written. If str, then file is opened with the given name. Otherwise it has to have
.write()method.- comment: str, optional
Comment to be written in the first line of the file. Has to be a single line. All new lines are replaced with spaces.
- decimals: int, default 8
Number of decimals to be written.
- mode: str, default "Direct"
Mode of the coordinates to be written. Can be "Direct" or "Cartesian".