File: filter.py

package info (click to toggle)
python-ase 3.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,192 kB
  • ctags: 8,112
  • sloc: python: 93,375; sh: 99; makefile: 94
file content (13 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Test that the filter and trajectories are playing well together."""

from ase.build import molecule
from ase.constraints import Filter
from ase.optimize import QuasiNewton
from ase.calculators.emt import EMT

atoms = molecule('CO2')
atoms.set_calculator(EMT())
filter = Filter(atoms, indices=[1, 2])

opt = QuasiNewton(filter, trajectory='filter-test.traj', logfile='filter-test.log')
opt.run()