id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
227,500 | pyusb/pyusb | usb/backend/__init__.py | IBackend.bulk_write | def bulk_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform a bulk write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of the in... | python | def bulk_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform a bulk write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of the in... | [
"def",
"bulk_write",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"data",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"bulk_write",
")"
] | r"""Perform a bulk write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of the interface containing the endpoint. The data parameter
is the ... | [
"r",
"Perform",
"a",
"bulk",
"write",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L225-L238 |
227,501 | pyusb/pyusb | usb/backend/__init__.py | IBackend.bulk_read | def bulk_read(self, dev_handle, ep, intf, buff, timeout):
r"""Perform a bulk read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
of th... | python | def bulk_read(self, dev_handle, ep, intf, buff, timeout):
r"""Perform a bulk read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
of th... | [
"def",
"bulk_read",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"buff",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"bulk_read",
")"
] | r"""Perform a bulk read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
of the interface containing the endpoint. The buff parameter
is... | [
"r",
"Perform",
"a",
"bulk",
"read",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L240-L253 |
227,502 | pyusb/pyusb | usb/backend/__init__.py | IBackend.intr_write | def intr_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform an interrupt write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of ... | python | def intr_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform an interrupt write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of ... | [
"def",
"intr_write",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"data",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"intr_write",
")"
] | r"""Perform an interrupt write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of the interface containing the endpoint. The data parameter
i... | [
"r",
"Perform",
"an",
"interrupt",
"write",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L255-L268 |
227,503 | pyusb/pyusb | usb/backend/__init__.py | IBackend.intr_read | def intr_read(self, dev_handle, ep, intf, size, timeout):
r"""Perform an interrut read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
... | python | def intr_read(self, dev_handle, ep, intf, size, timeout):
r"""Perform an interrut read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
... | [
"def",
"intr_read",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"size",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"intr_read",
")"
] | r"""Perform an interrut read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
of the interface containing the endpoint. The buff parameter
... | [
"r",
"Perform",
"an",
"interrut",
"read",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L270-L283 |
227,504 | pyusb/pyusb | usb/backend/__init__.py | IBackend.iso_write | def iso_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform an isochronous write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of... | python | def iso_write(self, dev_handle, ep, intf, data, timeout):
r"""Perform an isochronous write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of... | [
"def",
"iso_write",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"data",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"iso_write",
")"
] | r"""Perform an isochronous write.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be sent to. intf is the bInterfaceNumber field
of the interface containing the endpoint. The data parameter
... | [
"r",
"Perform",
"an",
"isochronous",
"write",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L285-L298 |
227,505 | pyusb/pyusb | usb/backend/__init__.py | IBackend.iso_read | def iso_read(self, dev_handle, ep, intf, size, timeout):
r"""Perform an isochronous read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
... | python | def iso_read(self, dev_handle, ep, intf, size, timeout):
r"""Perform an isochronous read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
... | [
"def",
"iso_read",
"(",
"self",
",",
"dev_handle",
",",
"ep",
",",
"intf",
",",
"size",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"iso_read",
")"
] | r"""Perform an isochronous read.
dev_handle is the value returned by the open_device() method.
The ep parameter is the bEndpointAddress field whose endpoint
the data will be received from. intf is the bInterfaceNumber field
of the interface containing the endpoint. The buff parameter
... | [
"r",
"Perform",
"an",
"isochronous",
"read",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L300-L313 |
227,506 | pyusb/pyusb | usb/backend/__init__.py | IBackend.ctrl_transfer | def ctrl_transfer(self,
dev_handle,
bmRequestType,
bRequest,
wValue,
wIndex,
data,
timeout):
r"""Perform a control transfer on the endpoint 0.
The di... | python | def ctrl_transfer(self,
dev_handle,
bmRequestType,
bRequest,
wValue,
wIndex,
data,
timeout):
r"""Perform a control transfer on the endpoint 0.
The di... | [
"def",
"ctrl_transfer",
"(",
"self",
",",
"dev_handle",
",",
"bmRequestType",
",",
"bRequest",
",",
"wValue",
",",
"wIndex",
",",
"data",
",",
"timeout",
")",
":",
"_not_implemented",
"(",
"self",
".",
"ctrl_transfer",
")"
] | r"""Perform a control transfer on the endpoint 0.
The direction of the transfer is inferred from the bmRequestType
field of the setup packet.
dev_handle is the value returned by the open_device() method.
bmRequestType, bRequest, wValue and wIndex are the same fields
of the setu... | [
"r",
"Perform",
"a",
"control",
"transfer",
"on",
"the",
"endpoint",
"0",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/backend/__init__.py#L315-L340 |
227,507 | pyusb/pyusb | usb/util.py | find_descriptor | def find_descriptor(desc, find_all=False, custom_match=None, **args):
r"""Find an inner descriptor.
find_descriptor works in the same way as the core.find() function does,
but it acts on general descriptor objects. For example, suppose you
have a Device object called dev and want a Configuration of thi... | python | def find_descriptor(desc, find_all=False, custom_match=None, **args):
r"""Find an inner descriptor.
find_descriptor works in the same way as the core.find() function does,
but it acts on general descriptor objects. For example, suppose you
have a Device object called dev and want a Configuration of thi... | [
"def",
"find_descriptor",
"(",
"desc",
",",
"find_all",
"=",
"False",
",",
"custom_match",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"def",
"desc_iter",
"(",
"*",
"*",
"kwargs",
")",
":",
"for",
"d",
"in",
"desc",
":",
"tests",
"=",
"(",
"val",... | r"""Find an inner descriptor.
find_descriptor works in the same way as the core.find() function does,
but it acts on general descriptor objects. For example, suppose you
have a Device object called dev and want a Configuration of this
object with its bConfigurationValue equals to 1, the code would
... | [
"r",
"Find",
"an",
"inner",
"descriptor",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/util.py#L151-L179 |
227,508 | pyusb/pyusb | usb/util.py | get_langids | def get_langids(dev):
r"""Retrieve the list of supported Language IDs from the device.
Most client code should not call this function directly, but instead use
the langids property on the Device object, which will call this function as
needed and cache the result.
USB LANGIDs are 16-bit integers f... | python | def get_langids(dev):
r"""Retrieve the list of supported Language IDs from the device.
Most client code should not call this function directly, but instead use
the langids property on the Device object, which will call this function as
needed and cache the result.
USB LANGIDs are 16-bit integers f... | [
"def",
"get_langids",
"(",
"dev",
")",
":",
"from",
"usb",
".",
"control",
"import",
"get_descriptor",
"buf",
"=",
"get_descriptor",
"(",
"dev",
",",
"254",
",",
"DESC_TYPE_STRING",
",",
"0",
")",
"# The array is retrieved by asking for string descriptor zero, which i... | r"""Retrieve the list of supported Language IDs from the device.
Most client code should not call this function directly, but instead use
the langids property on the Device object, which will call this function as
needed and cache the result.
USB LANGIDs are 16-bit integers familiar to Windows develop... | [
"r",
"Retrieve",
"the",
"list",
"of",
"supported",
"Language",
"IDs",
"from",
"the",
"device",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/util.py#L222-L270 |
227,509 | pyusb/pyusb | usb/util.py | get_string | def get_string(dev, index, langid = None):
r"""Retrieve a string descriptor from the device.
dev is the Device object which the string will be read from.
index is the string descriptor index and langid is the Language
ID of the descriptor. If langid is omitted, the string descriptor
of the first L... | python | def get_string(dev, index, langid = None):
r"""Retrieve a string descriptor from the device.
dev is the Device object which the string will be read from.
index is the string descriptor index and langid is the Language
ID of the descriptor. If langid is omitted, the string descriptor
of the first L... | [
"def",
"get_string",
"(",
"dev",
",",
"index",
",",
"langid",
"=",
"None",
")",
":",
"if",
"0",
"==",
"index",
":",
"return",
"None",
"from",
"usb",
".",
"control",
"import",
"get_descriptor",
"langids",
"=",
"dev",
".",
"langids",
"if",
"0",
"==",
"... | r"""Retrieve a string descriptor from the device.
dev is the Device object which the string will be read from.
index is the string descriptor index and langid is the Language
ID of the descriptor. If langid is omitted, the string descriptor
of the first Language ID will be returned.
Zero is never... | [
"r",
"Retrieve",
"a",
"string",
"descriptor",
"from",
"the",
"device",
"."
] | ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9 | https://github.com/pyusb/pyusb/blob/ffe6faf42c6ad273880b0b464b9bbf44c1d4b2e9/usb/util.py#L272-L317 |
227,510 | atztogo/phonopy | phonopy/unfolding/core.py | Unfolding._set_translations | def _set_translations(self):
"""Set primitive translations in supercell
_trans_s
Translations with respect to supercell basis vectors
_trans_p
Translations with respect to primitive cell basis vectors
_N
Number of the translations = det(supercel_matri... | python | def _set_translations(self):
"""Set primitive translations in supercell
_trans_s
Translations with respect to supercell basis vectors
_trans_p
Translations with respect to primitive cell basis vectors
_N
Number of the translations = det(supercel_matri... | [
"def",
"_set_translations",
"(",
"self",
")",
":",
"pcell",
"=",
"PhonopyAtoms",
"(",
"numbers",
"=",
"[",
"1",
"]",
",",
"scaled_positions",
"=",
"[",
"[",
"0",
",",
"0",
",",
"0",
"]",
"]",
",",
"cell",
"=",
"np",
".",
"diag",
"(",
"[",
"1",
... | Set primitive translations in supercell
_trans_s
Translations with respect to supercell basis vectors
_trans_p
Translations with respect to primitive cell basis vectors
_N
Number of the translations = det(supercel_matrix) | [
"Set",
"primitive",
"translations",
"in",
"supercell"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/unfolding/core.py#L164-L182 |
227,511 | atztogo/phonopy | phonopy/qha/core.py | QHA.run | def run(self, verbose=False):
"""Fit parameters to EOS at temperatures
Even if fitting failed, simply omit the volume point. In this case,
the failed temperature point doesn't exist in the returned arrays.
"""
if verbose:
print(("#%11s" + "%14s" * 4) % ("T", "E_0",... | python | def run(self, verbose=False):
"""Fit parameters to EOS at temperatures
Even if fitting failed, simply omit the volume point. In this case,
the failed temperature point doesn't exist in the returned arrays.
"""
if verbose:
print(("#%11s" + "%14s" * 4) % ("T", "E_0",... | [
"def",
"run",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"if",
"verbose",
":",
"print",
"(",
"(",
"\"#%11s\"",
"+",
"\"%14s\"",
"*",
"4",
")",
"%",
"(",
"\"T\"",
",",
"\"E_0\"",
",",
"\"B_0\"",
",",
"\"B'_0\"",
",",
"\"V_0\"",
")",
")",
... | Fit parameters to EOS at temperatures
Even if fitting failed, simply omit the volume point. In this case,
the failed temperature point doesn't exist in the returned arrays. | [
"Fit",
"parameters",
"to",
"EOS",
"at",
"temperatures"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/qha/core.py#L144-L211 |
227,512 | atztogo/phonopy | phonopy/structure/cells.py | _trim_cell | def _trim_cell(relative_axes, cell, symprec):
"""Trim overlapping atoms
Parameters
----------
relative_axes: ndarray
Transformation matrix to transform supercell to a smaller cell such as:
trimmed_lattice = np.dot(relative_axes.T, cell.get_cell())
shape=(3,3)
cell: Phono... | python | def _trim_cell(relative_axes, cell, symprec):
"""Trim overlapping atoms
Parameters
----------
relative_axes: ndarray
Transformation matrix to transform supercell to a smaller cell such as:
trimmed_lattice = np.dot(relative_axes.T, cell.get_cell())
shape=(3,3)
cell: Phono... | [
"def",
"_trim_cell",
"(",
"relative_axes",
",",
"cell",
",",
"symprec",
")",
":",
"positions",
"=",
"cell",
".",
"get_scaled_positions",
"(",
")",
"numbers",
"=",
"cell",
".",
"get_atomic_numbers",
"(",
")",
"masses",
"=",
"cell",
".",
"get_masses",
"(",
"... | Trim overlapping atoms
Parameters
----------
relative_axes: ndarray
Transformation matrix to transform supercell to a smaller cell such as:
trimmed_lattice = np.dot(relative_axes.T, cell.get_cell())
shape=(3,3)
cell: PhonopyAtoms
A supercell
symprec: float
... | [
"Trim",
"overlapping",
"atoms"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L459-L543 |
227,513 | atztogo/phonopy | phonopy/structure/cells.py | get_reduced_bases | def get_reduced_bases(lattice,
method='delaunay',
tolerance=1e-5):
"""Search kinds of shortest basis vectors
Parameters
----------
lattice : ndarray or list of list
Basis vectors by row vectors, [a, b, c]^T
shape=(3, 3)
method : str
... | python | def get_reduced_bases(lattice,
method='delaunay',
tolerance=1e-5):
"""Search kinds of shortest basis vectors
Parameters
----------
lattice : ndarray or list of list
Basis vectors by row vectors, [a, b, c]^T
shape=(3, 3)
method : str
... | [
"def",
"get_reduced_bases",
"(",
"lattice",
",",
"method",
"=",
"'delaunay'",
",",
"tolerance",
"=",
"1e-5",
")",
":",
"if",
"method",
"==",
"'niggli'",
":",
"return",
"spg",
".",
"niggli_reduce",
"(",
"lattice",
",",
"eps",
"=",
"tolerance",
")",
"else",
... | Search kinds of shortest basis vectors
Parameters
----------
lattice : ndarray or list of list
Basis vectors by row vectors, [a, b, c]^T
shape=(3, 3)
method : str
delaunay: Delaunay reduction
niggli: Niggli reduction
tolerance : float
Tolerance to find shorte... | [
"Search",
"kinds",
"of",
"shortest",
"basis",
"vectors"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L549-L577 |
227,514 | atztogo/phonopy | phonopy/structure/cells.py | get_smallest_vectors | def get_smallest_vectors(supercell_bases,
supercell_pos,
primitive_pos,
symprec=1e-5):
"""Find shortest atomic pair vectors
Note
----
Shortest vectors from an atom in primitive cell to an atom in
supercell in the fractional ... | python | def get_smallest_vectors(supercell_bases,
supercell_pos,
primitive_pos,
symprec=1e-5):
"""Find shortest atomic pair vectors
Note
----
Shortest vectors from an atom in primitive cell to an atom in
supercell in the fractional ... | [
"def",
"get_smallest_vectors",
"(",
"supercell_bases",
",",
"supercell_pos",
",",
"primitive_pos",
",",
"symprec",
"=",
"1e-5",
")",
":",
"reduced_bases",
"=",
"get_reduced_bases",
"(",
"supercell_bases",
",",
"method",
"=",
"'delaunay'",
",",
"tolerance",
"=",
"s... | Find shortest atomic pair vectors
Note
----
Shortest vectors from an atom in primitive cell to an atom in
supercell in the fractional coordinates of primitive cell. If an
atom in supercell is on the border centered at an atom in
primitive and there are multiple vectors that have the same
di... | [
"Find",
"shortest",
"atomic",
"pair",
"vectors"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L595-L741 |
227,515 | atztogo/phonopy | phonopy/structure/cells.py | compute_all_sg_permutations | def compute_all_sg_permutations(positions, # scaled positions
rotations, # scaled
translations, # scaled
lattice, # column vectors
symprec):
"""Compute a permutation for every space gr... | python | def compute_all_sg_permutations(positions, # scaled positions
rotations, # scaled
translations, # scaled
lattice, # column vectors
symprec):
"""Compute a permutation for every space gr... | [
"def",
"compute_all_sg_permutations",
"(",
"positions",
",",
"# scaled positions",
"rotations",
",",
"# scaled",
"translations",
",",
"# scaled",
"lattice",
",",
"# column vectors",
"symprec",
")",
":",
"out",
"=",
"[",
"]",
"# Finally the shape is fixed as (num_sym, num_... | Compute a permutation for every space group operation.
See 'compute_permutation_for_rotation' for more info.
Output has shape (num_rot, num_pos) | [
"Compute",
"a",
"permutation",
"for",
"every",
"space",
"group",
"operation",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L744-L764 |
227,516 | atztogo/phonopy | phonopy/structure/cells.py | compute_permutation_for_rotation | def compute_permutation_for_rotation(positions_a, # scaled positions
positions_b,
lattice, # column vectors
symprec):
"""Get the overall permutation such that
positions_a[perm[i]] == positions_b... | python | def compute_permutation_for_rotation(positions_a, # scaled positions
positions_b,
lattice, # column vectors
symprec):
"""Get the overall permutation such that
positions_a[perm[i]] == positions_b... | [
"def",
"compute_permutation_for_rotation",
"(",
"positions_a",
",",
"# scaled positions",
"positions_b",
",",
"lattice",
",",
"# column vectors",
"symprec",
")",
":",
"# Sort both sides by some measure which is likely to produce a small",
"# maximum value of (sorted_rotated_index - sor... | Get the overall permutation such that
positions_a[perm[i]] == positions_b[i] (modulo the lattice)
or in numpy speak,
positions_a[perm] == positions_b (modulo the lattice)
This version is optimized for the case where positions_a and positions_b
are related by a rotation. | [
"Get",
"the",
"overall",
"permutation",
"such",
"that"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L767-L811 |
227,517 | atztogo/phonopy | phonopy/structure/cells.py | _compute_permutation_c | def _compute_permutation_c(positions_a, # scaled positions
positions_b,
lattice, # column vectors
symprec):
"""Version of '_compute_permutation_for_rotation' which just directly
calls the C function, without any conditioning of t... | python | def _compute_permutation_c(positions_a, # scaled positions
positions_b,
lattice, # column vectors
symprec):
"""Version of '_compute_permutation_for_rotation' which just directly
calls the C function, without any conditioning of t... | [
"def",
"_compute_permutation_c",
"(",
"positions_a",
",",
"# scaled positions",
"positions_b",
",",
"lattice",
",",
"# column vectors",
"symprec",
")",
":",
"permutation",
"=",
"np",
".",
"zeros",
"(",
"shape",
"=",
"(",
"len",
"(",
"positions_a",
")",
",",
")... | Version of '_compute_permutation_for_rotation' which just directly
calls the C function, without any conditioning of the data.
Skipping the conditioning step makes this EXTREMELY slow on large
structures. | [
"Version",
"of",
"_compute_permutation_for_rotation",
"which",
"just",
"directly",
"calls",
"the",
"C",
"function",
"without",
"any",
"conditioning",
"of",
"the",
"data",
".",
"Skipping",
"the",
"conditioning",
"step",
"makes",
"this",
"EXTREMELY",
"slow",
"on",
"... | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L814-L858 |
227,518 | atztogo/phonopy | phonopy/structure/cells.py | estimate_supercell_matrix | def estimate_supercell_matrix(spglib_dataset,
max_num_atoms=120):
"""Estimate supercell matrix from conventional cell
Diagonal supercell matrix is estimated from basis vector lengths
and maximum number of atoms to be accepted. Supercell is assumed
to be made from the stand... | python | def estimate_supercell_matrix(spglib_dataset,
max_num_atoms=120):
"""Estimate supercell matrix from conventional cell
Diagonal supercell matrix is estimated from basis vector lengths
and maximum number of atoms to be accepted. Supercell is assumed
to be made from the stand... | [
"def",
"estimate_supercell_matrix",
"(",
"spglib_dataset",
",",
"max_num_atoms",
"=",
"120",
")",
":",
"spg_num",
"=",
"spglib_dataset",
"[",
"'number'",
"]",
"num_atoms",
"=",
"len",
"(",
"spglib_dataset",
"[",
"'std_types'",
"]",
")",
"lengths",
"=",
"_get_lat... | Estimate supercell matrix from conventional cell
Diagonal supercell matrix is estimated from basis vector lengths
and maximum number of atoms to be accepted. Supercell is assumed
to be made from the standardized cell and to be closest to sphere
under keeping lattice symmetry. For triclinic, monoclinic,... | [
"Estimate",
"supercell",
"matrix",
"from",
"conventional",
"cell"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1208-L1246 |
227,519 | atztogo/phonopy | phonopy/structure/cells.py | _get_lattice_parameters | def _get_lattice_parameters(lattice):
"""Return basis vector lengths
Parameters
----------
lattice : array_like
Basis vectors given as column vectors
shape=(3, 3), dtype='double'
Returns
-------
ndarray, shape=(3,), dtype='double'
"""
return np.array(np.sqrt(np.do... | python | def _get_lattice_parameters(lattice):
"""Return basis vector lengths
Parameters
----------
lattice : array_like
Basis vectors given as column vectors
shape=(3, 3), dtype='double'
Returns
-------
ndarray, shape=(3,), dtype='double'
"""
return np.array(np.sqrt(np.do... | [
"def",
"_get_lattice_parameters",
"(",
"lattice",
")",
":",
"return",
"np",
".",
"array",
"(",
"np",
".",
"sqrt",
"(",
"np",
".",
"dot",
"(",
"lattice",
".",
"T",
",",
"lattice",
")",
".",
"diagonal",
"(",
")",
")",
",",
"dtype",
"=",
"'double'",
"... | Return basis vector lengths
Parameters
----------
lattice : array_like
Basis vectors given as column vectors
shape=(3, 3), dtype='double'
Returns
-------
ndarray, shape=(3,), dtype='double' | [
"Return",
"basis",
"vector",
"lengths"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1249-L1265 |
227,520 | atztogo/phonopy | phonopy/structure/cells.py | SNF3x3._second | def _second(self):
"""Find Smith normal form for Right-low 2x2 matrix"""
self._second_one_loop()
A = self._A
if A[2, 1] == 0:
return True
elif A[2, 1] % A[1, 1] == 0:
self._second_finalize()
self._Ps += self._L
self._L = []
... | python | def _second(self):
"""Find Smith normal form for Right-low 2x2 matrix"""
self._second_one_loop()
A = self._A
if A[2, 1] == 0:
return True
elif A[2, 1] % A[1, 1] == 0:
self._second_finalize()
self._Ps += self._L
self._L = []
... | [
"def",
"_second",
"(",
"self",
")",
":",
"self",
".",
"_second_one_loop",
"(",
")",
"A",
"=",
"self",
".",
"_A",
"if",
"A",
"[",
"2",
",",
"1",
"]",
"==",
"0",
":",
"return",
"True",
"elif",
"A",
"[",
"2",
",",
"1",
"]",
"%",
"A",
"[",
"1",... | Find Smith normal form for Right-low 2x2 matrix | [
"Find",
"Smith",
"normal",
"form",
"for",
"Right",
"-",
"low",
"2x2",
"matrix"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1030-L1043 |
227,521 | atztogo/phonopy | phonopy/structure/cells.py | SNF3x3._second_column | def _second_column(self):
"""Right-low 2x2 matrix
Assume elements in first row and column are all zero except for A[0,0].
"""
if self._A[1, 1] == 0 and self._A[2, 1] != 0:
self._swap_rows(1, 2)
if self._A[2, 1] != 0:
self._zero_second_column() | python | def _second_column(self):
"""Right-low 2x2 matrix
Assume elements in first row and column are all zero except for A[0,0].
"""
if self._A[1, 1] == 0 and self._A[2, 1] != 0:
self._swap_rows(1, 2)
if self._A[2, 1] != 0:
self._zero_second_column() | [
"def",
"_second_column",
"(",
"self",
")",
":",
"if",
"self",
".",
"_A",
"[",
"1",
",",
"1",
"]",
"==",
"0",
"and",
"self",
".",
"_A",
"[",
"2",
",",
"1",
"]",
"!=",
"0",
":",
"self",
".",
"_swap_rows",
"(",
"1",
",",
"2",
")",
"if",
"self"... | Right-low 2x2 matrix
Assume elements in first row and column are all zero except for A[0,0]. | [
"Right",
"-",
"low",
"2x2",
"matrix"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1055-L1066 |
227,522 | atztogo/phonopy | phonopy/structure/cells.py | SNF3x3._swap_rows | def _swap_rows(self, i, j):
"""Swap i and j rows
As the side effect, determinant flips.
"""
L = np.eye(3, dtype='intc')
L[i, i] = 0
L[j, j] = 0
L[i, j] = 1
L[j, i] = 1
self._L.append(L.copy())
self._A = np.dot(L, self._A) | python | def _swap_rows(self, i, j):
"""Swap i and j rows
As the side effect, determinant flips.
"""
L = np.eye(3, dtype='intc')
L[i, i] = 0
L[j, j] = 0
L[i, j] = 1
L[j, i] = 1
self._L.append(L.copy())
self._A = np.dot(L, self._A) | [
"def",
"_swap_rows",
"(",
"self",
",",
"i",
",",
"j",
")",
":",
"L",
"=",
"np",
".",
"eye",
"(",
"3",
",",
"dtype",
"=",
"'intc'",
")",
"L",
"[",
"i",
",",
"i",
"]",
"=",
"0",
"L",
"[",
"j",
",",
"j",
"]",
"=",
"0",
"L",
"[",
"i",
","... | Swap i and j rows
As the side effect, determinant flips. | [
"Swap",
"i",
"and",
"j",
"rows"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1088-L1101 |
227,523 | atztogo/phonopy | phonopy/structure/cells.py | SNF3x3._flip_sign_row | def _flip_sign_row(self, i):
"""Multiply -1 for all elements in row"""
L = np.eye(3, dtype='intc')
L[i, i] = -1
self._L.append(L.copy())
self._A = np.dot(L, self._A) | python | def _flip_sign_row(self, i):
"""Multiply -1 for all elements in row"""
L = np.eye(3, dtype='intc')
L[i, i] = -1
self._L.append(L.copy())
self._A = np.dot(L, self._A) | [
"def",
"_flip_sign_row",
"(",
"self",
",",
"i",
")",
":",
"L",
"=",
"np",
".",
"eye",
"(",
"3",
",",
"dtype",
"=",
"'intc'",
")",
"L",
"[",
"i",
",",
"i",
"]",
"=",
"-",
"1",
"self",
".",
"_L",
".",
"append",
"(",
"L",
".",
"copy",
"(",
"... | Multiply -1 for all elements in row | [
"Multiply",
"-",
"1",
"for",
"all",
"elements",
"in",
"row"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/cells.py#L1103-L1109 |
227,524 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.dataset | def dataset(self, dataset):
"""Set dataset having displacements and optionally forces
Note
----
Elements of the list accessed by 'first_atoms' corresponds to each
displaced supercell. Each displaced supercell contains only one
displacement. dict['first_atoms']['forces'] ... | python | def dataset(self, dataset):
"""Set dataset having displacements and optionally forces
Note
----
Elements of the list accessed by 'first_atoms' corresponds to each
displaced supercell. Each displaced supercell contains only one
displacement. dict['first_atoms']['forces'] ... | [
"def",
"dataset",
"(",
"self",
",",
"dataset",
")",
":",
"if",
"'displacements'",
"in",
"dataset",
":",
"natom",
"=",
"self",
".",
"_supercell",
".",
"get_number_of_atoms",
"(",
")",
"if",
"type",
"(",
"dataset",
"[",
"'displacements'",
"]",
")",
"is",
"... | Set dataset having displacements and optionally forces
Note
----
Elements of the list accessed by 'first_atoms' corresponds to each
displaced supercell. Each displaced supercell contains only one
displacement. dict['first_atoms']['forces'] gives atomic forces in
each dis... | [
"Set",
"dataset",
"having",
"displacements",
"and",
"optionally",
"forces"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L448-L492 |
227,525 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.forces | def forces(self, sets_of_forces):
"""Set forces in displacement dataset.
Parameters
----------
sets_of_forces : array_like
A set of atomic forces in displaced supercells. The order of
displaced supercells has to match with that in displacement
dataset... | python | def forces(self, sets_of_forces):
"""Set forces in displacement dataset.
Parameters
----------
sets_of_forces : array_like
A set of atomic forces in displaced supercells. The order of
displaced supercells has to match with that in displacement
dataset... | [
"def",
"forces",
"(",
"self",
",",
"sets_of_forces",
")",
":",
"if",
"'first_atoms'",
"in",
"self",
".",
"_displacement_dataset",
":",
"for",
"disp",
",",
"forces",
"in",
"zip",
"(",
"self",
".",
"_displacement_dataset",
"[",
"'first_atoms'",
"]",
",",
"sets... | Set forces in displacement dataset.
Parameters
----------
sets_of_forces : array_like
A set of atomic forces in displaced supercells. The order of
displaced supercells has to match with that in displacement
dataset.
shape=(displaced supercells, at... | [
"Set",
"forces",
"in",
"displacement",
"dataset",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L498-L522 |
227,526 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.force_constants | def force_constants(self, force_constants):
"""Set force constants
Parameters
----------
force_constants : array_like
Force constants matrix. If this is given in own condiguous ndarray
with order='C' and dtype='double', internal copy of data is
avoide... | python | def force_constants(self, force_constants):
"""Set force constants
Parameters
----------
force_constants : array_like
Force constants matrix. If this is given in own condiguous ndarray
with order='C' and dtype='double', internal copy of data is
avoide... | [
"def",
"force_constants",
"(",
"self",
",",
"force_constants",
")",
":",
"if",
"type",
"(",
"force_constants",
")",
"is",
"np",
".",
"ndarray",
":",
"fc_shape",
"=",
"force_constants",
".",
"shape",
"if",
"fc_shape",
"[",
"0",
"]",
"!=",
"fc_shape",
"[",
... | Set force constants
Parameters
----------
force_constants : array_like
Force constants matrix. If this is given in own condiguous ndarray
with order='C' and dtype='double', internal copy of data is
avoided. Therefore some computational resources are saved.
... | [
"Set",
"force",
"constants"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L528-L553 |
227,527 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.generate_displacements | def generate_displacements(self,
distance=0.01,
is_plusminus='auto',
is_diagonal=True,
is_trigonal=False):
"""Generate displacement dataset"""
displacement_directions = get_least_d... | python | def generate_displacements(self,
distance=0.01,
is_plusminus='auto',
is_diagonal=True,
is_trigonal=False):
"""Generate displacement dataset"""
displacement_directions = get_least_d... | [
"def",
"generate_displacements",
"(",
"self",
",",
"distance",
"=",
"0.01",
",",
"is_plusminus",
"=",
"'auto'",
",",
"is_diagonal",
"=",
"True",
",",
"is_trigonal",
"=",
"False",
")",
":",
"displacement_directions",
"=",
"get_least_displacements",
"(",
"self",
"... | Generate displacement dataset | [
"Generate",
"displacement",
"dataset"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L570-L586 |
227,528 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_dynamical_matrix_at_q | def get_dynamical_matrix_at_q(self, q):
"""Calculate dynamical matrix at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
dynamical_matrix: ndarray
Dynamical matrix.
... | python | def get_dynamical_matrix_at_q(self, q):
"""Calculate dynamical matrix at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
dynamical_matrix: ndarray
Dynamical matrix.
... | [
"def",
"get_dynamical_matrix_at_q",
"(",
"self",
",",
"q",
")",
":",
"self",
".",
"_set_dynamical_matrix",
"(",
")",
"if",
"self",
".",
"_dynamical_matrix",
"is",
"None",
":",
"msg",
"=",
"(",
"\"Dynamical matrix has not yet built.\"",
")",
"raise",
"RuntimeError"... | Calculate dynamical matrix at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
dynamical_matrix: ndarray
Dynamical matrix.
shape=(bands, bands), dtype='complex' | [
"Calculate",
"dynamical",
"matrix",
"at",
"a",
"given",
"q",
"-",
"point"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L652-L675 |
227,529 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_frequencies | def get_frequencies(self, q):
"""Calculate phonon frequencies at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
frequencies: ndarray
Phonon frequencies.
s... | python | def get_frequencies(self, q):
"""Calculate phonon frequencies at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
frequencies: ndarray
Phonon frequencies.
s... | [
"def",
"get_frequencies",
"(",
"self",
",",
"q",
")",
":",
"self",
".",
"_set_dynamical_matrix",
"(",
")",
"if",
"self",
".",
"_dynamical_matrix",
"is",
"None",
":",
"msg",
"=",
"(",
"\"Dynamical matrix has not yet built.\"",
")",
"raise",
"RuntimeError",
"(",
... | Calculate phonon frequencies at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,), dtype='double'
Returns
-------
frequencies: ndarray
Phonon frequencies.
shape=(bands, ), dtype='double' | [
"Calculate",
"phonon",
"frequencies",
"at",
"a",
"given",
"q",
"-",
"point"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L677-L707 |
227,530 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_frequencies_with_eigenvectors | def get_frequencies_with_eigenvectors(self, q):
"""Calculate phonon frequencies and eigenvectors at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,)
Returns
-------
(frequencies, eigenvectors)
frequencie... | python | def get_frequencies_with_eigenvectors(self, q):
"""Calculate phonon frequencies and eigenvectors at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,)
Returns
-------
(frequencies, eigenvectors)
frequencie... | [
"def",
"get_frequencies_with_eigenvectors",
"(",
"self",
",",
"q",
")",
":",
"self",
".",
"_set_dynamical_matrix",
"(",
")",
"if",
"self",
".",
"_dynamical_matrix",
"is",
"None",
":",
"msg",
"=",
"(",
"\"Dynamical matrix has not yet built.\"",
")",
"raise",
"Runti... | Calculate phonon frequencies and eigenvectors at a given q-point
Parameters
----------
q: array_like
A q-vector.
shape=(3,)
Returns
-------
(frequencies, eigenvectors)
frequencies: ndarray
Phonon frequencies
shape... | [
"Calculate",
"phonon",
"frequencies",
"and",
"eigenvectors",
"at",
"a",
"given",
"q",
"-",
"point"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L709-L746 |
227,531 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_band_structure | def run_band_structure(self,
paths,
with_eigenvectors=False,
with_group_velocities=False,
is_band_connection=False,
path_connections=None,
labels=None,
... | python | def run_band_structure(self,
paths,
with_eigenvectors=False,
with_group_velocities=False,
is_band_connection=False,
path_connections=None,
labels=None,
... | [
"def",
"run_band_structure",
"(",
"self",
",",
"paths",
",",
"with_eigenvectors",
"=",
"False",
",",
"with_group_velocities",
"=",
"False",
",",
"is_band_connection",
"=",
"False",
",",
"path_connections",
"=",
"None",
",",
"labels",
"=",
"None",
",",
"is_legacy... | Run phonon band structure calculation.
Parameters
----------
paths : List of array_like
Sets of qpoints that can be passed to phonopy.set_band_structure().
Numbers of qpoints can be different.
shape of each array_like : (qpoints, 3)
with_eigenvectors ... | [
"Run",
"phonon",
"band",
"structure",
"calculation",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L749-L808 |
227,532 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.init_mesh | def init_mesh(self,
mesh=100.0,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
with_eigenvectors=False,
with_group_velocities=False,
is_gamma_center=False,
use_iter_... | python | def init_mesh(self,
mesh=100.0,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
with_eigenvectors=False,
with_group_velocities=False,
is_gamma_center=False,
use_iter_... | [
"def",
"init_mesh",
"(",
"self",
",",
"mesh",
"=",
"100.0",
",",
"shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"is_mesh_symmetry",
"=",
"True",
",",
"with_eigenvectors",
"=",
"False",
",",
"with_group_velocities",
"=",
"False",
",",
"is_ga... | Initialize mesh sampling phonon calculation without starting to run.
Phonon calculation starts explicitly with calling Mesh.run() or
implicitly with accessing getters of Mesh instance, e.g.,
Mesh.frequencies.
Parameters
----------
mesh: array_like or float, optional
... | [
"Initialize",
"mesh",
"sampling",
"phonon",
"calculation",
"without",
"starting",
"to",
"run",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L974-L1082 |
227,533 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_mesh | def run_mesh(self,
mesh=100.0,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
with_eigenvectors=False,
with_group_velocities=False,
is_gamma_center=False):
"""Run mesh sampling phono... | python | def run_mesh(self,
mesh=100.0,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
with_eigenvectors=False,
with_group_velocities=False,
is_gamma_center=False):
"""Run mesh sampling phono... | [
"def",
"run_mesh",
"(",
"self",
",",
"mesh",
"=",
"100.0",
",",
"shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"is_mesh_symmetry",
"=",
"True",
",",
"with_eigenvectors",
"=",
"False",
",",
"with_group_velocities",
"=",
"False",
",",
"is_gam... | Run mesh sampling phonon calculation.
See the parameter details in Phonopy.init_mesh(). | [
"Run",
"mesh",
"sampling",
"phonon",
"calculation",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1084-L1105 |
227,534 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.set_mesh | def set_mesh(self,
mesh,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
is_eigenvectors=False,
is_gamma_center=False,
run_immediately=True):
"""Phonon calculations on sampling mesh g... | python | def set_mesh(self,
mesh,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
is_eigenvectors=False,
is_gamma_center=False,
run_immediately=True):
"""Phonon calculations on sampling mesh g... | [
"def",
"set_mesh",
"(",
"self",
",",
"mesh",
",",
"shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"is_mesh_symmetry",
"=",
"True",
",",
"is_eigenvectors",
"=",
"False",
",",
"is_gamma_center",
"=",
"False",
",",
"run_immediately",
"=",
"True... | Phonon calculations on sampling mesh grids
Parameters
----------
mesh: array_like
Mesh numbers along a, b, c axes.
dtype='intc'
shape=(3,)
shift: array_like, optional, default None (no shift)
Mesh shifts along a*, b*, c* axes with respect ... | [
"Phonon",
"calculations",
"on",
"sampling",
"mesh",
"grids"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1107-L1168 |
227,535 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_mesh_dict | def get_mesh_dict(self):
"""Returns calculated mesh sampling phonons
Returns
-------
dict
keys: qpoints, weights, frequencies, eigenvectors, and
group_velocities
Each value for the corresponding key is explained as below.
qpoints: ... | python | def get_mesh_dict(self):
"""Returns calculated mesh sampling phonons
Returns
-------
dict
keys: qpoints, weights, frequencies, eigenvectors, and
group_velocities
Each value for the corresponding key is explained as below.
qpoints: ... | [
"def",
"get_mesh_dict",
"(",
"self",
")",
":",
"if",
"self",
".",
"_mesh",
"is",
"None",
":",
"msg",
"=",
"(",
"\"run_mesh has to be done.\"",
")",
"raise",
"RuntimeError",
"(",
"msg",
")",
"retdict",
"=",
"{",
"'qpoints'",
":",
"self",
".",
"_mesh",
"."... | Returns calculated mesh sampling phonons
Returns
-------
dict
keys: qpoints, weights, frequencies, eigenvectors, and
group_velocities
Each value for the corresponding key is explained as below.
qpoints: ndarray
q-points in ... | [
"Returns",
"calculated",
"mesh",
"sampling",
"phonons"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1170-L1216 |
227,536 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.set_iter_mesh | def set_iter_mesh(self,
mesh,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
is_eigenvectors=False,
is_gamma_center=False):
"""Create an IterMesh instancer
Attr... | python | def set_iter_mesh(self,
mesh,
shift=None,
is_time_reversal=True,
is_mesh_symmetry=True,
is_eigenvectors=False,
is_gamma_center=False):
"""Create an IterMesh instancer
Attr... | [
"def",
"set_iter_mesh",
"(",
"self",
",",
"mesh",
",",
"shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"is_mesh_symmetry",
"=",
"True",
",",
"is_eigenvectors",
"=",
"False",
",",
"is_gamma_center",
"=",
"False",
")",
":",
"warnings",
".",
... | Create an IterMesh instancer
Attributes
----------
See set_mesh method. | [
"Create",
"an",
"IterMesh",
"instancer"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1252-L1277 |
227,537 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_qpoints | def run_qpoints(self,
q_points,
with_eigenvectors=False,
with_group_velocities=False,
with_dynamical_matrices=False,
nac_q_direction=None):
"""Phonon calculations on q-points.
Parameters
--------... | python | def run_qpoints(self,
q_points,
with_eigenvectors=False,
with_group_velocities=False,
with_dynamical_matrices=False,
nac_q_direction=None):
"""Phonon calculations on q-points.
Parameters
--------... | [
"def",
"run_qpoints",
"(",
"self",
",",
"q_points",
",",
"with_eigenvectors",
"=",
"False",
",",
"with_group_velocities",
"=",
"False",
",",
"with_dynamical_matrices",
"=",
"False",
",",
"nac_q_direction",
"=",
"None",
")",
":",
"if",
"self",
".",
"_dynamical_ma... | Phonon calculations on q-points.
Parameters
----------
q_points: array_like or float, optional
q-points in reduced coordinates.
dtype='double', shape=(q-points, 3)
with_eigenvectors: bool, optional
Eigenvectors are stored by setting True. Default Fals... | [
"Phonon",
"calculations",
"on",
"q",
"-",
"points",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1349-L1394 |
227,538 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_total_dos | def run_total_dos(self,
sigma=None,
freq_min=None,
freq_max=None,
freq_pitch=None,
use_tetrahedron_method=True):
"""Calculate total DOS from phonons on sampling mesh.
Parameters
-------... | python | def run_total_dos(self,
sigma=None,
freq_min=None,
freq_max=None,
freq_pitch=None,
use_tetrahedron_method=True):
"""Calculate total DOS from phonons on sampling mesh.
Parameters
-------... | [
"def",
"run_total_dos",
"(",
"self",
",",
"sigma",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
",",
"freq_pitch",
"=",
"None",
",",
"use_tetrahedron_method",
"=",
"True",
")",
":",
"if",
"self",
".",
"_mesh",
"is",
"None",
... | Calculate total DOS from phonons on sampling mesh.
Parameters
----------
sigma : float, optional
Smearing width for smearing method. Default is None
freq_min, freq_max, freq_pitch : float, optional
Minimum and maximum frequencies in which range DOS is computed
... | [
"Calculate",
"total",
"DOS",
"from",
"phonons",
"on",
"sampling",
"mesh",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1436-L1466 |
227,539 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_total_DOS | def get_total_DOS(self):
"""Return frequency points and total DOS as a tuple.
Returns
-------
A tuple with (frequency_points, total_dos).
frequency_points: ndarray
shape=(frequency_sampling_points, ), dtype='double'
total_dos:
shape=(frequency_sa... | python | def get_total_DOS(self):
"""Return frequency points and total DOS as a tuple.
Returns
-------
A tuple with (frequency_points, total_dos).
frequency_points: ndarray
shape=(frequency_sampling_points, ), dtype='double'
total_dos:
shape=(frequency_sa... | [
"def",
"get_total_DOS",
"(",
"self",
")",
":",
"warnings",
".",
"warn",
"(",
"\"Phonopy.get_total_DOS is deprecated. \"",
"\"Use Phonopy.get_total_dos_dict.\"",
",",
"DeprecationWarning",
")",
"dos",
"=",
"self",
".",
"get_total_dos_dict",
"(",
")",
"return",
"dos",
"... | Return frequency points and total DOS as a tuple.
Returns
-------
A tuple with (frequency_points, total_dos).
frequency_points: ndarray
shape=(frequency_sampling_points, ), dtype='double'
total_dos:
shape=(frequency_sampling_points, ), dtype='double' | [
"Return",
"frequency",
"points",
"and",
"total",
"DOS",
"as",
"a",
"tuple",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1519-L1538 |
227,540 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_projected_dos | def run_projected_dos(self,
sigma=None,
freq_min=None,
freq_max=None,
freq_pitch=None,
use_tetrahedron_method=True,
direction=None,
xyz_pr... | python | def run_projected_dos(self,
sigma=None,
freq_min=None,
freq_max=None,
freq_pitch=None,
use_tetrahedron_method=True,
direction=None,
xyz_pr... | [
"def",
"run_projected_dos",
"(",
"self",
",",
"sigma",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
",",
"freq_pitch",
"=",
"None",
",",
"use_tetrahedron_method",
"=",
"True",
",",
"direction",
"=",
"None",
",",
"xyz_projection",
... | Calculate projected DOS from phonons on sampling mesh.
Parameters
----------
sigma : float, optional
Smearing width for smearing method. Default is None
freq_min, freq_max, freq_pitch : float, optional
Minimum and maximum frequencies in which range DOS is compute... | [
"Calculate",
"projected",
"DOS",
"from",
"phonons",
"on",
"sampling",
"mesh",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1578-L1633 |
227,541 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_partial_DOS | def get_partial_DOS(self):
"""Return frequency points and partial DOS as a tuple.
Projection is done to atoms and may be also done along directions
depending on the parameters at run_partial_dos.
Returns
-------
A tuple with (frequency_points, partial_dos).
fre... | python | def get_partial_DOS(self):
"""Return frequency points and partial DOS as a tuple.
Projection is done to atoms and may be also done along directions
depending on the parameters at run_partial_dos.
Returns
-------
A tuple with (frequency_points, partial_dos).
fre... | [
"def",
"get_partial_DOS",
"(",
"self",
")",
":",
"warnings",
".",
"warn",
"(",
"\"Phonopy.get_partial_DOS is deprecated. \"",
"\"Use Phonopy.get_projected_dos_dict.\"",
",",
"DeprecationWarning",
")",
"pdos",
"=",
"self",
".",
"get_projected_dos_dict",
"(",
")",
"return",... | Return frequency points and partial DOS as a tuple.
Projection is done to atoms and may be also done along directions
depending on the parameters at run_partial_dos.
Returns
-------
A tuple with (frequency_points, partial_dos).
frequency_points: ndarray
sha... | [
"Return",
"frequency",
"points",
"and",
"partial",
"DOS",
"as",
"a",
"tuple",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1695-L1717 |
227,542 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.plot_projected_dos | def plot_projected_dos(self, pdos_indices=None, legend=None):
"""Plot projected DOS
Parameters
----------
pdos_indices : list of list, optional
Sets of indices of atoms whose projected DOS are summed over.
The indices start with 0. An example is as follwos:
... | python | def plot_projected_dos(self, pdos_indices=None, legend=None):
"""Plot projected DOS
Parameters
----------
pdos_indices : list of list, optional
Sets of indices of atoms whose projected DOS are summed over.
The indices start with 0. An example is as follwos:
... | [
"def",
"plot_projected_dos",
"(",
"self",
",",
"pdos_indices",
"=",
"None",
",",
"legend",
"=",
"None",
")",
":",
"import",
"matplotlib",
".",
"pyplot",
"as",
"plt",
"fig",
",",
"ax",
"=",
"plt",
".",
"subplots",
"(",
")",
"ax",
".",
"xaxis",
".",
"s... | Plot projected DOS
Parameters
----------
pdos_indices : list of list, optional
Sets of indices of atoms whose projected DOS are summed over.
The indices start with 0. An example is as follwos:
pdos_indices=[[0, 1], [2, 3, 4, 5]]
Default is No... | [
"Plot",
"projected",
"DOS"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1727-L1760 |
227,543 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_thermal_properties | def run_thermal_properties(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
is_projection=False,
band_indices=None,
... | python | def run_thermal_properties(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
is_projection=False,
band_indices=None,
... | [
"def",
"run_thermal_properties",
"(",
"self",
",",
"t_min",
"=",
"0",
",",
"t_max",
"=",
"1000",
",",
"t_step",
"=",
"10",
",",
"temperatures",
"=",
"None",
",",
"is_projection",
"=",
"False",
",",
"band_indices",
"=",
"None",
",",
"cutoff_frequency",
"=",... | Calculate thermal properties at constant volume
Parameters
----------
t_min, t_max, t_step : float, optional
Minimum and maximum temperatures and the interval in this
temperature range. Default values are 0, 1000, and 10.
temperatures : array_like, optional
... | [
"Calculate",
"thermal",
"properties",
"at",
"constant",
"volume"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1772-L1810 |
227,544 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.get_thermal_properties | def get_thermal_properties(self):
"""Return thermal properties
Returns
-------
(temperatures, free energy, entropy, heat capacity)
"""
warnings.warn("Phonopy.get_thermal_properties is deprecated. "
"Use Phonopy.get_thermal_properties_dict.",
... | python | def get_thermal_properties(self):
"""Return thermal properties
Returns
-------
(temperatures, free energy, entropy, heat capacity)
"""
warnings.warn("Phonopy.get_thermal_properties is deprecated. "
"Use Phonopy.get_thermal_properties_dict.",
... | [
"def",
"get_thermal_properties",
"(",
"self",
")",
":",
"warnings",
".",
"warn",
"(",
"\"Phonopy.get_thermal_properties is deprecated. \"",
"\"Use Phonopy.get_thermal_properties_dict.\"",
",",
"DeprecationWarning",
")",
"tp",
"=",
"self",
".",
"get_thermal_properties_dict",
"... | Return thermal properties
Returns
-------
(temperatures, free energy, entropy, heat capacity) | [
"Return",
"thermal",
"properties"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1856-L1872 |
227,545 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_thermal_displacements | def run_thermal_displacements(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
direction=None,
freq_min=None... | python | def run_thermal_displacements(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
direction=None,
freq_min=None... | [
"def",
"run_thermal_displacements",
"(",
"self",
",",
"t_min",
"=",
"0",
",",
"t_max",
"=",
"1000",
",",
"t_step",
"=",
"10",
",",
"temperatures",
"=",
"None",
",",
"direction",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
"... | Prepare thermal displacements calculation
Parameters
----------
t_min, t_max, t_step : float, optional
Minimum and maximum temperatures and the interval in this
temperature range. Default valuues are 0, 1000, and 10.
temperatures : array_like, optional
... | [
"Prepare",
"thermal",
"displacements",
"calculation"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L1897-L1959 |
227,546 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_thermal_displacement_matrices | def run_thermal_displacement_matrices(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
freq_min=None,
... | python | def run_thermal_displacement_matrices(self,
t_min=0,
t_max=1000,
t_step=10,
temperatures=None,
freq_min=None,
... | [
"def",
"run_thermal_displacement_matrices",
"(",
"self",
",",
"t_min",
"=",
"0",
",",
"t_max",
"=",
"1000",
",",
"t_step",
"=",
"10",
",",
"temperatures",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
")",
":",
"if",
"self",
... | Prepare thermal displacement matrices
Parameters
----------
t_min, t_max, t_step : float, optional
Minimum and maximum temperatures and the interval in this
temperature range. Default valuues are 0, 1000, and 10.
freq_min, freq_max : float, optional
P... | [
"Prepare",
"thermal",
"displacement",
"matrices"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2016-L2066 |
227,547 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.set_modulations | def set_modulations(self,
dimension,
phonon_modes,
delta_q=None,
derivative_order=None,
nac_q_direction=None):
"""Generate atomic displacements of phonon modes.
The design of this fea... | python | def set_modulations(self,
dimension,
phonon_modes,
delta_q=None,
derivative_order=None,
nac_q_direction=None):
"""Generate atomic displacements of phonon modes.
The design of this fea... | [
"def",
"set_modulations",
"(",
"self",
",",
"dimension",
",",
"phonon_modes",
",",
"delta_q",
"=",
"None",
",",
"derivative_order",
"=",
"None",
",",
"nac_q_direction",
"=",
"None",
")",
":",
"if",
"self",
".",
"_dynamical_matrix",
"is",
"None",
":",
"msg",
... | Generate atomic displacements of phonon modes.
The design of this feature is not very satisfactory, and thus API.
Therefore it should be reconsidered someday in the fugure.
Parameters
----------
dimension : array_like
Supercell dimension with respect to the primitive... | [
"Generate",
"atomic",
"displacements",
"of",
"phonon",
"modes",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2204-L2242 |
227,548 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.set_irreps | def set_irreps(self,
q,
is_little_cogroup=False,
nac_q_direction=None,
degeneracy_tolerance=1e-4):
"""Identify ir-reps of phonon modes.
The design of this API is not very satisfactory and is expceted
to be redesined in ... | python | def set_irreps(self,
q,
is_little_cogroup=False,
nac_q_direction=None,
degeneracy_tolerance=1e-4):
"""Identify ir-reps of phonon modes.
The design of this API is not very satisfactory and is expceted
to be redesined in ... | [
"def",
"set_irreps",
"(",
"self",
",",
"q",
",",
"is_little_cogroup",
"=",
"False",
",",
"nac_q_direction",
"=",
"None",
",",
"degeneracy_tolerance",
"=",
"1e-4",
")",
":",
"if",
"self",
".",
"_dynamical_matrix",
"is",
"None",
":",
"msg",
"=",
"(",
"\"Dyna... | Identify ir-reps of phonon modes.
The design of this API is not very satisfactory and is expceted
to be redesined in the next major versions once the use case
of the API for ir-reps feature becomes clearer. | [
"Identify",
"ir",
"-",
"reps",
"of",
"phonon",
"modes",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2267-L2294 |
227,549 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.init_dynamic_structure_factor | def init_dynamic_structure_factor(self,
Qpoints,
T,
atomic_form_factor_func=None,
scattering_lengths=None,
freq_min=None,
... | python | def init_dynamic_structure_factor(self,
Qpoints,
T,
atomic_form_factor_func=None,
scattering_lengths=None,
freq_min=None,
... | [
"def",
"init_dynamic_structure_factor",
"(",
"self",
",",
"Qpoints",
",",
"T",
",",
"atomic_form_factor_func",
"=",
"None",
",",
"scattering_lengths",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
")",
":",
"if",
"self",
".",
"_mes... | Initialize dynamic structure factor calculation.
*******************************************************************
This is still an experimental feature. API can be changed without
notification.
*******************************************************************
Need to cal... | [
"Initialize",
"dynamic",
"structure",
"factor",
"calculation",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2378-L2445 |
227,550 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.run_dynamic_structure_factor | def run_dynamic_structure_factor(self,
Qpoints,
T,
atomic_form_factor_func=None,
scattering_lengths=None,
freq_min=None,
... | python | def run_dynamic_structure_factor(self,
Qpoints,
T,
atomic_form_factor_func=None,
scattering_lengths=None,
freq_min=None,
... | [
"def",
"run_dynamic_structure_factor",
"(",
"self",
",",
"Qpoints",
",",
"T",
",",
"atomic_form_factor_func",
"=",
"None",
",",
"scattering_lengths",
"=",
"None",
",",
"freq_min",
"=",
"None",
",",
"freq_max",
"=",
"None",
")",
":",
"self",
".",
"init_dynamic_... | Run dynamic structure factor calculation
See the detail of parameters at
Phonopy.init_dynamic_structure_factor(). | [
"Run",
"dynamic",
"structure",
"factor",
"calculation"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2447-L2468 |
227,551 | atztogo/phonopy | phonopy/api_phonopy.py | Phonopy.save | def save(self,
filename="phonopy_params.yaml",
settings=None):
"""Save parameters in Phonopy instants into file.
Parameters
----------
filename: str, optional
File name. Default is "phonopy_params.yaml"
settings: dict, optional
I... | python | def save(self,
filename="phonopy_params.yaml",
settings=None):
"""Save parameters in Phonopy instants into file.
Parameters
----------
filename: str, optional
File name. Default is "phonopy_params.yaml"
settings: dict, optional
I... | [
"def",
"save",
"(",
"self",
",",
"filename",
"=",
"\"phonopy_params.yaml\"",
",",
"settings",
"=",
"None",
")",
":",
"phpy_yaml",
"=",
"PhonopyYaml",
"(",
"calculator",
"=",
"self",
".",
"_calculator",
",",
"settings",
"=",
"settings",
")",
"phpy_yaml",
".",... | Save parameters in Phonopy instants into file.
Parameters
----------
filename: str, optional
File name. Default is "phonopy_params.yaml"
settings: dict, optional
It is described which parameters are written out. Only
the settings expected to be update... | [
"Save",
"parameters",
"in",
"Phonopy",
"instants",
"into",
"file",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_phonopy.py#L2520-L2545 |
227,552 | atztogo/phonopy | phonopy/phonon/mesh.py | length2mesh | def length2mesh(length, lattice, rotations=None):
"""Convert length to mesh for q-point sampling
This conversion for each reciprocal axis follows VASP convention by
N = max(1, int(l * |a|^* + 0.5))
'int' means rounding down, not rounding to nearest integer.
Parameters
----------
length... | python | def length2mesh(length, lattice, rotations=None):
"""Convert length to mesh for q-point sampling
This conversion for each reciprocal axis follows VASP convention by
N = max(1, int(l * |a|^* + 0.5))
'int' means rounding down, not rounding to nearest integer.
Parameters
----------
length... | [
"def",
"length2mesh",
"(",
"length",
",",
"lattice",
",",
"rotations",
"=",
"None",
")",
":",
"rec_lattice",
"=",
"np",
".",
"linalg",
".",
"inv",
"(",
"lattice",
")",
"rec_lat_lengths",
"=",
"np",
".",
"sqrt",
"(",
"np",
".",
"diagonal",
"(",
"np",
... | Convert length to mesh for q-point sampling
This conversion for each reciprocal axis follows VASP convention by
N = max(1, int(l * |a|^* + 0.5))
'int' means rounding down, not rounding to nearest integer.
Parameters
----------
length : float
Length having the unit of direct space l... | [
"Convert",
"length",
"to",
"mesh",
"for",
"q",
"-",
"point",
"sampling"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/phonon/mesh.py#L41-L80 |
227,553 | atztogo/phonopy | phonopy/phonon/thermal_displacement.py | ThermalMotion._get_population | def _get_population(self, freq, t): # freq in THz
"""Return phonon population number
Three types of combinations of array inputs are possible.
- single freq and single t
- single freq and len(t) > 1
- len(freq) > 1 and single t
"""
condition = t > 1.0
i... | python | def _get_population(self, freq, t): # freq in THz
"""Return phonon population number
Three types of combinations of array inputs are possible.
- single freq and single t
- single freq and len(t) > 1
- len(freq) > 1 and single t
"""
condition = t > 1.0
i... | [
"def",
"_get_population",
"(",
"self",
",",
"freq",
",",
"t",
")",
":",
"# freq in THz",
"condition",
"=",
"t",
">",
"1.0",
"if",
"type",
"(",
"condition",
")",
"==",
"bool",
"or",
"type",
"(",
"condition",
")",
"==",
"np",
".",
"bool_",
":",
"if",
... | Return phonon population number
Three types of combinations of array inputs are possible.
- single freq and single t
- single freq and len(t) > 1
- len(freq) > 1 and single t | [
"Return",
"phonon",
"population",
"number"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/phonon/thermal_displacement.py#L101-L120 |
227,554 | atztogo/phonopy | phonopy/phonon/thermal_displacement.py | ThermalDisplacements._project_eigenvectors | def _project_eigenvectors(self):
"""Eigenvectors are projected along Cartesian direction"""
self._p_eigenvectors = []
for vecs_q in self._eigenvectors:
p_vecs_q = []
for vecs in vecs_q.T:
p_vecs_q.append(np.dot(vecs.reshape(-1, 3),
... | python | def _project_eigenvectors(self):
"""Eigenvectors are projected along Cartesian direction"""
self._p_eigenvectors = []
for vecs_q in self._eigenvectors:
p_vecs_q = []
for vecs in vecs_q.T:
p_vecs_q.append(np.dot(vecs.reshape(-1, 3),
... | [
"def",
"_project_eigenvectors",
"(",
"self",
")",
":",
"self",
".",
"_p_eigenvectors",
"=",
"[",
"]",
"for",
"vecs_q",
"in",
"self",
".",
"_eigenvectors",
":",
"p_vecs_q",
"=",
"[",
"]",
"for",
"vecs",
"in",
"vecs_q",
".",
"T",
":",
"p_vecs_q",
".",
"a... | Eigenvectors are projected along Cartesian direction | [
"Eigenvectors",
"are",
"projected",
"along",
"Cartesian",
"direction"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/phonon/thermal_displacement.py#L226-L236 |
227,555 | atztogo/phonopy | phonopy/structure/spglib.py | get_symmetry | def get_symmetry(cell, symprec=1e-5, angle_tolerance=-1.0):
"""This gives crystal symmetry operations from a crystal structure.
Args:
cell: Crystal structrue given either in Atoms object or tuple.
In the case given by a tuple, it has to follow the form below,
(Lattice parameters... | python | def get_symmetry(cell, symprec=1e-5, angle_tolerance=-1.0):
"""This gives crystal symmetry operations from a crystal structure.
Args:
cell: Crystal structrue given either in Atoms object or tuple.
In the case given by a tuple, it has to follow the form below,
(Lattice parameters... | [
"def",
"get_symmetry",
"(",
"cell",
",",
"symprec",
"=",
"1e-5",
",",
"angle_tolerance",
"=",
"-",
"1.0",
")",
":",
"_set_no_error",
"(",
")",
"lattice",
",",
"positions",
",",
"numbers",
",",
"magmoms",
"=",
"_expand_cell",
"(",
"cell",
")",
"if",
"latt... | This gives crystal symmetry operations from a crystal structure.
Args:
cell: Crystal structrue given either in Atoms object or tuple.
In the case given by a tuple, it has to follow the form below,
(Lattice parameters in a 3x3 array (see the detail below),
Fractional ato... | [
"This",
"gives",
"crystal",
"symmetry",
"operations",
"from",
"a",
"crystal",
"structure",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L51-L120 |
227,556 | atztogo/phonopy | phonopy/structure/spglib.py | get_symmetry_dataset | def get_symmetry_dataset(cell,
symprec=1e-5,
angle_tolerance=-1.0,
hall_number=0):
"""Search symmetry dataset from an input cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
hall_... | python | def get_symmetry_dataset(cell,
symprec=1e-5,
angle_tolerance=-1.0,
hall_number=0):
"""Search symmetry dataset from an input cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
hall_... | [
"def",
"get_symmetry_dataset",
"(",
"cell",
",",
"symprec",
"=",
"1e-5",
",",
"angle_tolerance",
"=",
"-",
"1.0",
",",
"hall_number",
"=",
"0",
")",
":",
"_set_no_error",
"(",
")",
"lattice",
",",
"positions",
",",
"numbers",
",",
"_",
"=",
"_expand_cell",... | Search symmetry dataset from an input cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
hall_number: If a serial number of Hall symbol (>0) is given,
the database corresponding to the Hall symbol is made.
Return:
A dictionar... | [
"Search",
"symmetry",
"dataset",
"from",
"an",
"input",
"cell",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L123-L235 |
227,557 | atztogo/phonopy | phonopy/structure/spglib.py | get_spacegroup | def get_spacegroup(cell, symprec=1e-5, angle_tolerance=-1.0, symbol_type=0):
"""Return space group in international table symbol and number as a string.
If it fails, None is returned.
"""
_set_no_error()
dataset = get_symmetry_dataset(cell,
symprec=symprec,
... | python | def get_spacegroup(cell, symprec=1e-5, angle_tolerance=-1.0, symbol_type=0):
"""Return space group in international table symbol and number as a string.
If it fails, None is returned.
"""
_set_no_error()
dataset = get_symmetry_dataset(cell,
symprec=symprec,
... | [
"def",
"get_spacegroup",
"(",
"cell",
",",
"symprec",
"=",
"1e-5",
",",
"angle_tolerance",
"=",
"-",
"1.0",
",",
"symbol_type",
"=",
"0",
")",
":",
"_set_no_error",
"(",
")",
"dataset",
"=",
"get_symmetry_dataset",
"(",
"cell",
",",
"symprec",
"=",
"sympre... | Return space group in international table symbol and number as a string.
If it fails, None is returned. | [
"Return",
"space",
"group",
"in",
"international",
"table",
"symbol",
"and",
"number",
"as",
"a",
"string",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L238-L255 |
227,558 | atztogo/phonopy | phonopy/structure/spglib.py | get_hall_number_from_symmetry | def get_hall_number_from_symmetry(rotations, translations, symprec=1e-5):
"""Hall number is obtained from a set of symmetry operations.
If it fails, None is returned.
"""
r = np.array(rotations, dtype='intc', order='C')
t = np.array(translations, dtype='double', order='C')
hall_number = spg.ha... | python | def get_hall_number_from_symmetry(rotations, translations, symprec=1e-5):
"""Hall number is obtained from a set of symmetry operations.
If it fails, None is returned.
"""
r = np.array(rotations, dtype='intc', order='C')
t = np.array(translations, dtype='double', order='C')
hall_number = spg.ha... | [
"def",
"get_hall_number_from_symmetry",
"(",
"rotations",
",",
"translations",
",",
"symprec",
"=",
"1e-5",
")",
":",
"r",
"=",
"np",
".",
"array",
"(",
"rotations",
",",
"dtype",
"=",
"'intc'",
",",
"order",
"=",
"'C'",
")",
"t",
"=",
"np",
".",
"arra... | Hall number is obtained from a set of symmetry operations.
If it fails, None is returned. | [
"Hall",
"number",
"is",
"obtained",
"from",
"a",
"set",
"of",
"symmetry",
"operations",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L258-L267 |
227,559 | atztogo/phonopy | phonopy/structure/spglib.py | get_spacegroup_type | def get_spacegroup_type(hall_number):
"""Translate Hall number to space group type information.
If it fails, None is returned.
"""
_set_no_error()
keys = ('number',
'international_short',
'international_full',
'international',
'schoenflies',
... | python | def get_spacegroup_type(hall_number):
"""Translate Hall number to space group type information.
If it fails, None is returned.
"""
_set_no_error()
keys = ('number',
'international_short',
'international_full',
'international',
'schoenflies',
... | [
"def",
"get_spacegroup_type",
"(",
"hall_number",
")",
":",
"_set_no_error",
"(",
")",
"keys",
"=",
"(",
"'number'",
",",
"'international_short'",
",",
"'international_full'",
",",
"'international'",
",",
"'schoenflies'",
",",
"'hall_symbol'",
",",
"'choice'",
",",
... | Translate Hall number to space group type information.
If it fails, None is returned. | [
"Translate",
"Hall",
"number",
"to",
"space",
"group",
"type",
"information",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L270-L298 |
227,560 | atztogo/phonopy | phonopy/structure/spglib.py | get_pointgroup | def get_pointgroup(rotations):
"""Return point group in international table symbol and number.
The symbols are mapped to the numbers as follows:
1 "1 "
2 "-1 "
3 "2 "
4 "m "
5 "2/m "
6 "222 "
7 "mm2 "
8 "mmm "
9 "4 "
10 "-4 "
11... | python | def get_pointgroup(rotations):
"""Return point group in international table symbol and number.
The symbols are mapped to the numbers as follows:
1 "1 "
2 "-1 "
3 "2 "
4 "m "
5 "2/m "
6 "222 "
7 "mm2 "
8 "mmm "
9 "4 "
10 "-4 "
11... | [
"def",
"get_pointgroup",
"(",
"rotations",
")",
":",
"_set_no_error",
"(",
")",
"# (symbol, pointgroup_number, transformation_matrix)",
"pointgroup",
"=",
"spg",
".",
"pointgroup",
"(",
"np",
".",
"array",
"(",
"rotations",
",",
"dtype",
"=",
"'intc'",
",",
"order... | Return point group in international table symbol and number.
The symbols are mapped to the numbers as follows:
1 "1 "
2 "-1 "
3 "2 "
4 "m "
5 "2/m "
6 "222 "
7 "mm2 "
8 "mmm "
9 "4 "
10 "-4 "
11 "4/m "
12 "422 "
13 "4mm... | [
"Return",
"point",
"group",
"in",
"international",
"table",
"symbol",
"and",
"number",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L301-L343 |
227,561 | atztogo/phonopy | phonopy/structure/spglib.py | standardize_cell | def standardize_cell(cell,
to_primitive=False,
no_idealize=False,
symprec=1e-5,
angle_tolerance=-1.0):
"""Return standardized cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
... | python | def standardize_cell(cell,
to_primitive=False,
no_idealize=False,
symprec=1e-5,
angle_tolerance=-1.0):
"""Return standardized cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
... | [
"def",
"standardize_cell",
"(",
"cell",
",",
"to_primitive",
"=",
"False",
",",
"no_idealize",
"=",
"False",
",",
"symprec",
"=",
"1e-5",
",",
"angle_tolerance",
"=",
"-",
"1.0",
")",
":",
"_set_no_error",
"(",
")",
"lattice",
",",
"_positions",
",",
"_num... | Return standardized cell.
Args:
cell, symprec, angle_tolerance:
See the docstring of get_symmetry.
to_primitive:
bool: If True, the standardized primitive cell is created.
no_idealize:
bool: If True, it is disabled to idealize lengths and angles of
... | [
"Return",
"standardized",
"cell",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L346-L394 |
227,562 | atztogo/phonopy | phonopy/structure/spglib.py | find_primitive | def find_primitive(cell, symprec=1e-5, angle_tolerance=-1.0):
"""Primitive cell is searched in the input cell.
The primitive cell is returned by a tuple of (lattice, positions, numbers).
If it fails, None is returned.
"""
_set_no_error()
lattice, positions, numbers, _ = _expand_cell(cell)
... | python | def find_primitive(cell, symprec=1e-5, angle_tolerance=-1.0):
"""Primitive cell is searched in the input cell.
The primitive cell is returned by a tuple of (lattice, positions, numbers).
If it fails, None is returned.
"""
_set_no_error()
lattice, positions, numbers, _ = _expand_cell(cell)
... | [
"def",
"find_primitive",
"(",
"cell",
",",
"symprec",
"=",
"1e-5",
",",
"angle_tolerance",
"=",
"-",
"1.0",
")",
":",
"_set_no_error",
"(",
")",
"lattice",
",",
"positions",
",",
"numbers",
",",
"_",
"=",
"_expand_cell",
"(",
"cell",
")",
"if",
"lattice"... | Primitive cell is searched in the input cell.
The primitive cell is returned by a tuple of (lattice, positions, numbers).
If it fails, None is returned. | [
"Primitive",
"cell",
"is",
"searched",
"in",
"the",
"input",
"cell",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L432-L456 |
227,563 | atztogo/phonopy | phonopy/structure/spglib.py | get_symmetry_from_database | def get_symmetry_from_database(hall_number):
"""Return symmetry operations corresponding to a Hall symbol.
The Hall symbol is given by the serial number in between 1 and 530.
The symmetry operations are given by a dictionary whose keys are
'rotations' and 'translations'.
If it fails, None is return... | python | def get_symmetry_from_database(hall_number):
"""Return symmetry operations corresponding to a Hall symbol.
The Hall symbol is given by the serial number in between 1 and 530.
The symmetry operations are given by a dictionary whose keys are
'rotations' and 'translations'.
If it fails, None is return... | [
"def",
"get_symmetry_from_database",
"(",
"hall_number",
")",
":",
"_set_no_error",
"(",
")",
"rotations",
"=",
"np",
".",
"zeros",
"(",
"(",
"192",
",",
"3",
",",
"3",
")",
",",
"dtype",
"=",
"'intc'",
")",
"translations",
"=",
"np",
".",
"zeros",
"("... | Return symmetry operations corresponding to a Hall symbol.
The Hall symbol is given by the serial number in between 1 and 530.
The symmetry operations are given by a dictionary whose keys are
'rotations' and 'translations'.
If it fails, None is returned. | [
"Return",
"symmetry",
"operations",
"corresponding",
"to",
"a",
"Hall",
"symbol",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L459-L480 |
227,564 | atztogo/phonopy | phonopy/structure/spglib.py | get_grid_point_from_address | def get_grid_point_from_address(grid_address, mesh):
"""Return grid point index by tranlating grid address"""
_set_no_error()
return spg.grid_point_from_address(np.array(grid_address, dtype='intc'),
np.array(mesh, dtype='intc')) | python | def get_grid_point_from_address(grid_address, mesh):
"""Return grid point index by tranlating grid address"""
_set_no_error()
return spg.grid_point_from_address(np.array(grid_address, dtype='intc'),
np.array(mesh, dtype='intc')) | [
"def",
"get_grid_point_from_address",
"(",
"grid_address",
",",
"mesh",
")",
":",
"_set_no_error",
"(",
")",
"return",
"spg",
".",
"grid_point_from_address",
"(",
"np",
".",
"array",
"(",
"grid_address",
",",
"dtype",
"=",
"'intc'",
")",
",",
"np",
".",
"arr... | Return grid point index by tranlating grid address | [
"Return",
"grid",
"point",
"index",
"by",
"tranlating",
"grid",
"address"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L486-L491 |
227,565 | atztogo/phonopy | phonopy/structure/spglib.py | get_ir_reciprocal_mesh | def get_ir_reciprocal_mesh(mesh,
cell,
is_shift=None,
is_time_reversal=True,
symprec=1e-5,
is_dense=False):
"""Return k-points mesh and k-point map to the irreducible k-points.
... | python | def get_ir_reciprocal_mesh(mesh,
cell,
is_shift=None,
is_time_reversal=True,
symprec=1e-5,
is_dense=False):
"""Return k-points mesh and k-point map to the irreducible k-points.
... | [
"def",
"get_ir_reciprocal_mesh",
"(",
"mesh",
",",
"cell",
",",
"is_shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"symprec",
"=",
"1e-5",
",",
"is_dense",
"=",
"False",
")",
":",
"_set_no_error",
"(",
")",
"lattice",
",",
"positions",
","... | Return k-points mesh and k-point map to the irreducible k-points.
The symmetry is serched from the input cell.
Parameters
----------
mesh : array_like
Uniform sampling mesh numbers.
dtype='intc', shape=(3,)
cell : spglib cell tuple
Crystal structure.
is_shift : array_li... | [
"Return",
"k",
"-",
"points",
"mesh",
"and",
"k",
"-",
"point",
"map",
"to",
"the",
"irreducible",
"k",
"-",
"points",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L494-L559 |
227,566 | atztogo/phonopy | phonopy/structure/spglib.py | get_stabilized_reciprocal_mesh | def get_stabilized_reciprocal_mesh(mesh,
rotations,
is_shift=None,
is_time_reversal=True,
qpoints=None,
is_dense=False):
"""Return k-point ma... | python | def get_stabilized_reciprocal_mesh(mesh,
rotations,
is_shift=None,
is_time_reversal=True,
qpoints=None,
is_dense=False):
"""Return k-point ma... | [
"def",
"get_stabilized_reciprocal_mesh",
"(",
"mesh",
",",
"rotations",
",",
"is_shift",
"=",
"None",
",",
"is_time_reversal",
"=",
"True",
",",
"qpoints",
"=",
"None",
",",
"is_dense",
"=",
"False",
")",
":",
"_set_no_error",
"(",
")",
"if",
"is_dense",
":"... | Return k-point map to the irreducible k-points and k-point grid points.
The symmetry is searched from the input rotation matrices in real space.
Parameters
----------
mesh : array_like
Uniform sampling mesh numbers.
dtype='intc', shape=(3,)
rotations : array_like
Rotation m... | [
"Return",
"k",
"-",
"point",
"map",
"to",
"the",
"irreducible",
"k",
"-",
"points",
"and",
"k",
"-",
"point",
"grid",
"points",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L562-L631 |
227,567 | atztogo/phonopy | phonopy/structure/spglib.py | relocate_BZ_grid_address | def relocate_BZ_grid_address(grid_address,
mesh,
reciprocal_lattice, # column vectors
is_shift=None,
is_dense=False):
"""Grid addresses are relocated to be inside first Brillouin zone.
Number of... | python | def relocate_BZ_grid_address(grid_address,
mesh,
reciprocal_lattice, # column vectors
is_shift=None,
is_dense=False):
"""Grid addresses are relocated to be inside first Brillouin zone.
Number of... | [
"def",
"relocate_BZ_grid_address",
"(",
"grid_address",
",",
"mesh",
",",
"reciprocal_lattice",
",",
"# column vectors",
"is_shift",
"=",
"None",
",",
"is_dense",
"=",
"False",
")",
":",
"_set_no_error",
"(",
")",
"if",
"is_shift",
"is",
"None",
":",
"_is_shift"... | Grid addresses are relocated to be inside first Brillouin zone.
Number of ir-grid-points inside Brillouin zone is returned.
It is assumed that the following arrays have the shapes of
bz_grid_address : (num_grid_points_in_FBZ, 3)
bz_map (prod(mesh * 2), )
Note that the shape of grid_address... | [
"Grid",
"addresses",
"are",
"relocated",
"to",
"be",
"inside",
"first",
"Brillouin",
"zone",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L751-L806 |
227,568 | atztogo/phonopy | phonopy/structure/spglib.py | delaunay_reduce | def delaunay_reduce(lattice, eps=1e-5):
"""Run Delaunay reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
symprec:
float: Tolerance to check if volume is close to zero or not and
... | python | def delaunay_reduce(lattice, eps=1e-5):
"""Run Delaunay reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
symprec:
float: Tolerance to check if volume is close to zero or not and
... | [
"def",
"delaunay_reduce",
"(",
"lattice",
",",
"eps",
"=",
"1e-5",
")",
":",
"_set_no_error",
"(",
")",
"delaunay_lattice",
"=",
"np",
".",
"array",
"(",
"np",
".",
"transpose",
"(",
"lattice",
")",
",",
"dtype",
"=",
"'double'",
",",
"order",
"=",
"'C... | Run Delaunay reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
symprec:
float: Tolerance to check if volume is close to zero or not and
if two basis vectors are orthogon... | [
"Run",
"Delaunay",
"reduction"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L809-L841 |
227,569 | atztogo/phonopy | phonopy/structure/spglib.py | niggli_reduce | def niggli_reduce(lattice, eps=1e-5):
"""Run Niggli reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
eps:
float: Tolerance to check if difference of norms of two basis
... | python | def niggli_reduce(lattice, eps=1e-5):
"""Run Niggli reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
eps:
float: Tolerance to check if difference of norms of two basis
... | [
"def",
"niggli_reduce",
"(",
"lattice",
",",
"eps",
"=",
"1e-5",
")",
":",
"_set_no_error",
"(",
")",
"niggli_lattice",
"=",
"np",
".",
"array",
"(",
"np",
".",
"transpose",
"(",
"lattice",
")",
",",
"dtype",
"=",
"'double'",
",",
"order",
"=",
"'C'",
... | Run Niggli reduction
Args:
lattice: Lattice parameters in the form of
[[a_x, a_y, a_z],
[b_x, b_y, b_z],
[c_x, c_y, c_z]]
eps:
float: Tolerance to check if difference of norms of two basis
vectors is close to zero or not and if tw... | [
"Run",
"Niggli",
"reduction"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/spglib.py#L844-L877 |
227,570 | atztogo/phonopy | phonopy/file_IO.py | get_FORCE_SETS_lines | def get_FORCE_SETS_lines(dataset, forces=None):
"""Generate FORCE_SETS string
See the format of dataset in the docstring of
Phonopy.set_displacement_dataset. Optionally for the type-1 (traditional)
format, forces can be given. In this case, sets of forces are
unnecessary to be stored in the dataset... | python | def get_FORCE_SETS_lines(dataset, forces=None):
"""Generate FORCE_SETS string
See the format of dataset in the docstring of
Phonopy.set_displacement_dataset. Optionally for the type-1 (traditional)
format, forces can be given. In this case, sets of forces are
unnecessary to be stored in the dataset... | [
"def",
"get_FORCE_SETS_lines",
"(",
"dataset",
",",
"forces",
"=",
"None",
")",
":",
"if",
"'first_atoms'",
"in",
"dataset",
":",
"return",
"_get_FORCE_SETS_lines_type1",
"(",
"dataset",
",",
"forces",
"=",
"forces",
")",
"elif",
"'forces'",
"in",
"dataset",
"... | Generate FORCE_SETS string
See the format of dataset in the docstring of
Phonopy.set_displacement_dataset. Optionally for the type-1 (traditional)
format, forces can be given. In this case, sets of forces are
unnecessary to be stored in the dataset. | [
"Generate",
"FORCE_SETS",
"string"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/file_IO.py#L52-L65 |
227,571 | atztogo/phonopy | phonopy/file_IO.py | write_FORCE_CONSTANTS | def write_FORCE_CONSTANTS(force_constants,
filename='FORCE_CONSTANTS',
p2s_map=None):
"""Write force constants in text file format.
Parameters
----------
force_constants: ndarray
Force constants
shape=(n_satom,n_satom,3,3) or (n_patom,... | python | def write_FORCE_CONSTANTS(force_constants,
filename='FORCE_CONSTANTS',
p2s_map=None):
"""Write force constants in text file format.
Parameters
----------
force_constants: ndarray
Force constants
shape=(n_satom,n_satom,3,3) or (n_patom,... | [
"def",
"write_FORCE_CONSTANTS",
"(",
"force_constants",
",",
"filename",
"=",
"'FORCE_CONSTANTS'",
",",
"p2s_map",
"=",
"None",
")",
":",
"lines",
"=",
"get_FORCE_CONSTANTS_lines",
"(",
"force_constants",
",",
"p2s_map",
"=",
"p2s_map",
")",
"with",
"open",
"(",
... | Write force constants in text file format.
Parameters
----------
force_constants: ndarray
Force constants
shape=(n_satom,n_satom,3,3) or (n_patom,n_satom,3,3)
dtype=double
filename: str
Filename to be saved
p2s_map: ndarray
Primitive atom indices in supercell... | [
"Write",
"force",
"constants",
"in",
"text",
"file",
"format",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/file_IO.py#L243-L264 |
227,572 | atztogo/phonopy | phonopy/file_IO.py | write_force_constants_to_hdf5 | def write_force_constants_to_hdf5(force_constants,
filename='force_constants.hdf5',
p2s_map=None,
physical_unit=None,
compression=None):
"""Write force constants in hdf5 format.
... | python | def write_force_constants_to_hdf5(force_constants,
filename='force_constants.hdf5',
p2s_map=None,
physical_unit=None,
compression=None):
"""Write force constants in hdf5 format.
... | [
"def",
"write_force_constants_to_hdf5",
"(",
"force_constants",
",",
"filename",
"=",
"'force_constants.hdf5'",
",",
"p2s_map",
"=",
"None",
",",
"physical_unit",
"=",
"None",
",",
"compression",
"=",
"None",
")",
":",
"try",
":",
"import",
"h5py",
"except",
"Im... | Write force constants in hdf5 format.
Parameters
----------
force_constants: ndarray
Force constants
shape=(n_satom,n_satom,3,3) or (n_patom,n_satom,3,3)
dtype=double
filename: str
Filename to be saved
p2s_map: ndarray
Primitive atom indices in supercell inde... | [
"Write",
"force",
"constants",
"in",
"hdf5",
"format",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/file_IO.py#L285-L326 |
227,573 | atztogo/phonopy | phonopy/phonon/band_structure.py | get_band_qpoints | def get_band_qpoints(band_paths, npoints=51, rec_lattice=None):
"""Generate qpoints for band structure path
Note
----
Behavior changes with and without rec_lattice given.
Parameters
----------
band_paths: list of array_likes
Sets of end points of paths
dtype='double'
... | python | def get_band_qpoints(band_paths, npoints=51, rec_lattice=None):
"""Generate qpoints for band structure path
Note
----
Behavior changes with and without rec_lattice given.
Parameters
----------
band_paths: list of array_likes
Sets of end points of paths
dtype='double'
... | [
"def",
"get_band_qpoints",
"(",
"band_paths",
",",
"npoints",
"=",
"51",
",",
"rec_lattice",
"=",
"None",
")",
":",
"npts",
"=",
"_get_npts",
"(",
"band_paths",
",",
"npoints",
",",
"rec_lattice",
")",
"qpoints_of_paths",
"=",
"[",
"]",
"c",
"=",
"0",
"f... | Generate qpoints for band structure path
Note
----
Behavior changes with and without rec_lattice given.
Parameters
----------
band_paths: list of array_likes
Sets of end points of paths
dtype='double'
shape=(sets of paths, paths, 3)
example:
[[[0, ... | [
"Generate",
"qpoints",
"for",
"band",
"structure",
"path"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/phonon/band_structure.py#L70-L112 |
227,574 | atztogo/phonopy | phonopy/phonon/band_structure.py | get_band_qpoints_by_seekpath | def get_band_qpoints_by_seekpath(primitive, npoints, is_const_interval=False):
"""q-points along BZ high symmetry paths are generated using seekpath.
Parameters
----------
primitive : PhonopyAtoms
Primitive cell.
npoints : int
Number of q-points sampled along a path including end po... | python | def get_band_qpoints_by_seekpath(primitive, npoints, is_const_interval=False):
"""q-points along BZ high symmetry paths are generated using seekpath.
Parameters
----------
primitive : PhonopyAtoms
Primitive cell.
npoints : int
Number of q-points sampled along a path including end po... | [
"def",
"get_band_qpoints_by_seekpath",
"(",
"primitive",
",",
"npoints",
",",
"is_const_interval",
"=",
"False",
")",
":",
"try",
":",
"import",
"seekpath",
"except",
"ImportError",
":",
"raise",
"ImportError",
"(",
"\"You need to install seekpath.\"",
")",
"band_path... | q-points along BZ high symmetry paths are generated using seekpath.
Parameters
----------
primitive : PhonopyAtoms
Primitive cell.
npoints : int
Number of q-points sampled along a path including end points.
is_const_interval : bool, optional
When True, q-points are sampled i... | [
"q",
"-",
"points",
"along",
"BZ",
"high",
"symmetry",
"paths",
"are",
"generated",
"using",
"seekpath",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/phonon/band_structure.py#L115-L165 |
227,575 | atztogo/phonopy | phonopy/harmonic/dynmat_to_fc.py | get_commensurate_points | def get_commensurate_points(supercell_matrix): # wrt primitive cell
"""Commensurate q-points are returned.
Parameters
----------
supercell_matrix : array_like
Supercell matrix with respect to primitive cell basis vectors.
shape=(3, 3)
dtype=intc
"""
smat = np.array(su... | python | def get_commensurate_points(supercell_matrix): # wrt primitive cell
"""Commensurate q-points are returned.
Parameters
----------
supercell_matrix : array_like
Supercell matrix with respect to primitive cell basis vectors.
shape=(3, 3)
dtype=intc
"""
smat = np.array(su... | [
"def",
"get_commensurate_points",
"(",
"supercell_matrix",
")",
":",
"# wrt primitive cell",
"smat",
"=",
"np",
".",
"array",
"(",
"supercell_matrix",
",",
"dtype",
"=",
"int",
")",
"rec_primitive",
"=",
"PhonopyAtoms",
"(",
"numbers",
"=",
"[",
"1",
"]",
",",... | Commensurate q-points are returned.
Parameters
----------
supercell_matrix : array_like
Supercell matrix with respect to primitive cell basis vectors.
shape=(3, 3)
dtype=intc | [
"Commensurate",
"q",
"-",
"points",
"are",
"returned",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/dynmat_to_fc.py#L42-L62 |
227,576 | atztogo/phonopy | phonopy/harmonic/dynmat_to_fc.py | get_commensurate_points_in_integers | def get_commensurate_points_in_integers(supercell_matrix):
"""Commensurate q-points in integer representation are returned.
A set of integer representation of lattice points is transformed to
the equivalent set of lattice points in fractional coordinates with
respect to supercell basis vectors by
... | python | def get_commensurate_points_in_integers(supercell_matrix):
"""Commensurate q-points in integer representation are returned.
A set of integer representation of lattice points is transformed to
the equivalent set of lattice points in fractional coordinates with
respect to supercell basis vectors by
... | [
"def",
"get_commensurate_points_in_integers",
"(",
"supercell_matrix",
")",
":",
"smat",
"=",
"np",
".",
"array",
"(",
"supercell_matrix",
",",
"dtype",
"=",
"int",
")",
"snf",
"=",
"SNF3x3",
"(",
"smat",
".",
"T",
")",
"snf",
".",
"run",
"(",
")",
"D",
... | Commensurate q-points in integer representation are returned.
A set of integer representation of lattice points is transformed to
the equivalent set of lattice points in fractional coordinates with
respect to supercell basis vectors by
integer_lattice_points / det(supercell_matrix)
Parameters
... | [
"Commensurate",
"q",
"-",
"points",
"in",
"integer",
"representation",
"are",
"returned",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/dynmat_to_fc.py#L65-L97 |
227,577 | atztogo/phonopy | phonopy/interface/vasp.py | write_vasp | def write_vasp(filename, cell, direct=True):
"""Write crystal structure to a VASP POSCAR style file.
Parameters
----------
filename : str
Filename.
cell : PhonopyAtoms
Crystal structure.
direct : bool, optional
In 'Direct' or not in VASP POSCAR format. Default is True.
... | python | def write_vasp(filename, cell, direct=True):
"""Write crystal structure to a VASP POSCAR style file.
Parameters
----------
filename : str
Filename.
cell : PhonopyAtoms
Crystal structure.
direct : bool, optional
In 'Direct' or not in VASP POSCAR format. Default is True.
... | [
"def",
"write_vasp",
"(",
"filename",
",",
"cell",
",",
"direct",
"=",
"True",
")",
":",
"lines",
"=",
"get_vasp_structure_lines",
"(",
"cell",
",",
"direct",
"=",
"direct",
")",
"with",
"open",
"(",
"filename",
",",
"'w'",
")",
"as",
"w",
":",
"w",
... | Write crystal structure to a VASP POSCAR style file.
Parameters
----------
filename : str
Filename.
cell : PhonopyAtoms
Crystal structure.
direct : bool, optional
In 'Direct' or not in VASP POSCAR format. Default is True. | [
"Write",
"crystal",
"structure",
"to",
"a",
"VASP",
"POSCAR",
"style",
"file",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/vasp.py#L249-L265 |
227,578 | atztogo/phonopy | phonopy/interface/qe.py | PwscfIn._set_lattice | def _set_lattice(self):
"""Calculate and set lattice parameters.
Invoked by CELL_PARAMETERS tag.
"""
unit = self._values[0]
if unit == 'alat':
if not self._tags['celldm(1)']:
print("celldm(1) has to be specified when using alat.")
sy... | python | def _set_lattice(self):
"""Calculate and set lattice parameters.
Invoked by CELL_PARAMETERS tag.
"""
unit = self._values[0]
if unit == 'alat':
if not self._tags['celldm(1)']:
print("celldm(1) has to be specified when using alat.")
sy... | [
"def",
"_set_lattice",
"(",
"self",
")",
":",
"unit",
"=",
"self",
".",
"_values",
"[",
"0",
"]",
"if",
"unit",
"==",
"'alat'",
":",
"if",
"not",
"self",
".",
"_tags",
"[",
"'celldm(1)'",
"]",
":",
"print",
"(",
"\"celldm(1) has to be specified when using ... | Calculate and set lattice parameters.
Invoked by CELL_PARAMETERS tag. | [
"Calculate",
"and",
"set",
"lattice",
"parameters",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/qe.py#L278-L302 |
227,579 | atztogo/phonopy | phonopy/interface/qe.py | PH_Q2R.run | def run(self, cell, is_full_fc=False, parse_fc=True):
"""Make supercell force constants readable for phonopy
Note
----
Born effective charges and dielectric constant tensor are read
from QE output file if they exist. But this means
dipole-dipole contributions are removed... | python | def run(self, cell, is_full_fc=False, parse_fc=True):
"""Make supercell force constants readable for phonopy
Note
----
Born effective charges and dielectric constant tensor are read
from QE output file if they exist. But this means
dipole-dipole contributions are removed... | [
"def",
"run",
"(",
"self",
",",
"cell",
",",
"is_full_fc",
"=",
"False",
",",
"parse_fc",
"=",
"True",
")",
":",
"with",
"open",
"(",
"self",
".",
"_filename",
")",
"as",
"f",
":",
"fc_dct",
"=",
"self",
".",
"_parse_q2r",
"(",
"f",
")",
"self",
... | Make supercell force constants readable for phonopy
Note
----
Born effective charges and dielectric constant tensor are read
from QE output file if they exist. But this means
dipole-dipole contributions are removed from force constants
and this force constants matrix is ... | [
"Make",
"supercell",
"force",
"constants",
"readable",
"for",
"phonopy"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/qe.py#L416-L447 |
227,580 | atztogo/phonopy | phonopy/interface/qe.py | PH_Q2R._parse_q2r | def _parse_q2r(self, f):
"""Parse q2r output file
The format of q2r output is described at the mailing list below:
http://www.democritos.it/pipermail/pw_forum/2005-April/002408.html
http://www.democritos.it/pipermail/pw_forum/2008-September/010099.html
http://www.democritos.it/p... | python | def _parse_q2r(self, f):
"""Parse q2r output file
The format of q2r output is described at the mailing list below:
http://www.democritos.it/pipermail/pw_forum/2005-April/002408.html
http://www.democritos.it/pipermail/pw_forum/2008-September/010099.html
http://www.democritos.it/p... | [
"def",
"_parse_q2r",
"(",
"self",
",",
"f",
")",
":",
"natom",
",",
"dim",
",",
"epsilon",
",",
"borns",
"=",
"self",
".",
"_parse_parameters",
"(",
"f",
")",
"fc_dct",
"=",
"{",
"'fc'",
":",
"self",
".",
"_parse_fc",
"(",
"f",
",",
"natom",
",",
... | Parse q2r output file
The format of q2r output is described at the mailing list below:
http://www.democritos.it/pipermail/pw_forum/2005-April/002408.html
http://www.democritos.it/pipermail/pw_forum/2008-September/010099.html
http://www.democritos.it/pipermail/pw_forum/2009-August/013613... | [
"Parse",
"q2r",
"output",
"file"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/qe.py#L457-L473 |
227,581 | atztogo/phonopy | phonopy/interface/qe.py | PH_Q2R._parse_fc | def _parse_fc(self, f, natom, dim):
"""Parse force constants part
Physical unit of force cosntants in the file is Ry/au^2.
"""
ndim = np.prod(dim)
fc = np.zeros((natom, natom * ndim, 3, 3), dtype='double', order='C')
for k, l, i, j in np.ndindex((3, 3, natom, natom)):
... | python | def _parse_fc(self, f, natom, dim):
"""Parse force constants part
Physical unit of force cosntants in the file is Ry/au^2.
"""
ndim = np.prod(dim)
fc = np.zeros((natom, natom * ndim, 3, 3), dtype='double', order='C')
for k, l, i, j in np.ndindex((3, 3, natom, natom)):
... | [
"def",
"_parse_fc",
"(",
"self",
",",
"f",
",",
"natom",
",",
"dim",
")",
":",
"ndim",
"=",
"np",
".",
"prod",
"(",
"dim",
")",
"fc",
"=",
"np",
".",
"zeros",
"(",
"(",
"natom",
",",
"natom",
"*",
"ndim",
",",
"3",
",",
"3",
")",
",",
"dtyp... | Parse force constants part
Physical unit of force cosntants in the file is Ry/au^2. | [
"Parse",
"force",
"constants",
"part"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/qe.py#L507-L522 |
227,582 | atztogo/phonopy | phonopy/interface/cp2k.py | get_cp2k_structure | def get_cp2k_structure(atoms):
"""Convert the atoms structure to a CP2K input file skeleton string"""
from cp2k_tools.generator import dict2cp2k
# CP2K's default unit is angstrom, convert it, but still declare it explictly:
cp2k_cell = {sym: ('[angstrom]',) + tuple(coords) for sym, coords in zip(('a',... | python | def get_cp2k_structure(atoms):
"""Convert the atoms structure to a CP2K input file skeleton string"""
from cp2k_tools.generator import dict2cp2k
# CP2K's default unit is angstrom, convert it, but still declare it explictly:
cp2k_cell = {sym: ('[angstrom]',) + tuple(coords) for sym, coords in zip(('a',... | [
"def",
"get_cp2k_structure",
"(",
"atoms",
")",
":",
"from",
"cp2k_tools",
".",
"generator",
"import",
"dict2cp2k",
"# CP2K's default unit is angstrom, convert it, but still declare it explictly:",
"cp2k_cell",
"=",
"{",
"sym",
":",
"(",
"'[angstrom]'",
",",
")",
"+",
"... | Convert the atoms structure to a CP2K input file skeleton string | [
"Convert",
"the",
"atoms",
"structure",
"to",
"a",
"CP2K",
"input",
"file",
"skeleton",
"string"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/cp2k.py#L126-L156 |
227,583 | atztogo/phonopy | phonopy/api_qha.py | PhonopyQHA.plot_qha | def plot_qha(self, thin_number=10, volume_temp_exp=None):
"""Returns matplotlib.pyplot of QHA fitting curves at temperatures"""
return self._qha.plot(thin_number=thin_number,
volume_temp_exp=volume_temp_exp) | python | def plot_qha(self, thin_number=10, volume_temp_exp=None):
"""Returns matplotlib.pyplot of QHA fitting curves at temperatures"""
return self._qha.plot(thin_number=thin_number,
volume_temp_exp=volume_temp_exp) | [
"def",
"plot_qha",
"(",
"self",
",",
"thin_number",
"=",
"10",
",",
"volume_temp_exp",
"=",
"None",
")",
":",
"return",
"self",
".",
"_qha",
".",
"plot",
"(",
"thin_number",
"=",
"thin_number",
",",
"volume_temp_exp",
"=",
"volume_temp_exp",
")"
] | Returns matplotlib.pyplot of QHA fitting curves at temperatures | [
"Returns",
"matplotlib",
".",
"pyplot",
"of",
"QHA",
"fitting",
"curves",
"at",
"temperatures"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/api_qha.py#L137-L140 |
227,584 | atztogo/phonopy | phonopy/harmonic/force_constants.py | get_fc2 | def get_fc2(supercell,
symmetry,
dataset,
atom_list=None,
decimals=None):
"""Force constants are computed.
Force constants, Phi, are calculated from sets for forces, F, and
atomic displacement, d:
Phi = -F / d
This is solved by matrix pseudo-inversi... | python | def get_fc2(supercell,
symmetry,
dataset,
atom_list=None,
decimals=None):
"""Force constants are computed.
Force constants, Phi, are calculated from sets for forces, F, and
atomic displacement, d:
Phi = -F / d
This is solved by matrix pseudo-inversi... | [
"def",
"get_fc2",
"(",
"supercell",
",",
"symmetry",
",",
"dataset",
",",
"atom_list",
"=",
"None",
",",
"decimals",
"=",
"None",
")",
":",
"if",
"atom_list",
"is",
"None",
":",
"fc_dim0",
"=",
"supercell",
".",
"get_number_of_atoms",
"(",
")",
"else",
"... | Force constants are computed.
Force constants, Phi, are calculated from sets for forces, F, and
atomic displacement, d:
Phi = -F / d
This is solved by matrix pseudo-inversion.
Crystal symmetry is included when creating F and d matrices.
Returns
-------
ndarray
Force constants... | [
"Force",
"constants",
"are",
"computed",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/force_constants.py#L58-L113 |
227,585 | atztogo/phonopy | phonopy/harmonic/force_constants.py | set_permutation_symmetry | def set_permutation_symmetry(force_constants):
"""Enforce permutation symmetry to force cosntants by
Phi_ij_ab = Phi_ji_ba
i, j: atom index
a, b: Cartesian axis index
This is not necessary for harmonic phonon calculation because this
condition is imposed when making dynamical matrix Hermite i... | python | def set_permutation_symmetry(force_constants):
"""Enforce permutation symmetry to force cosntants by
Phi_ij_ab = Phi_ji_ba
i, j: atom index
a, b: Cartesian axis index
This is not necessary for harmonic phonon calculation because this
condition is imposed when making dynamical matrix Hermite i... | [
"def",
"set_permutation_symmetry",
"(",
"force_constants",
")",
":",
"fc_copy",
"=",
"force_constants",
".",
"copy",
"(",
")",
"for",
"i",
"in",
"range",
"(",
"force_constants",
".",
"shape",
"[",
"0",
"]",
")",
":",
"for",
"j",
"in",
"range",
"(",
"forc... | Enforce permutation symmetry to force cosntants by
Phi_ij_ab = Phi_ji_ba
i, j: atom index
a, b: Cartesian axis index
This is not necessary for harmonic phonon calculation because this
condition is imposed when making dynamical matrix Hermite in
dynamical_matrix.py. | [
"Enforce",
"permutation",
"symmetry",
"to",
"force",
"cosntants",
"by"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/force_constants.py#L462-L480 |
227,586 | atztogo/phonopy | phonopy/harmonic/force_constants.py | similarity_transformation | def similarity_transformation(rot, mat):
""" R x M x R^-1 """
return np.dot(rot, np.dot(mat, np.linalg.inv(rot))) | python | def similarity_transformation(rot, mat):
""" R x M x R^-1 """
return np.dot(rot, np.dot(mat, np.linalg.inv(rot))) | [
"def",
"similarity_transformation",
"(",
"rot",
",",
"mat",
")",
":",
"return",
"np",
".",
"dot",
"(",
"rot",
",",
"np",
".",
"dot",
"(",
"mat",
",",
"np",
".",
"linalg",
".",
"inv",
"(",
"rot",
")",
")",
")"
] | R x M x R^-1 | [
"R",
"x",
"M",
"x",
"R^",
"-",
"1"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/force_constants.py#L529-L531 |
227,587 | atztogo/phonopy | phonopy/harmonic/force_constants.py | _get_sym_mappings_from_permutations | def _get_sym_mappings_from_permutations(permutations, atom_list_done):
"""This can be thought of as computing 'map_atom_disp' and 'map_sym'
for all atoms, except done using permutations instead of by
computing overlaps.
Input:
* permutations, shape [num_rot][num_pos]
* atom_list_done
... | python | def _get_sym_mappings_from_permutations(permutations, atom_list_done):
"""This can be thought of as computing 'map_atom_disp' and 'map_sym'
for all atoms, except done using permutations instead of by
computing overlaps.
Input:
* permutations, shape [num_rot][num_pos]
* atom_list_done
... | [
"def",
"_get_sym_mappings_from_permutations",
"(",
"permutations",
",",
"atom_list_done",
")",
":",
"assert",
"permutations",
".",
"ndim",
"==",
"2",
"num_pos",
"=",
"permutations",
".",
"shape",
"[",
"1",
"]",
"# filled with -1",
"map_atoms",
"=",
"np",
".",
"z... | This can be thought of as computing 'map_atom_disp' and 'map_sym'
for all atoms, except done using permutations instead of by
computing overlaps.
Input:
* permutations, shape [num_rot][num_pos]
* atom_list_done
Output:
* map_atoms, shape [num_pos].
Maps each atom in the... | [
"This",
"can",
"be",
"thought",
"of",
"as",
"computing",
"map_atom_disp",
"and",
"map_sym",
"for",
"all",
"atoms",
"except",
"done",
"using",
"permutations",
"instead",
"of",
"by",
"computing",
"overlaps",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/force_constants.py#L778-L826 |
227,588 | atztogo/phonopy | phonopy/harmonic/displacement.py | get_least_displacements | def get_least_displacements(symmetry,
is_plusminus='auto',
is_diagonal=True,
is_trigonal=False,
log_level=0):
"""Return a set of displacements
Returns
-------
array_like
List of direc... | python | def get_least_displacements(symmetry,
is_plusminus='auto',
is_diagonal=True,
is_trigonal=False,
log_level=0):
"""Return a set of displacements
Returns
-------
array_like
List of direc... | [
"def",
"get_least_displacements",
"(",
"symmetry",
",",
"is_plusminus",
"=",
"'auto'",
",",
"is_diagonal",
"=",
"True",
",",
"is_trigonal",
"=",
"False",
",",
"log_level",
"=",
"0",
")",
":",
"displacements",
"=",
"[",
"]",
"if",
"is_diagonal",
":",
"directi... | Return a set of displacements
Returns
-------
array_like
List of directions with respect to axes. This gives only the
symmetrically non equivalent directions. The format is like:
[[0, 1, 0, 0],
[7, 1, 0, 1], ...]
where each list is defined by:
First... | [
"Return",
"a",
"set",
"of",
"displacements"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/harmonic/displacement.py#L74-L127 |
227,589 | atztogo/phonopy | phonopy/interface/FHIaims.py | read_aims | def read_aims(filename):
"""Method to read FHI-aims geometry files in phonopy context."""
lines = open(filename, 'r').readlines()
cell = []
is_frac = []
positions = []
symbols = []
magmoms = []
for line in lines:
fields = line.split()
if not len(fields):
con... | python | def read_aims(filename):
"""Method to read FHI-aims geometry files in phonopy context."""
lines = open(filename, 'r').readlines()
cell = []
is_frac = []
positions = []
symbols = []
magmoms = []
for line in lines:
fields = line.split()
if not len(fields):
con... | [
"def",
"read_aims",
"(",
"filename",
")",
":",
"lines",
"=",
"open",
"(",
"filename",
",",
"'r'",
")",
".",
"readlines",
"(",
")",
"cell",
"=",
"[",
"]",
"is_frac",
"=",
"[",
"]",
"positions",
"=",
"[",
"]",
"symbols",
"=",
"[",
"]",
"magmoms",
"... | Method to read FHI-aims geometry files in phonopy context. | [
"Method",
"to",
"read",
"FHI",
"-",
"aims",
"geometry",
"files",
"in",
"phonopy",
"context",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/FHIaims.py#L49-L92 |
227,590 | atztogo/phonopy | phonopy/interface/FHIaims.py | write_aims | def write_aims(filename, atoms):
"""Method to write FHI-aims geometry files in phonopy context."""
lines = ""
lines += "# geometry.in for FHI-aims \n"
lines += "# | generated by phonopy.FHIaims.write_aims() \n"
lattice_vector_line = "lattice_vector " + "%16.16f "*3 + "\n"
for vec in atoms.get_... | python | def write_aims(filename, atoms):
"""Method to write FHI-aims geometry files in phonopy context."""
lines = ""
lines += "# geometry.in for FHI-aims \n"
lines += "# | generated by phonopy.FHIaims.write_aims() \n"
lattice_vector_line = "lattice_vector " + "%16.16f "*3 + "\n"
for vec in atoms.get_... | [
"def",
"write_aims",
"(",
"filename",
",",
"atoms",
")",
":",
"lines",
"=",
"\"\"",
"lines",
"+=",
"\"# geometry.in for FHI-aims \\n\"",
"lines",
"+=",
"\"# | generated by phonopy.FHIaims.write_aims() \\n\"",
"lattice_vector_line",
"=",
"\"lattice_vector \"",
"+",
"\"%16.16... | Method to write FHI-aims geometry files in phonopy context. | [
"Method",
"to",
"write",
"FHI",
"-",
"aims",
"geometry",
"files",
"in",
"phonopy",
"context",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/FHIaims.py#L95-L121 |
227,591 | atztogo/phonopy | phonopy/interface/FHIaims.py | read_aims_output | def read_aims_output(filename):
""" Read FHI-aims output and
return geometry, energy and forces from last self-consistency iteration"""
lines = open(filename, 'r').readlines()
l = 0
N = 0
while l < len(lines):
line = lines[l]
if "| Number of atoms" in line:
N =... | python | def read_aims_output(filename):
""" Read FHI-aims output and
return geometry, energy and forces from last self-consistency iteration"""
lines = open(filename, 'r').readlines()
l = 0
N = 0
while l < len(lines):
line = lines[l]
if "| Number of atoms" in line:
N =... | [
"def",
"read_aims_output",
"(",
"filename",
")",
":",
"lines",
"=",
"open",
"(",
"filename",
",",
"'r'",
")",
".",
"readlines",
"(",
")",
"l",
"=",
"0",
"N",
"=",
"0",
"while",
"l",
"<",
"len",
"(",
"lines",
")",
":",
"line",
"=",
"lines",
"[",
... | Read FHI-aims output and
return geometry, energy and forces from last self-consistency iteration | [
"Read",
"FHI",
"-",
"aims",
"output",
"and",
"return",
"geometry",
"energy",
"and",
"forces",
"from",
"last",
"self",
"-",
"consistency",
"iteration"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/FHIaims.py#L132-L178 |
227,592 | atztogo/phonopy | phonopy/structure/symmetry.py | find_primitive | def find_primitive(cell, symprec=1e-5):
"""
A primitive cell is searched in the input cell. When a primitive
cell is found, an object of Atoms class of the primitive cell is
returned. When not, None is returned.
"""
lattice, positions, numbers = spg.find_primitive(cell.totuple(), symprec)
if... | python | def find_primitive(cell, symprec=1e-5):
"""
A primitive cell is searched in the input cell. When a primitive
cell is found, an object of Atoms class of the primitive cell is
returned. When not, None is returned.
"""
lattice, positions, numbers = spg.find_primitive(cell.totuple(), symprec)
if... | [
"def",
"find_primitive",
"(",
"cell",
",",
"symprec",
"=",
"1e-5",
")",
":",
"lattice",
",",
"positions",
",",
"numbers",
"=",
"spg",
".",
"find_primitive",
"(",
"cell",
".",
"totuple",
"(",
")",
",",
"symprec",
")",
"if",
"lattice",
"is",
"None",
":",... | A primitive cell is searched in the input cell. When a primitive
cell is found, an object of Atoms class of the primitive cell is
returned. When not, None is returned. | [
"A",
"primitive",
"cell",
"is",
"searched",
"in",
"the",
"input",
"cell",
".",
"When",
"a",
"primitive",
"cell",
"is",
"found",
"an",
"object",
"of",
"Atoms",
"class",
"of",
"the",
"primitive",
"cell",
"is",
"returned",
".",
"When",
"not",
"None",
"is",
... | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/symmetry.py#L300-L313 |
227,593 | atztogo/phonopy | phonopy/structure/symmetry.py | elaborate_borns_and_epsilon | def elaborate_borns_and_epsilon(ucell,
borns,
epsilon,
primitive_matrix=None,
supercell_matrix=None,
is_symmetry=True,
symmetriz... | python | def elaborate_borns_and_epsilon(ucell,
borns,
epsilon,
primitive_matrix=None,
supercell_matrix=None,
is_symmetry=True,
symmetriz... | [
"def",
"elaborate_borns_and_epsilon",
"(",
"ucell",
",",
"borns",
",",
"epsilon",
",",
"primitive_matrix",
"=",
"None",
",",
"supercell_matrix",
"=",
"None",
",",
"is_symmetry",
"=",
"True",
",",
"symmetrize_tensors",
"=",
"False",
",",
"symprec",
"=",
"1e-5",
... | Symmetrize Born effective charges and dielectric constants and
extract Born effective charges of symmetrically independent atoms
for primitive cell.
Args:
ucell (Atoms): Unit cell structure
borns (np.array): Born effective charges of ucell
epsilon (np.array): Dielectric constan... | [
"Symmetrize",
"Born",
"effective",
"charges",
"and",
"dielectric",
"constants",
"and",
"extract",
"Born",
"effective",
"charges",
"of",
"symmetrically",
"independent",
"atoms",
"for",
"primitive",
"cell",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/symmetry.py#L343-L399 |
227,594 | atztogo/phonopy | phonopy/structure/symmetry.py | symmetrize_borns_and_epsilon | def symmetrize_borns_and_epsilon(borns,
epsilon,
ucell,
primitive_matrix=None,
supercell_matrix=None,
symprec=1e-5,
is_sym... | python | def symmetrize_borns_and_epsilon(borns,
epsilon,
ucell,
primitive_matrix=None,
supercell_matrix=None,
symprec=1e-5,
is_sym... | [
"def",
"symmetrize_borns_and_epsilon",
"(",
"borns",
",",
"epsilon",
",",
"ucell",
",",
"primitive_matrix",
"=",
"None",
",",
"supercell_matrix",
"=",
"None",
",",
"symprec",
"=",
"1e-5",
",",
"is_symmetry",
"=",
"True",
")",
":",
"lattice",
"=",
"ucell",
".... | Symmetrize Born effective charges and dielectric tensor
Parameters
----------
borns: array_like
Born effective charges.
shape=(unitcell_atoms, 3, 3)
dtype='double'
epsilon: array_like
Dielectric constant
shape=(3, 3)
dtype='double'
ucell: PhonopyAtoms... | [
"Symmetrize",
"Born",
"effective",
"charges",
"and",
"dielectric",
"tensor"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/structure/symmetry.py#L402-L488 |
227,595 | atztogo/phonopy | phonopy/interface/dftbp.py | read_dftbp | def read_dftbp(filename):
""" Reads DFTB+ structure files in gen format.
Args:
filename: name of the gen-file to be read
Returns:
atoms: an object of the phonopy.Atoms class, representing the structure
found in filename
"""
infile = open(filename, 'r')
lines = infile.... | python | def read_dftbp(filename):
""" Reads DFTB+ structure files in gen format.
Args:
filename: name of the gen-file to be read
Returns:
atoms: an object of the phonopy.Atoms class, representing the structure
found in filename
"""
infile = open(filename, 'r')
lines = infile.... | [
"def",
"read_dftbp",
"(",
"filename",
")",
":",
"infile",
"=",
"open",
"(",
"filename",
",",
"'r'",
")",
"lines",
"=",
"infile",
".",
"readlines",
"(",
")",
"# remove any comments",
"for",
"ss",
"in",
"lines",
":",
"if",
"ss",
".",
"strip",
"(",
")",
... | Reads DFTB+ structure files in gen format.
Args:
filename: name of the gen-file to be read
Returns:
atoms: an object of the phonopy.Atoms class, representing the structure
found in filename | [
"Reads",
"DFTB",
"+",
"structure",
"files",
"in",
"gen",
"format",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/dftbp.py#L72-L135 |
227,596 | atztogo/phonopy | phonopy/interface/dftbp.py | get_reduced_symbols | def get_reduced_symbols(symbols):
"""Reduces expanded list of symbols.
Args:
symbols: list containing any chemical symbols as often as
the atom appears in the structure
Returns:
reduced_symbols: any symbols appears only once
"""
reduced_symbols = []
for ss in symbols:... | python | def get_reduced_symbols(symbols):
"""Reduces expanded list of symbols.
Args:
symbols: list containing any chemical symbols as often as
the atom appears in the structure
Returns:
reduced_symbols: any symbols appears only once
"""
reduced_symbols = []
for ss in symbols:... | [
"def",
"get_reduced_symbols",
"(",
"symbols",
")",
":",
"reduced_symbols",
"=",
"[",
"]",
"for",
"ss",
"in",
"symbols",
":",
"if",
"not",
"(",
"ss",
"in",
"reduced_symbols",
")",
":",
"reduced_symbols",
".",
"append",
"(",
"ss",
")",
"return",
"reduced_sym... | Reduces expanded list of symbols.
Args:
symbols: list containing any chemical symbols as often as
the atom appears in the structure
Returns:
reduced_symbols: any symbols appears only once | [
"Reduces",
"expanded",
"list",
"of",
"symbols",
"."
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/dftbp.py#L140-L157 |
227,597 | atztogo/phonopy | phonopy/interface/dftbp.py | write_dftbp | def write_dftbp(filename, atoms):
"""Writes DFTB+ readable, gen-formatted structure files
Args:
filename: name of the gen-file to be written
atoms: object containing information about structure
"""
scale_pos = dftbpToBohr
lines = ""
# 1. line, use absolute positions
natoms... | python | def write_dftbp(filename, atoms):
"""Writes DFTB+ readable, gen-formatted structure files
Args:
filename: name of the gen-file to be written
atoms: object containing information about structure
"""
scale_pos = dftbpToBohr
lines = ""
# 1. line, use absolute positions
natoms... | [
"def",
"write_dftbp",
"(",
"filename",
",",
"atoms",
")",
":",
"scale_pos",
"=",
"dftbpToBohr",
"lines",
"=",
"\"\"",
"# 1. line, use absolute positions",
"natoms",
"=",
"atoms",
".",
"get_number_of_atoms",
"(",
")",
"lines",
"+=",
"str",
"(",
"natoms",
")",
"... | Writes DFTB+ readable, gen-formatted structure files
Args:
filename: name of the gen-file to be written
atoms: object containing information about structure | [
"Writes",
"DFTB",
"+",
"readable",
"gen",
"-",
"formatted",
"structure",
"files"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/dftbp.py#L159-L203 |
227,598 | atztogo/phonopy | phonopy/interface/dftbp.py | write_supercells_with_displacements | def write_supercells_with_displacements(supercell, cells_with_disps, filename="geo.gen"):
"""Writes perfect supercell and supercells with displacements
Args:
supercell: perfect supercell
cells_with_disps: supercells with displaced atoms
filename: root-filename
"""
# original ce... | python | def write_supercells_with_displacements(supercell, cells_with_disps, filename="geo.gen"):
"""Writes perfect supercell and supercells with displacements
Args:
supercell: perfect supercell
cells_with_disps: supercells with displaced atoms
filename: root-filename
"""
# original ce... | [
"def",
"write_supercells_with_displacements",
"(",
"supercell",
",",
"cells_with_disps",
",",
"filename",
"=",
"\"geo.gen\"",
")",
":",
"# original cell",
"write_dftbp",
"(",
"filename",
"+",
"\"S\"",
",",
"supercell",
")",
"# displaced cells",
"for",
"ii",
"in",
"r... | Writes perfect supercell and supercells with displacements
Args:
supercell: perfect supercell
cells_with_disps: supercells with displaced atoms
filename: root-filename | [
"Writes",
"perfect",
"supercell",
"and",
"supercells",
"with",
"displacements"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/dftbp.py#L205-L219 |
227,599 | atztogo/phonopy | phonopy/interface/__init__.py | get_interface_mode | def get_interface_mode(args):
"""Return calculator name
The calculator name is obtained from command option arguments where
argparse is used. The argument attribute name has to be
"{calculator}_mode". Then this method returns {calculator}.
"""
calculator_list = ['wien2k', 'abinit', 'qe', 'elk... | python | def get_interface_mode(args):
"""Return calculator name
The calculator name is obtained from command option arguments where
argparse is used. The argument attribute name has to be
"{calculator}_mode". Then this method returns {calculator}.
"""
calculator_list = ['wien2k', 'abinit', 'qe', 'elk... | [
"def",
"get_interface_mode",
"(",
"args",
")",
":",
"calculator_list",
"=",
"[",
"'wien2k'",
",",
"'abinit'",
",",
"'qe'",
",",
"'elk'",
",",
"'siesta'",
",",
"'cp2k'",
",",
"'crystal'",
",",
"'vasp'",
",",
"'dftbp'",
",",
"'turbomole'",
"]",
"for",
"calcu... | Return calculator name
The calculator name is obtained from command option arguments where
argparse is used. The argument attribute name has to be
"{calculator}_mode". Then this method returns {calculator}. | [
"Return",
"calculator",
"name"
] | 869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f | https://github.com/atztogo/phonopy/blob/869cc2ba9e7d495d5f4cf6942415ab3fc9e2a10f/phonopy/interface/__init__.py#L40-L55 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.