Main
 
Impression
 
In&Output
 
Examples
 
Download
 
 

Impression of Pixie

Main > Impression  
 

An article

An educational article about Pixie New simulation tool for teaching structurally disordered matter physics, 1 can be found in e-polymers.

Screenshots

The main screen of Pixie
Tabs from Pixie toolbox
Charts
3D display

A piece of code

This is the very simple usage of Pixie module in Python. The program performs a simple simulation and outputs some results to the screen
# import pixie module
import pixengine

# set geometry and forcefield input files
geom='example/argon.xyz'
ff='example/argon.ff'

# create object for simulation parameters and set default values to the parameters
par=pixengine.TParams()
par.defaults()

# adjust simulation conditions
par.n_steps=20
par.time_step=0.001
par.initial_velocity=0.1
# adjust system size and margins between atoms, there will be 4x4x4=64 atoms of argon
par.mulx=4
par.muly=4
par.mulz=4

# create a simulation object
sim=pixengine.TSimulation()

# read inputs
sim.set_molecule_file(geom)
sim.set_ffield_file(ff)

# print out parameters
print par.as_dict()
print

# initialize the simulation
sim.init(par)

# perform simulation loop until desired number of steps is reached 
while not sim.is_finished():
	# simulation step
	sim.step()
	
	p=sim.get_progress()
	# get actual and average values
	acc=sim.get_acc().as_dict()
	
	# print some of the values
	print 'step',p[0],'of',p[1]
	print 'Etot',acc['tot_energy'],'Temp',acc['temperature']
	
# finilize simulation
sim.finish()

# get final averages and fluctuations
avg=sim.get_avg().as_dict()
std=sim.get_std().as_dict()

print
print '-'*5,'final values','-'*5
print 'Averages'
print 'Etot',avg['tot_energy'],'Temp',avg['temperature']
print 'Fluctuations'
print 'Etot',std['tot_energy'],'Temp',std['temperature']

 
     
Last modified on: 27-10-2004 by Konrad Piwowarczyk