This module is related to the usage of BigDFT with Fragment-related Quantities. Input as well as Logfiles might be processed with the classes and methods provided by it.
BigDFT.Fragments.
AU_to_A
= 0.52917721092¶Conversion between Atomic Units and Bohr
BigDFT.Fragments.
Debye_to_AU
= 0.393430307¶Conversion between Debye and Atomic units
BigDFT.Fragments.
Fragment
(atomlist=None, id='Unknown', units='AU')[source]¶Introduce the concept of fragment. This is a subportion of the system
(it may also coincide with the system itself) that is made of atoms.
Such fragment might have quantities associated to it, like its
electrostatic multipoles (charge, dipole, etc.) and also geometrical information
(center of mass, principla axis etc.). A Fragment might also be rototranslated
and combined with other moieteies to form a System
.
Parameters: |
|
---|---|
Example: | >>> f = Fragment(atomlist) #provide the list of atomic dictionaries
>>> # or otherwise:
>>> f = Fragment(units='A') #initialize the fragment
>>> f.append(atom) #add an atom according to the f.append spec
>>> ... # repeat that until the fragment is completed
|
Todo
Define and describe if this API is also suitable for solid-state fragments
Q
(atom=None, order=0)[source]¶Fragment Monopole, when the information is available.
If the set_fragment_multipoles
routine has been called you can
use this routine to get that information back out.
For Q0 you can also compute for just a subset of the atoms.
Parameters: |
|
---|
Todo
WD: I’m not sure in which circumstances one would like to pass the atom list. Maybe we can remove that option?
append
(atom=None, sym=None, positions=None)[source]¶Include an atom in the fragment.
Parameters: |
|
---|
dict
()[source]¶Transform the fragment information into a dictionary ready to be put as external potential
get_posinp
(units='AU')[source]¶Get a list of elements and positions describing this fragment that is suitable for putting in the posinp entry of an input file.
Parameters: | units (str) – units to write |
---|
line_up
()[source]¶Align the principal axis of inertia of the fragments along the coordinate axis. Also shift the fragment such as its centroid is zero.
BigDFT.Fragments.
GetSymbol
(atom)[source]¶Provide the key which contains the positions
Parameters: | atom (dictionary) – the dictionary describing the atom |
---|---|
Returns: | atom symbol |
Return type: | string |
BigDFT.Fragments.
Lattice
(vectors)[source]¶Defines the fundamental objects to deal with periodic systems
BigDFT.Fragments.
RotoTranslation
(pos1, pos2)[source]¶Define a transformation which can be applied to a group of atoms
BigDFT.Fragments.
System
(mp_dict=None, xyz=None, nat_reference=None, units='AU', transformations=None, reference_fragments=None, posinp_dict=None, frag_partition=None)[source]¶A system is defined by a collection of Fragments.
It might be given by one single fragment
Parameters: |
|
---|
Q
()[source]¶Provides the global monopole of the system given as a sum of the monopoles of the atoms
fill_from_mp_dict
(mpd, nat_reference=None, frag_partition=None)[source]¶Fill the System from a dictionary of multipole coefficients
mpd (dict) : multipole dictionary to build from. nat_reference (int) : specifies an even partitioning of the system. frag_partition (list):
A list of integers which define the partitioning of a system. For example, a system with fragments [a, b, c, d] will be split in to [[a], [b, c], [d]] if passed the following list: [1, 3, 5].
fragdict
()[source]¶Provides the value of the dictionary fragment to be used for the inputfile in a fragment calculation
recompose
(transformations=None, reference_fragments=None)[source]¶Rebuild the system from a set of transformations
BigDFT.Fragments.
XYZfile
(filename=None, units='atomic')[source]¶A class associated to a xyz input file as processed by BigDFT
Parameters: |
|
---|
append
(array, basename='', names=None, attributes=None)[source]¶Add lines to the file position list
Parameters: |
|
---|
BigDFT.Fragments.
build_transformations
(RTlist, ref)[source]¶Build the transformation list to be passed to the systems’ creation via the transformation keyword
BigDFT.Fragments.
distance
(i, j, cell=None)[source]¶Distance between fragments, defined as distance between center of mass
BigDFT.Fragments.
dump_xyz
(array, basename='', units='atomic', names=None, filename=None, position='a', comment=None, cell=None)[source]¶Create a BigDFT xyz filename. Duplicates the meaning of the XYZfile
class.
Parameters: | filename (string) – The file which will be created. If None, the file will be eventually dumped in :class:~`sys.stdout`. |
---|
Todo
Remove the duplication of operations in favour or the class. Move the related operation into a lower-level module.
BigDFT.Fragments.
find_reference_fragment
(refs, transformed)[source]¶generate the list of fragments that are associates to a given list of templates
BigDFT.Fragments.
frag_average
(ref, flist, clean_monopole=True)[source]¶Perform the average in attributes of the fragments provided by the list, with the position of the first fragment
BigDFT.Fragments.
prepare_fragment_inputs
(name, directory='.', flavour='Isolated', system=None, template=None, template_dir=None, template_name=None)[source]¶BigDFT.Fragments.
rotot_collection
(ref_frag, lookup, fragments)[source]¶Deprecated routine, only for backward compatibility
BigDFT.Fragments.
wahba_fragment
(frag1, frag2)[source]¶Solve the wahba’s problem among fragments, deprecated routine
BigDFT.Fragments.
xyz_bc_spec
(cell)[source]¶Defines the specification for expressing the Boundary Conditions starting from a cell vector.
Parameters: | cell (triple of floats or None) – array of the (orthorhombic) cell. Should be 0.0 on directions with free BC. If None is given, the BC are assumed to be Free. |
---|---|
Returns: | comment Line of the xyz file specifying the bc |
Return type: | string |