The streamm package includes modules to manipulate atomic structures, keep track of force field parameters and write input files for Quantum chemistry codes, such as NWChem and Gaussian molecular dynamics codes such as LAMMPS.
To get started we will first build ethane out of two methanes using the
While this is a simple example, it is meant to illustrate the functionality of the streamm code to construct organic structures form building block units.
In practice, this functionality allows for the combinatorial creation and analysis millions of variations of organic structures.
To create a
object representing methane, we will create carbon and hydrogen particle objects and add them to the methane object with the correct positions.
import streamm methane = streamm.Buildingblock('methane') C = streamm.Particle(symbol='C') H = streamm.Particle(symbol='H') methane.add_partpos(C,[0.0,0.0,0.0]) methane.add_partpos(H,[0.69,0.69,0.69]) methane.add_partpos(H,[-0.69,-0.69,0.69]) methane.add_partpos(H,[-0.69,0.69,-0.69]) methane.add_partpos(H,[0.69,-0.69,-0.69])
methane.bonded_nblist = methane.guess_nblist(0,radii_buffer=1.25)
methane.particles.rsite = 'RH' methane.particles.rsite = 'RH' methane.find_rsites()
We labeled these sites as RH, but it does not really matter, as long as you pass these labels to the
import streamm.structures.buildingblock as bb ethane = bb.attach(methane,methane,'RH',0,'RH',1,tag='ethane')
Then you can write an .xyz file to visualize your new
streamm.Buildingblock using your favorite molecular viewing software.