[−][src]Trait bader::io::FileFormat
FileFormat trait. Used for handling input from a file.
Required methods
fn read(&self, filename: String) -> ReadFunction
Reads the file into a ReadFunction
containing the information
needed from the file to build a Density
.
filename
: The name of the file to read.
fn to_atoms(&self, atom_text: String) -> Atoms
Reads the non-density section of the file into an Atoms
object.
atom_text
: The full string of non-density information from the density file.
fn write(&self, atoms: &Atoms, data: Vec<Vec<f64>>)
Writes a specific density, data, to tile in the correct format.
atoms
: The associated &Atoms
object for the density file.data
: The density to write to file.
fn coordinate_format(&self, coords: [f64; 3]) -> (String, String, String)
How the format the positions of maxima and atoms
coords
: The 3d representation of the position.
Provided methods
fn init(
&self,
args: &Args
) -> (Vec<Vec<f64>>, Vec<f64>, Atoms, [usize; 3], [f64; 3])
&self,
args: &Args
) -> (Vec<Vec<f64>>, Vec<f64>, Atoms, [usize; 3], [f64; 3])
Returns the parts required to build Density
and Atoms
structures.
args
:Args
parsed from the command line.
fn results(
&self,
voxel_map: VoxelMap,
atoms: Atoms,
density: &Density<'_>
) -> (String, String)
&self,
voxel_map: VoxelMap,
atoms: Atoms,
density: &Density<'_>
) -> (String, String)
Returns the contents of the atoms charge file and bader charge file as Strings.
voxel_map
:VoxelMap
postVoxelMap::assign_atoms()
andVoxelMap::charge_sum()
.atoms
: The associatedAtoms
struct for the density.density
: The reference &Density
.