How To

Read .xyz

The easiest way to create an organic structure to read into streamm is to use a molecular viewer, such as Avogadro. You can generate a streamm.Buildingblock structure by inserting and connecting atoms or importing fragments.


If you use Avogadro there are fragments available in Build>Insert>Fragment

Once you have created your structure export it in the .xyz format, either place the .xyz file in the working directory of your project or navigate to its location using the os.chdir() command. The structure can be read in with the read_xyz() function by creating an empty object and either setting the tag of the object to the same name as prefix of the .xyz file

mol101 = streamm.Buildingblock('mol101')

or using the keyword xyz_file can be used to set the file name.


Change units

You can change the units of object properties with the update_units() function. This function takes a dictionary with the unit type as the key and the new unit to be used as the value. For example, the units of a Buildingblock can be changed to nm by running