Name

nlprint — Print an ASCII representation of the object to the stream pointed to by stream. A typical usage is to store the data as an ASCII file and then use a third party application for generating a visualization of the data.

Synopsis

Namespace: NanoLanguage
nlprint(
object,
stream
)

Description

Print an ASCII representation of the object to the stream pointed to by stream. A typical usage is to store the data as an ASCII file and then use a third party application for generating a visualization of the data. Returns: None.

nlprint Arguments

object

The object whose data should be printed.

Type: A NanoLanguage object that supports being printed.

stream

The stream the data should be printed to.

Type: An output stream that can have strings be written to using a 'write' method.

Default: sys.stdout

Usage Examples

Print the data of a Bandstructure to the screen

# Set up a bandstructure object
bandstructure = Bandstructure(bulk_configuration)
nlprint(bandstructure)

Store the data of a ElectronDifferenceDensity to the file grid.dat

# Set up an electron difference density
electron_difference_density = ElectronDifferenceDensity(molecule_configuration)

# Store grid data on disk
f = open('grid.dat', 'w')
electron_difference_density.nlprint(f)
f.close()

Notes