コード例 #1
0
ファイル: saving_graphics.py プロジェクト: uu1477/MyAse
# creates:  nice.png

import numpy as np

from ase import Atoms
from ase.io import write

atoms = Atoms('Ag', cell=(2.7, 2.7, 2.7), pbc=True) * (18, 8, 8)

# view with ase-gui
#view(atoms)
rotation = '-70x, -20y, -2z' # found using ase-gui menu 'view -> rotate'

#Make colors
from ase.utils import hsv
colors = hsv(atoms.positions[:, 0])

# Textures
tex = ['jmol',] * 288 + ['glass',] * 288+ ['ase3',] * 288 + ['vmd',] * 288


# keywords
kwargs = { # Keywords that exist for eps, png, and pov
'rotation': rotation,
'show_unit_cell': 2,
'colors': colors,
'radii': None,
}

extra_kwargs = { # For povray files only
'display'      : False, # Display while rendering
コード例 #2
0
# creates:  nice.png

import numpy as np

from ase import Atoms
from ase.io import write

atoms = Atoms('Ag', cell=(2.7, 2.7, 2.7), pbc=True) * (18, 8, 8)

# view with ag
#view(atoms)
rotation = '-70x, -20y, -2z' # found using ag menu 'view -> rotate'

#Make colors
from ase.utils import hsv
colors = hsv(atoms.positions[:, 0])

# Textures
tex = ['jmol',] * 288 + ['glass',] * 288+ ['ase3',] * 288 + ['vmd',] * 288


# keywords
kwargs = { # Keywords that exist for eps, png, and pov
'rotation': rotation,
'show_unit_cell': 2,
'colors': colors,
'radii': None,
}

extra_kwargs = { # For povray files only
'display'      : False, # Display while rendering