[ase-users] Error in the documentation "constraints"
Ask Hjorth Larsen
asklarsen at gmail.com
Tue Oct 11 13:22:02 CEST 2016
Hi
The FixInternals does not take an atoms object in the constructor, at
least in master.
However the bonds1 and angles1 variables were incorrectly named. This
has been fixed.
Best regards
Ask
2016-10-11 11:32 GMT+02:00 Alessandro Pirrotta via ase-users
<ase-users at listserv.fysik.dtu.dk>:
> Dear ASE users,
>
> I found an error in the documentation on optimisation with constraints.
> https://wiki.fysik.dtu.dk/ase/ase/constraints.html
>
> Under FixInternal on can find a code example:
>
> 1 >>> bond1 = [1.20, [1, 2]]
> 2 >>> angle_indices1 = [2, 3, 4]
> 3 >>> dihedral_indices1 = [2, 3, 4, 5]
> 4 >>> angle1 = [atoms.get_angle(angle_indices1), angle_indices1]
> 5 >>> dihedral1 = [atoms.get_dihedral(dihedral_indices1),
> ... dihedral_indices1]
> 6 >>> c = FixInternals(bonds=[bonds1], angles=[angles1],
> ... dihedrals=[dihedral1])
> 7 >>> atoms.set_constraint(c)
>
> However line 6 should be:
>
> 6 >>> c = FixInternals(atoms, bonds=[bonds1], angles=[angles1],
> ... dihedrals=[dihedral1])
>
>
> Cheers
> ——
> Alessandro Pirrotta
> PhD student
>
>
>
> Faculty of Science
> Department of Chemistry &
> Nano-Science Center
> University of Copenhagen
> Universitetsparken 5, C321
> 2100 Copenhagen Ø
> Denmark
>
> DIR +45 21 18 11 90
> MOB +45 52 81 23 41
>
> alessandro.pirrotta at chem.ku.dk
> http://nano.ku.dk/english/research/nanochemistry/solomon_group/
> www.ki.ku.dk
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
More information about the ase-users
mailing list