autoconnect¶
-
libra_py.autoconnect.
autoconnect
(R, MaxCoord, params)[source]¶ - Parameters
R (list of VECTOR objects) – The atomic coordinates of the system [ units: arbitrary ]
MaxCoord (list of ints) – Maximal coorination numbers of each atom
params (dictionary) –
Parameters controlling the execution of this function
params[“Rcut”] ( double ): The maximal radius of connectivity [ units: same as R, default: 0.0 ]
params[“tv1”] ( VECTOR ): unit cell translation vector a [ units: same as R ]
params[“tv2”] ( VECTOR ): unit cell translation vector b [ units: same as R ]
params[“tv3”] ( VECTOR ): unit cell translation vector c [ units: same as R ]
- params[“pbc_opt”] ( string ): what type of periodicity to assume.
Options: “a”, “b”, “c”, “ab”, “ac”, “bc”, “abc”, “none” [ default: None ]
- params[“opt”] ( int ): Option to obey maximal coordination number:
- 0: the connected atoms in a pair have to obey both the coordination numbers
Some of the atoms may stay undercoordinated. This is the consistent scheme in the sense that if A is connected to B, then B is necessarily connected to A [default]
- 1: treat the MaxCoord as the minimal coordination number each atom should attain.
Some atoms may be overcoordinated.
params[“verbosity”] ( int ): Flag to control the amount of the printout [ default: 0 ]
- Returns
( res, line, unsorted_pairs_out ), where:
- res ( list of lists [ res[i][0], res[0][1] ] ), where
res[i][0] ( int ): index of the atom
res[i][1] ( list of ints ): indices of the atoms that are connected to res[i][0]
line ( string ): the connectivity information in the .ent format
unsorted_pairs_out ( same type as
`res`
): same as`res`
, but not sorted
- Return type
-
libra_py.autoconnect.
find_undercoordinated_atoms
(res, MaxCoord)[source]¶ - Parameters
res (list of lists [ res[i][0], res[0][1] ]) –
res[i][0] ( int ): index of the atom
res[i][1] ( list of ints ): indices of the atoms that are connected to res[i][0]
This would typically be the first output of the
`autoconnect`
functionMaxCoord (list of ints) – Maximal coorination numbers of each atom
- Returns
out, such that:
out[i][0] - is the index of the i-th undercoordinated atom out[i][1] - is the number of dangling bonds on the i-th atom
- Return type
(list)