├── .gitignore ├── LICENSE ├── README.md ├── setup.py ├── tests ├── BeAu │ ├── FORCE_CONSTANTS │ ├── POSCAR │ └── SPOSCAR ├── LiCaAs │ ├── FORCE_CONSTANTS │ ├── POSCAR │ └── SPOSCAR ├── MgB2 │ ├── FORCE_CONSTANTS │ ├── POSCAR │ └── SPOSCAR ├── SrTiO3 │ ├── BORN │ ├── FORCE_CONSTANTS │ ├── POSCAR │ └── SPOSCAR └── graphene │ ├── FORCE_CONSTANTS │ ├── POSCAR │ └── SPOSCAR └── topophonon ├── __init__.py ├── model.py ├── runExamples.py ├── structure.py ├── topology.py ├── units.py └── utils.py /.gitignore: -------------------------------------------------------------------------------- 1 | *__pycache__* 2 | *.swp 3 | *.egg-info/ 4 | dist/ 5 | build/ 6 | token* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TopoPhonon 2 | #### topoPhonon is a python package that allows users to phononic calculate topological properties, by building phonon tight-binding model. 3 | * Build tight-binding models from user's input, FORCE_CONSTANTS files or Phonopy API. The last method is much faster, but need to import Phonopy package and manually create phonopy.harmonic.dynamical_matrix.DynamicalMatrix object. 4 | * Calculate berry phase, berry curvature, wannier charge center evolution around Weyl points from tight-binding models. 5 | * Build slab/ribbon models for surface/edge. 6 | * Plot 3d band surfaces. 7 | 8 | ## Installation: 9 | 10 | `pip install topophonon` 11 | 12 | ## Basic usage: 13 | 14 | Use one line of code to build a tight-binding model: 15 | `model = read_from_files(path)` 16 | where the path should contain POSCAR, SPOSCAR and FORCE_CONSTANTS files. 17 | 18 | From the model just built, build a slab model with `multi` layers along `fin_dir`: 19 | `model_2d = model.cut_piece(multi, fin_dir)` 20 | `model_2d = model_2d.atom_projected_band(q_path, node_names)` 21 | 22 | Create a Topology object: 23 | `tp = Topology(model)` 24 | Plot the energy surfaces of `band1` and `band2` and find the degenerate points on z=0 plane: 25 | `model.plot_3d_band([band1, band2], center, xy_range)` 26 | Then plot Wannier charge center evolution around `center` for `band_indices`: 27 | `tp.wcc_evol_sphere(band_indices, center)` 28 | and the Berry curvature distribution on $k_i$=`kz` plane, where $k_i$ = $k_z, k_y, k_z$ if `dirc` = 0, 1, 2, respectively: 29 | `tp.Berry_curvature_proj(band_indices, dirc, kz)` 30 | 31 | 32 | #### More examples can be found in topophonon/runExamples.py file 33 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="topoPhonon", 8 | version="1.0.3", 9 | python_requires=">=3.8", 10 | install_requires=[ 11 | "matplotlib>=3.5.2", 12 | "numpy>=1.23.1", 13 | "tqdm>=4.64.1", 14 | "scipy>=1.6.2" 15 | ], 16 | author="He (Alan) Zhu", 17 | author_email="zhu00336@umn.edu", 18 | description=" topoPhonon package is a python package that allows users to" 19 | "phononic calculate topological properties, by building phonon tight-binding" 20 | "model.", 21 | long_description=long_description, 22 | long_description_content_type="text/markdown", 23 | url="https://github.com/cnncnnzh/topoPhonon", 24 | packages=setuptools.find_packages(), 25 | classifiers=[ 26 | "Programming Language :: Python :: 3", 27 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", 28 | "Operating System :: OS Independent", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /tests/BeAu/POSCAR: -------------------------------------------------------------------------------- 1 | Be4 Au4 2 | 1.0 3 | 4.723566 0.000000 0.000000 4 | 0.000000 4.723566 0.000000 5 | 0.000000 0.000000 4.723566 6 | Be Au 7 | 4 4 8 | direct 9 | 0.153453 0.346547 0.653453 Be 10 | 0.346547 0.653453 0.153453 Be 11 | 0.653453 0.153453 0.346547 Be 12 | 0.846547 0.846547 0.846547 Be 13 | 0.844944 0.655056 0.344944 Au 14 | 0.655056 0.344944 0.844944 Au 15 | 0.344944 0.844944 0.655056 Au 16 | 0.155056 0.155056 0.155056 Au 17 | -------------------------------------------------------------------------------- /tests/BeAu/SPOSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 9.4471319999999999 0.0000000000000000 0.0000000000000000 4 | 0.0000000000000000 9.4471319999999999 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 9.4471319999999999 6 | Be Au 7 | 32 32 8 | Direct 9 | 0.0767265000000000 0.1732735000000000 0.3267265000000000 10 | 0.5767265000000000 0.1732735000000000 0.3267265000000000 11 | 0.0767265000000000 0.6732735000000000 0.3267265000000000 12 | 0.5767265000000000 0.6732735000000000 0.3267265000000000 13 | 0.0767265000000000 0.1732735000000000 0.8267264999999999 14 | 0.5767265000000000 0.1732735000000000 0.8267264999999999 15 | 0.0767265000000000 0.6732735000000000 0.8267264999999999 16 | 0.5767265000000000 0.6732735000000000 0.8267264999999999 17 | 0.1732735000000000 0.3267265000000000 0.0767265000000000 18 | 0.6732735000000000 0.3267265000000000 0.0767265000000000 19 | 0.1732735000000000 0.8267264999999999 0.0767265000000000 20 | 0.6732735000000000 0.8267264999999999 0.0767265000000000 21 | 0.1732735000000000 0.3267265000000000 0.5767265000000000 22 | 0.6732735000000000 0.3267265000000000 0.5767265000000000 23 | 0.1732735000000000 0.8267264999999999 0.5767265000000000 24 | 0.6732735000000000 0.8267264999999999 0.5767265000000000 25 | 0.3267265000000000 0.0767265000000000 0.1732735000000000 26 | 0.8267264999999999 0.0767265000000000 0.1732735000000000 27 | 0.3267265000000000 0.5767265000000000 0.1732735000000000 28 | 0.8267264999999999 0.5767265000000000 0.1732735000000000 29 | 0.3267265000000000 0.0767265000000000 0.6732735000000000 30 | 0.8267264999999999 0.0767265000000000 0.6732735000000000 31 | 0.3267265000000000 0.5767265000000000 0.6732735000000000 32 | 0.8267264999999999 0.5767265000000000 0.6732735000000000 33 | 0.4232735000000000 0.4232735000000000 0.4232735000000000 34 | 0.9232735000000001 0.4232735000000000 0.4232735000000000 35 | 0.4232735000000000 0.9232735000000001 0.4232735000000000 36 | 0.9232735000000001 0.9232735000000001 0.4232735000000000 37 | 0.4232735000000000 0.4232735000000000 0.9232735000000001 38 | 0.9232735000000001 0.4232735000000000 0.9232735000000001 39 | 0.4232735000000000 0.9232735000000001 0.9232735000000001 40 | 0.9232735000000001 0.9232735000000001 0.9232735000000001 41 | 0.4224720000000000 0.3275280000000000 0.1724720000000000 42 | 0.9224720000000000 0.3275280000000000 0.1724720000000000 43 | 0.4224720000000000 0.8275280000000000 0.1724720000000000 44 | 0.9224720000000000 0.8275280000000000 0.1724720000000000 45 | 0.4224720000000000 0.3275280000000000 0.6724720000000000 46 | 0.9224720000000000 0.3275280000000000 0.6724720000000000 47 | 0.4224720000000000 0.8275280000000000 0.6724720000000000 48 | 0.9224720000000000 0.8275280000000000 0.6724720000000000 49 | 0.3275280000000000 0.1724720000000000 0.4224720000000000 50 | 0.8275280000000000 0.1724720000000000 0.4224720000000000 51 | 0.3275280000000000 0.6724720000000000 0.4224720000000000 52 | 0.8275280000000000 0.6724720000000000 0.4224720000000000 53 | 0.3275280000000000 0.1724720000000000 0.9224720000000000 54 | 0.8275280000000000 0.1724720000000000 0.9224720000000000 55 | 0.3275280000000000 0.6724720000000000 0.9224720000000000 56 | 0.8275280000000000 0.6724720000000000 0.9224720000000000 57 | 0.1724720000000000 0.4224720000000000 0.3275280000000000 58 | 0.6724720000000000 0.4224720000000000 0.3275280000000000 59 | 0.1724720000000000 0.9224720000000000 0.3275280000000000 60 | 0.6724720000000000 0.9224720000000000 0.3275280000000000 61 | 0.1724720000000000 0.4224720000000000 0.8275280000000000 62 | 0.6724720000000000 0.4224720000000000 0.8275280000000000 63 | 0.1724720000000000 0.9224720000000000 0.8275280000000000 64 | 0.6724720000000000 0.9224720000000000 0.8275280000000000 65 | 0.0775280000000000 0.0775280000000000 0.0775280000000000 66 | 0.5775280000000000 0.0775280000000000 0.0775280000000000 67 | 0.0775280000000000 0.5775280000000000 0.0775280000000000 68 | 0.5775280000000000 0.5775280000000000 0.0775280000000000 69 | 0.0775280000000000 0.0775280000000000 0.5775280000000000 70 | 0.5775280000000000 0.0775280000000000 0.5775280000000000 71 | 0.0775280000000000 0.5775280000000000 0.5775280000000000 72 | 0.5775280000000000 0.5775280000000000 0.5775280000000000 73 | -------------------------------------------------------------------------------- /tests/LiCaAs/POSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 0.0000000000000000 3.3399999999999994 3.3399999999999994 4 | 3.3399999999999994 0.0000000000000000 3.3399999999999994 5 | 3.3399999999999994 3.3399999999999994 0.0000000000000000 6 | Ca Li As 7 | 1 1 1 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.0000000000000000 10 | 0.5000000000000000 0.5000000000000000 0.5000000000000000 11 | 0.2500000000000000 0.2500000000000000 0.2500000000000000 12 | -------------------------------------------------------------------------------- /tests/LiCaAs/SPOSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 0.0000000000000000 13.3599999999999977 13.3599999999999977 4 | 13.3599999999999977 0.0000000000000000 13.3599999999999977 5 | 13.3599999999999977 13.3599999999999977 0.0000000000000000 6 | Ca Li As 7 | 64 64 64 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.0000000000000000 10 | 0.2500000000000000 0.0000000000000000 0.0000000000000000 11 | 0.5000000000000000 0.0000000000000000 0.0000000000000000 12 | 0.7500000000000000 0.0000000000000000 0.0000000000000000 13 | 0.0000000000000000 0.2500000000000000 0.0000000000000000 14 | 0.2500000000000000 0.2500000000000000 0.0000000000000000 15 | 0.5000000000000000 0.2500000000000000 0.0000000000000000 16 | 0.7500000000000000 0.2500000000000000 0.0000000000000000 17 | 0.0000000000000000 0.5000000000000000 0.0000000000000000 18 | 0.2500000000000000 0.5000000000000000 0.0000000000000000 19 | 0.5000000000000000 0.5000000000000000 0.0000000000000000 20 | 0.7500000000000000 0.5000000000000000 0.0000000000000000 21 | 0.0000000000000000 0.7500000000000000 0.0000000000000000 22 | 0.2500000000000000 0.7500000000000000 0.0000000000000000 23 | 0.5000000000000000 0.7500000000000000 0.0000000000000000 24 | 0.7500000000000000 0.7500000000000000 0.0000000000000000 25 | 0.0000000000000000 0.0000000000000000 0.2500000000000000 26 | 0.2500000000000000 0.0000000000000000 0.2500000000000000 27 | 0.5000000000000000 0.0000000000000000 0.2500000000000000 28 | 0.7500000000000000 0.0000000000000000 0.2500000000000000 29 | 0.0000000000000000 0.2500000000000000 0.2500000000000000 30 | 0.2500000000000000 0.2500000000000000 0.2500000000000000 31 | 0.5000000000000000 0.2500000000000000 0.2500000000000000 32 | 0.7500000000000000 0.2500000000000000 0.2500000000000000 33 | 0.0000000000000000 0.5000000000000000 0.2500000000000000 34 | 0.2500000000000000 0.5000000000000000 0.2500000000000000 35 | 0.5000000000000000 0.5000000000000000 0.2500000000000000 36 | 0.7500000000000000 0.5000000000000000 0.2500000000000000 37 | 0.0000000000000000 0.7500000000000000 0.2500000000000000 38 | 0.2500000000000000 0.7500000000000000 0.2500000000000000 39 | 0.5000000000000000 0.7500000000000000 0.2500000000000000 40 | 0.7500000000000000 0.7500000000000000 0.2500000000000000 41 | 0.0000000000000000 0.0000000000000000 0.5000000000000000 42 | 0.2500000000000000 0.0000000000000000 0.5000000000000000 43 | 0.5000000000000000 0.0000000000000000 0.5000000000000000 44 | 0.7500000000000000 0.0000000000000000 0.5000000000000000 45 | 0.0000000000000000 0.2500000000000000 0.5000000000000000 46 | 0.2500000000000000 0.2500000000000000 0.5000000000000000 47 | 0.5000000000000000 0.2500000000000000 0.5000000000000000 48 | 0.7500000000000000 0.2500000000000000 0.5000000000000000 49 | 0.0000000000000000 0.5000000000000000 0.5000000000000000 50 | 0.2500000000000000 0.5000000000000000 0.5000000000000000 51 | 0.5000000000000000 0.5000000000000000 0.5000000000000000 52 | 0.7500000000000000 0.5000000000000000 0.5000000000000000 53 | 0.0000000000000000 0.7500000000000000 0.5000000000000000 54 | 0.2500000000000000 0.7500000000000000 0.5000000000000000 55 | 0.5000000000000000 0.7500000000000000 0.5000000000000000 56 | 0.7500000000000000 0.7500000000000000 0.5000000000000000 57 | 0.0000000000000000 0.0000000000000000 0.7500000000000000 58 | 0.2500000000000000 0.0000000000000000 0.7500000000000000 59 | 0.5000000000000000 0.0000000000000000 0.7500000000000000 60 | 0.7500000000000000 0.0000000000000000 0.7500000000000000 61 | 0.0000000000000000 0.2500000000000000 0.7500000000000000 62 | 0.2500000000000000 0.2500000000000000 0.7500000000000000 63 | 0.5000000000000000 0.2500000000000000 0.7500000000000000 64 | 0.7500000000000000 0.2500000000000000 0.7500000000000000 65 | 0.0000000000000000 0.5000000000000000 0.7500000000000000 66 | 0.2500000000000000 0.5000000000000000 0.7500000000000000 67 | 0.5000000000000000 0.5000000000000000 0.7500000000000000 68 | 0.7500000000000000 0.5000000000000000 0.7500000000000000 69 | 0.0000000000000000 0.7500000000000000 0.7500000000000000 70 | 0.2500000000000000 0.7500000000000000 0.7500000000000000 71 | 0.5000000000000000 0.7500000000000000 0.7500000000000000 72 | 0.7500000000000000 0.7500000000000000 0.7500000000000000 73 | 0.1250000000000000 0.1250000000000000 0.1250000000000000 74 | 0.3750000000000000 0.1250000000000000 0.1250000000000000 75 | 0.6250000000000000 0.1250000000000000 0.1250000000000000 76 | 0.8750000000000000 0.1250000000000000 0.1250000000000000 77 | 0.1250000000000000 0.3750000000000000 0.1250000000000000 78 | 0.3750000000000000 0.3750000000000000 0.1250000000000000 79 | 0.6250000000000000 0.3750000000000000 0.1250000000000000 80 | 0.8750000000000000 0.3750000000000000 0.1250000000000000 81 | 0.1250000000000000 0.6250000000000000 0.1250000000000000 82 | 0.3750000000000000 0.6250000000000000 0.1250000000000000 83 | 0.6250000000000000 0.6250000000000000 0.1250000000000000 84 | 0.8750000000000000 0.6250000000000000 0.1250000000000000 85 | 0.1250000000000000 0.8750000000000000 0.1250000000000000 86 | 0.3750000000000000 0.8750000000000000 0.1250000000000000 87 | 0.6250000000000000 0.8750000000000000 0.1250000000000000 88 | 0.8750000000000000 0.8750000000000000 0.1250000000000000 89 | 0.1250000000000000 0.1250000000000000 0.3750000000000000 90 | 0.3750000000000000 0.1250000000000000 0.3750000000000000 91 | 0.6250000000000000 0.1250000000000000 0.3750000000000000 92 | 0.8750000000000000 0.1250000000000000 0.3750000000000000 93 | 0.1250000000000000 0.3750000000000000 0.3750000000000000 94 | 0.3750000000000000 0.3750000000000000 0.3750000000000000 95 | 0.6250000000000000 0.3750000000000000 0.3750000000000000 96 | 0.8750000000000000 0.3750000000000000 0.3750000000000000 97 | 0.1250000000000000 0.6250000000000000 0.3750000000000000 98 | 0.3750000000000000 0.6250000000000000 0.3750000000000000 99 | 0.6250000000000000 0.6250000000000000 0.3750000000000000 100 | 0.8750000000000000 0.6250000000000000 0.3750000000000000 101 | 0.1250000000000000 0.8750000000000000 0.3750000000000000 102 | 0.3750000000000000 0.8750000000000000 0.3750000000000000 103 | 0.6250000000000000 0.8750000000000000 0.3750000000000000 104 | 0.8750000000000000 0.8750000000000000 0.3750000000000000 105 | 0.1250000000000000 0.1250000000000000 0.6250000000000000 106 | 0.3750000000000000 0.1250000000000000 0.6250000000000000 107 | 0.6250000000000000 0.1250000000000000 0.6250000000000000 108 | 0.8750000000000000 0.1250000000000000 0.6250000000000000 109 | 0.1250000000000000 0.3750000000000000 0.6250000000000000 110 | 0.3750000000000000 0.3750000000000000 0.6250000000000000 111 | 0.6250000000000000 0.3750000000000000 0.6250000000000000 112 | 0.8750000000000000 0.3750000000000000 0.6250000000000000 113 | 0.1250000000000000 0.6250000000000000 0.6250000000000000 114 | 0.3750000000000000 0.6250000000000000 0.6250000000000000 115 | 0.6250000000000000 0.6250000000000000 0.6250000000000000 116 | 0.8750000000000000 0.6250000000000000 0.6250000000000000 117 | 0.1250000000000000 0.8750000000000000 0.6250000000000000 118 | 0.3750000000000000 0.8750000000000000 0.6250000000000000 119 | 0.6250000000000000 0.8750000000000000 0.6250000000000000 120 | 0.8750000000000000 0.8750000000000000 0.6250000000000000 121 | 0.1250000000000000 0.1250000000000000 0.8750000000000000 122 | 0.3750000000000000 0.1250000000000000 0.8750000000000000 123 | 0.6250000000000000 0.1250000000000000 0.8750000000000000 124 | 0.8750000000000000 0.1250000000000000 0.8750000000000000 125 | 0.1250000000000000 0.3750000000000000 0.8750000000000000 126 | 0.3750000000000000 0.3750000000000000 0.8750000000000000 127 | 0.6250000000000000 0.3750000000000000 0.8750000000000000 128 | 0.8750000000000000 0.3750000000000000 0.8750000000000000 129 | 0.1250000000000000 0.6250000000000000 0.8750000000000000 130 | 0.3750000000000000 0.6250000000000000 0.8750000000000000 131 | 0.6250000000000000 0.6250000000000000 0.8750000000000000 132 | 0.8750000000000000 0.6250000000000000 0.8750000000000000 133 | 0.1250000000000000 0.8750000000000000 0.8750000000000000 134 | 0.3750000000000000 0.8750000000000000 0.8750000000000000 135 | 0.6250000000000000 0.8750000000000000 0.8750000000000000 136 | 0.8750000000000000 0.8750000000000000 0.8750000000000000 137 | 0.0625000000000000 0.0625000000000000 0.0625000000000000 138 | 0.3125000000000000 0.0625000000000000 0.0625000000000000 139 | 0.5625000000000000 0.0625000000000000 0.0625000000000000 140 | 0.8125000000000000 0.0625000000000000 0.0625000000000000 141 | 0.0625000000000000 0.3125000000000000 0.0625000000000000 142 | 0.3125000000000000 0.3125000000000000 0.0625000000000000 143 | 0.5625000000000000 0.3125000000000000 0.0625000000000000 144 | 0.8125000000000000 0.3125000000000000 0.0625000000000000 145 | 0.0625000000000000 0.5625000000000000 0.0625000000000000 146 | 0.3125000000000000 0.5625000000000000 0.0625000000000000 147 | 0.5625000000000000 0.5625000000000000 0.0625000000000000 148 | 0.8125000000000000 0.5625000000000000 0.0625000000000000 149 | 0.0625000000000000 0.8125000000000000 0.0625000000000000 150 | 0.3125000000000000 0.8125000000000000 0.0625000000000000 151 | 0.5625000000000000 0.8125000000000000 0.0625000000000000 152 | 0.8125000000000000 0.8125000000000000 0.0625000000000000 153 | 0.0625000000000000 0.0625000000000000 0.3125000000000000 154 | 0.3125000000000000 0.0625000000000000 0.3125000000000000 155 | 0.5625000000000000 0.0625000000000000 0.3125000000000000 156 | 0.8125000000000000 0.0625000000000000 0.3125000000000000 157 | 0.0625000000000000 0.3125000000000000 0.3125000000000000 158 | 0.3125000000000000 0.3125000000000000 0.3125000000000000 159 | 0.5625000000000000 0.3125000000000000 0.3125000000000000 160 | 0.8125000000000000 0.3125000000000000 0.3125000000000000 161 | 0.0625000000000000 0.5625000000000000 0.3125000000000000 162 | 0.3125000000000000 0.5625000000000000 0.3125000000000000 163 | 0.5625000000000000 0.5625000000000000 0.3125000000000000 164 | 0.8125000000000000 0.5625000000000000 0.3125000000000000 165 | 0.0625000000000000 0.8125000000000000 0.3125000000000000 166 | 0.3125000000000000 0.8125000000000000 0.3125000000000000 167 | 0.5625000000000000 0.8125000000000000 0.3125000000000000 168 | 0.8125000000000000 0.8125000000000000 0.3125000000000000 169 | 0.0625000000000000 0.0625000000000000 0.5625000000000000 170 | 0.3125000000000000 0.0625000000000000 0.5625000000000000 171 | 0.5625000000000000 0.0625000000000000 0.5625000000000000 172 | 0.8125000000000000 0.0625000000000000 0.5625000000000000 173 | 0.0625000000000000 0.3125000000000000 0.5625000000000000 174 | 0.3125000000000000 0.3125000000000000 0.5625000000000000 175 | 0.5625000000000000 0.3125000000000000 0.5625000000000000 176 | 0.8125000000000000 0.3125000000000000 0.5625000000000000 177 | 0.0625000000000000 0.5625000000000000 0.5625000000000000 178 | 0.3125000000000000 0.5625000000000000 0.5625000000000000 179 | 0.5625000000000000 0.5625000000000000 0.5625000000000000 180 | 0.8125000000000000 0.5625000000000000 0.5625000000000000 181 | 0.0625000000000000 0.8125000000000000 0.5625000000000000 182 | 0.3125000000000000 0.8125000000000000 0.5625000000000000 183 | 0.5625000000000000 0.8125000000000000 0.5625000000000000 184 | 0.8125000000000000 0.8125000000000000 0.5625000000000000 185 | 0.0625000000000000 0.0625000000000000 0.8125000000000000 186 | 0.3125000000000000 0.0625000000000000 0.8125000000000000 187 | 0.5625000000000000 0.0625000000000000 0.8125000000000000 188 | 0.8125000000000000 0.0625000000000000 0.8125000000000000 189 | 0.0625000000000000 0.3125000000000000 0.8125000000000000 190 | 0.3125000000000000 0.3125000000000000 0.8125000000000000 191 | 0.5625000000000000 0.3125000000000000 0.8125000000000000 192 | 0.8125000000000000 0.3125000000000000 0.8125000000000000 193 | 0.0625000000000000 0.5625000000000000 0.8125000000000000 194 | 0.3125000000000000 0.5625000000000000 0.8125000000000000 195 | 0.5625000000000000 0.5625000000000000 0.8125000000000000 196 | 0.8125000000000000 0.5625000000000000 0.8125000000000000 197 | 0.0625000000000000 0.8125000000000000 0.8125000000000000 198 | 0.3125000000000000 0.8125000000000000 0.8125000000000000 199 | 0.5625000000000000 0.8125000000000000 0.8125000000000000 200 | 0.8125000000000000 0.8125000000000000 0.8125000000000000 201 | -------------------------------------------------------------------------------- /tests/MgB2/POSCAR: -------------------------------------------------------------------------------- 1 | Mg1 B2 2 | 1.0 3 | 1.5368400079881850 -2.6618849769400956 0.0000000000000000 4 | 1.5368400079881850 2.6618849769400956 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 3.5343499999999999 6 | Mg B 7 | 1 2 8 | direct 9 | 0.0000000000000000 0.0000000000000000 0.0000000000000000 Mg2+ 10 | 0.3333333333333333 0.6666666666666666 0.5000000000000000 B- 11 | 0.6666666666666667 0.3333333333333334 0.5000000000000000 B- 12 | -------------------------------------------------------------------------------- /tests/MgB2/SPOSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 4.6105200239645550 -7.9856549308202869 0.0000000000000000 4 | 4.6105200239645550 7.9856549308202869 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 10.6030499999999996 6 | Mg B 7 | 27 54 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.0000000000000000 10 | 0.3333333333333333 0.0000000000000000 0.0000000000000000 11 | 0.6666666666666666 0.0000000000000000 0.0000000000000000 12 | 0.0000000000000000 0.3333333333333333 0.0000000000000000 13 | 0.3333333333333333 0.3333333333333333 0.0000000000000000 14 | 0.6666666666666666 0.3333333333333333 0.0000000000000000 15 | 0.0000000000000000 0.6666666666666666 0.0000000000000000 16 | 0.3333333333333333 0.6666666666666666 0.0000000000000000 17 | 0.6666666666666666 0.6666666666666666 0.0000000000000000 18 | 0.0000000000000000 0.0000000000000000 0.3333333333333333 19 | 0.3333333333333333 0.0000000000000000 0.3333333333333333 20 | 0.6666666666666666 0.0000000000000000 0.3333333333333333 21 | 0.0000000000000000 0.3333333333333333 0.3333333333333333 22 | 0.3333333333333333 0.3333333333333333 0.3333333333333333 23 | 0.6666666666666666 0.3333333333333333 0.3333333333333333 24 | 0.0000000000000000 0.6666666666666666 0.3333333333333333 25 | 0.3333333333333333 0.6666666666666666 0.3333333333333333 26 | 0.6666666666666666 0.6666666666666666 0.3333333333333333 27 | 0.0000000000000000 0.0000000000000000 0.6666666666666666 28 | 0.3333333333333333 0.0000000000000000 0.6666666666666666 29 | 0.6666666666666666 0.0000000000000000 0.6666666666666666 30 | 0.0000000000000000 0.3333333333333333 0.6666666666666666 31 | 0.3333333333333333 0.3333333333333333 0.6666666666666666 32 | 0.6666666666666666 0.3333333333333333 0.6666666666666666 33 | 0.0000000000000000 0.6666666666666666 0.6666666666666666 34 | 0.3333333333333333 0.6666666666666666 0.6666666666666666 35 | 0.6666666666666666 0.6666666666666666 0.6666666666666666 36 | 0.1111111111111111 0.2222222222222222 0.1666666666666667 37 | 0.4444444444444444 0.2222222222222222 0.1666666666666667 38 | 0.7777777777777778 0.2222222222222222 0.1666666666666667 39 | 0.1111111111111111 0.5555555555555555 0.1666666666666667 40 | 0.4444444444444444 0.5555555555555555 0.1666666666666667 41 | 0.7777777777777778 0.5555555555555555 0.1666666666666667 42 | 0.1111111111111111 0.8888888888888888 0.1666666666666667 43 | 0.4444444444444444 0.8888888888888888 0.1666666666666667 44 | 0.7777777777777778 0.8888888888888888 0.1666666666666667 45 | 0.1111111111111111 0.2222222222222222 0.5000000000000000 46 | 0.4444444444444444 0.2222222222222222 0.5000000000000000 47 | 0.7777777777777778 0.2222222222222222 0.5000000000000000 48 | 0.1111111111111111 0.5555555555555555 0.5000000000000000 49 | 0.4444444444444444 0.5555555555555555 0.5000000000000000 50 | 0.7777777777777778 0.5555555555555555 0.5000000000000000 51 | 0.1111111111111111 0.8888888888888888 0.5000000000000000 52 | 0.4444444444444444 0.8888888888888888 0.5000000000000000 53 | 0.7777777777777778 0.8888888888888888 0.5000000000000000 54 | 0.1111111111111111 0.2222222222222222 0.8333333333333333 55 | 0.4444444444444444 0.2222222222222222 0.8333333333333333 56 | 0.7777777777777778 0.2222222222222222 0.8333333333333333 57 | 0.1111111111111111 0.5555555555555555 0.8333333333333333 58 | 0.4444444444444444 0.5555555555555555 0.8333333333333333 59 | 0.7777777777777778 0.5555555555555555 0.8333333333333333 60 | 0.1111111111111111 0.8888888888888888 0.8333333333333333 61 | 0.4444444444444444 0.8888888888888888 0.8333333333333333 62 | 0.7777777777777778 0.8888888888888888 0.8333333333333333 63 | 0.2222222222222222 0.1111111111111111 0.1666666666666667 64 | 0.5555555555555556 0.1111111111111111 0.1666666666666667 65 | 0.8888888888888890 0.1111111111111111 0.1666666666666667 66 | 0.2222222222222222 0.4444444444444445 0.1666666666666667 67 | 0.5555555555555556 0.4444444444444445 0.1666666666666667 68 | 0.8888888888888890 0.4444444444444445 0.1666666666666667 69 | 0.2222222222222222 0.7777777777777778 0.1666666666666667 70 | 0.5555555555555556 0.7777777777777778 0.1666666666666667 71 | 0.8888888888888890 0.7777777777777778 0.1666666666666667 72 | 0.2222222222222222 0.1111111111111111 0.5000000000000000 73 | 0.5555555555555556 0.1111111111111111 0.5000000000000000 74 | 0.8888888888888890 0.1111111111111111 0.5000000000000000 75 | 0.2222222222222222 0.4444444444444445 0.5000000000000000 76 | 0.5555555555555556 0.4444444444444445 0.5000000000000000 77 | 0.8888888888888890 0.4444444444444445 0.5000000000000000 78 | 0.2222222222222222 0.7777777777777778 0.5000000000000000 79 | 0.5555555555555556 0.7777777777777778 0.5000000000000000 80 | 0.8888888888888890 0.7777777777777778 0.5000000000000000 81 | 0.2222222222222222 0.1111111111111111 0.8333333333333333 82 | 0.5555555555555556 0.1111111111111111 0.8333333333333333 83 | 0.8888888888888890 0.1111111111111111 0.8333333333333333 84 | 0.2222222222222222 0.4444444444444445 0.8333333333333333 85 | 0.5555555555555556 0.4444444444444445 0.8333333333333333 86 | 0.8888888888888890 0.4444444444444445 0.8333333333333333 87 | 0.2222222222222222 0.7777777777777778 0.8333333333333333 88 | 0.5555555555555556 0.7777777777777778 0.8333333333333333 89 | 0.8888888888888890 0.7777777777777778 0.8333333333333333 90 | -------------------------------------------------------------------------------- /tests/SrTiO3/BORN: -------------------------------------------------------------------------------- 1 | # epsilon and Z* of atoms 1 2 3 2 | 6.64926200 0.00000000 0.00000000 0.00000000 6.64926200 0.00000000 0.00000000 0.00000000 6.11385800 3 | 2.52014000 0.00000000 0.00000000 0.00000000 2.52014000 0.00000000 0.00000000 0.00000000 2.55590000 4 | 7.57259000 0.0000000 0.00000000 0.00000000 7.5725900 0.0000000 0.00000000 0.00000000 6.72493000 5 | -6.0885400 0.00000000 0.00000000 0.00000000 -2.0270600 0.00000000 0.00000000 0.00000000 -1.9174100 6 | -1.9771300 0.00000000 0.00000000 0.00000000 -1.9771300 0.00000000 0.00000000 0.00000000 -5.4465300 7 | -------------------------------------------------------------------------------- /tests/SrTiO3/FORCE_CONSTANTS: -------------------------------------------------------------------------------- 1 | 5 40 2 | 1 1 3 | 4.704595199557503 -0.000000000000000 -0.000000000000000 4 | 0.000000000000000 4.704595199557503 -0.000000000000002 5 | -0.000000000000000 -0.000000000000000 4.485885335299562 6 | 1 2 7 | -1.890730948258053 -0.000000000000000 0.000000000000000 8 | -0.000000000000000 0.547714801002520 -0.000000000000000 9 | 0.000000000000000 -0.000000000000000 0.570971952577310 10 | 1 3 11 | 0.547714801002520 -0.000000000000000 -0.000000000000000 12 | 0.000000000000000 -1.890730948258053 -0.000000000000000 13 | -0.000000000000000 0.000000000000000 0.570971952577310 14 | 1 4 15 | -0.486079374004213 -0.000000000000000 0.000000000000000 16 | -0.000000000000000 -0.486079374004213 -0.000000000000000 17 | 0.000000000000000 0.000000000000000 0.258518497194545 18 | 1 5 19 | 0.521468517589092 -0.000000000000000 -0.000000000000000 20 | 0.000000000000000 0.521468517589092 0.000000000000001 21 | -0.000000000000000 0.000000000000000 -1.768284494449445 22 | 1 6 23 | -0.476245653478604 -0.000000000000000 0.000000000000000 24 | -0.000000000000000 0.224721916436587 0.000000000000000 25 | 0.000000000000000 0.000000000000000 -0.508247112730179 26 | 1 7 27 | 0.224721916436587 -0.000000000000000 -0.000000000000000 28 | 0.000000000000000 -0.476245653478604 0.000000000000000 29 | -0.000000000000000 0.000000000000000 -0.508247112730179 30 | 1 8 31 | -0.211646850063797 -0.000000000000000 0.000000000000000 32 | -0.000000000000000 -0.211646850063797 0.000000000000000 33 | 0.000000000000000 -0.000000000000000 -0.240806037871811 34 | 1 9 35 | -0.309593042603971 -1.159123009408847 -0.970640279683619 36 | -1.159123009408846 -0.309593042603971 -0.970640279683619 37 | -1.117400234436002 -1.117400234436002 -0.377423946932123 38 | 1 10 39 | -0.309593042603971 1.159123009408847 0.970640279683619 40 | 1.159123009408846 -0.309593042603971 -0.970640279683619 41 | 1.117400234436002 -1.117400234436002 -0.377423946932123 42 | 1 11 43 | -0.309593042603971 1.159123009408847 -0.970640279683619 44 | 1.159123009408847 -0.309593042603972 0.970640279683619 45 | -1.117400234436002 1.117400234436002 -0.377423946932123 46 | 1 12 47 | -0.309593042603971 -1.159123009408847 0.970640279683619 48 | -1.159123009408847 -0.309593042603972 0.970640279683619 49 | 1.117400234436002 1.117400234436002 -0.377423946932123 50 | 1 13 51 | -0.352607290262666 -1.060605254565362 1.261904512200948 52 | -1.060605254565362 -0.352607290262666 1.261904512200949 53 | 1.116879806321487 1.116879806321487 -0.358620080521345 54 | 1 14 55 | -0.352607290262666 1.060605254565362 -1.261904512200948 56 | 1.060605254565362 -0.352607290262666 1.261904512200949 57 | -1.116879806321487 1.116879806321487 -0.358620080521344 58 | 1 15 59 | -0.352607290262666 1.060605254565362 1.261904512200948 60 | 1.060605254565362 -0.352607290262665 -1.261904512200948 61 | 1.116879806321487 -1.116879806321488 -0.358620080521344 62 | 1 16 63 | -0.352607290262666 -1.060605254565362 -1.261904512200948 64 | -1.060605254565362 -0.352607290262665 -1.261904512200948 65 | -1.116879806321487 -1.116879806321487 -0.358620080521344 66 | 1 17 67 | -0.887697864690520 0.000000000000000 -0.000000000000000 68 | -0.000000000000000 0.017580615445362 0.382197480235645 69 | 0.000000000000000 0.362570068477175 -0.019870349116948 70 | 1 18 71 | 0.572455436180187 -0.000000000000000 -0.000000000000000 72 | 0.000000000000000 -0.017022229344683 0.106227257836854 73 | -0.000000000000000 0.142448459181037 -0.089311783308099 74 | 1 19 75 | -0.887697864690520 -0.000000000000000 -0.000000000000000 76 | -0.000000000000000 0.017580615445362 -0.382197480235645 77 | 0.000000000000000 -0.362570068477175 -0.019870349116948 78 | 1 20 79 | 0.572455436180187 0.000000000000000 -0.000000000000000 80 | 0.000000000000000 -0.017022229344683 -0.106227257836854 81 | -0.000000000000000 -0.142448459181037 -0.089311783308099 82 | 1 21 83 | -0.937294515847271 0.000000000000000 -0.000000000000000 84 | -0.000000000000000 0.227386358276690 -0.543639437140165 85 | 0.000000000000000 -0.536028320235383 0.308593335620740 86 | 1 22 87 | 0.710190199529597 -0.000000000000000 0.000000000000000 88 | 0.000000000000000 -0.016587414657866 -0.159150365987511 89 | -0.000000000000000 -0.125313648736842 0.056104608078109 90 | 1 23 91 | -0.937294515847271 -0.000000000000000 -0.000000000000000 92 | -0.000000000000000 0.227386358276690 0.543639437140165 93 | 0.000000000000000 0.536028320235383 0.308593335620740 94 | 1 24 95 | 0.710190199529597 0.000000000000000 0.000000000000000 96 | 0.000000000000000 -0.016587414657866 0.159150365987511 97 | -0.000000000000000 0.125313648736842 0.056104608078109 98 | 1 25 99 | 0.017580615445362 -0.000000000000000 0.382197480235645 100 | -0.000000000000000 -0.887697864690520 0.000000000000000 101 | 0.362570068477175 0.000000000000000 -0.019870349116948 102 | 1 26 103 | 0.017580615445362 -0.000000000000000 -0.382197480235645 104 | 0.000000000000000 -0.887697864690520 0.000000000000000 105 | -0.362570068477175 0.000000000000000 -0.019870349116948 106 | 1 27 107 | -0.017022229344683 -0.000000000000000 0.106227257836854 108 | -0.000000000000000 0.572455436180187 0.000000000000000 109 | 0.142448459181037 0.000000000000000 -0.089311783308099 110 | 1 28 111 | -0.017022229344683 -0.000000000000000 -0.106227257836854 112 | 0.000000000000000 0.572455436180187 0.000000000000000 113 | -0.142448459181037 0.000000000000000 -0.089311783308099 114 | 1 29 115 | 0.227386358276690 -0.000000000000000 -0.543639437140165 116 | 0.000000000000000 -0.937294515847271 -0.000000000000000 117 | -0.536028320235383 0.000000000000000 0.308593335620740 118 | 1 30 119 | 0.227386358276690 -0.000000000000000 0.543639437140165 120 | -0.000000000000000 -0.937294515847271 -0.000000000000000 121 | 0.536028320235383 0.000000000000000 0.308593335620740 122 | 1 31 123 | -0.016587414657866 -0.000000000000000 -0.159150365987511 124 | 0.000000000000000 0.710190199529597 -0.000000000000000 125 | -0.125313648736842 0.000000000000000 0.056104608078109 126 | 1 32 127 | -0.016587414657866 -0.000000000000000 0.159150365987511 128 | -0.000000000000000 0.710190199529597 -0.000000000000000 129 | 0.125313648736842 0.000000000000000 0.056104608078109 130 | 1 33 131 | 0.110880594047042 0.437291100684541 -0.255870459455850 132 | 0.437291100684541 0.110880594047042 -0.255870459455849 133 | -0.051800062013907 -0.051800062013907 -0.866490168094702 134 | 1 34 135 | 0.110880594047042 -0.437291100684541 0.255870459455850 136 | -0.437291100684541 0.110880594047042 -0.255870459455849 137 | 0.051800062013907 -0.051800062013907 -0.866490168094702 138 | 1 35 139 | 0.110880594047042 -0.437291100684541 -0.255870459455850 140 | -0.437291100684541 0.110880594047042 0.255870459455850 141 | -0.051800062013907 0.051800062013907 -0.866490168094702 142 | 1 36 143 | 0.110880594047042 0.437291100684541 0.255870459455850 144 | 0.437291100684541 0.110880594047042 0.255870459455850 145 | 0.051800062013907 0.051800062013907 -0.866490168094702 146 | 1 37 147 | -0.016634777764620 0.129976472794948 0.026756594180183 148 | 0.129976472794948 -0.016634777764620 0.026756594180183 149 | 0.015901404588986 0.015901404588986 0.631827814831405 150 | 1 38 151 | -0.016634777764620 -0.129976472794948 -0.026756594180183 152 | -0.129976472794948 -0.016634777764620 0.026756594180183 153 | -0.015901404588986 0.015901404588986 0.631827814831405 154 | 1 39 155 | -0.016634777764620 -0.129976472794948 0.026756594180183 156 | -0.129976472794948 -0.016634777764620 -0.026756594180184 157 | 0.015901404588986 -0.015901404588986 0.631827814831405 158 | 1 40 159 | -0.016634777764620 0.129976472794948 -0.026756594180183 160 | 0.129976472794948 -0.016634777764620 -0.026756594180184 161 | -0.015901404588986 -0.015901404588986 0.631827814831405 162 | 9 1 163 | -0.309496179708956 -1.159248361390632 -1.117690974406605 164 | -1.159248361390632 -0.309496179708956 -1.117690974406605 165 | -0.970996521584653 -0.970996521584653 -0.378027046763985 166 | 9 2 167 | -0.309496179708956 1.159248361390632 1.117690974406605 168 | 1.159248361390632 -0.309496179708956 -1.117690974406605 169 | 0.970996521584653 -0.970996521584653 -0.378027046763985 170 | 9 3 171 | -0.309496179708956 1.159248361390632 -1.117690974406605 172 | 1.159248361390631 -0.309496179708955 1.117690974406605 173 | -0.970996521584653 0.970996521584653 -0.378027046763986 174 | 9 4 175 | -0.309496179708956 -1.159248361390632 1.117690974406605 176 | -1.159248361390631 -0.309496179708955 1.117690974406605 177 | 0.970996521584653 0.970996521584653 -0.378027046763985 178 | 9 5 179 | -0.352523247456696 -1.060633387538547 1.117154667348172 180 | -1.060633387538547 -0.352523247456696 1.117154667348172 181 | 1.262018167983111 1.262018167983111 -0.359402565693185 182 | 9 6 183 | -0.352523247456696 1.060633387538547 -1.117154667348172 184 | 1.060633387538547 -0.352523247456696 1.117154667348171 185 | -1.262018167983111 1.262018167983111 -0.359402565693185 186 | 9 7 187 | -0.352523247456696 1.060633387538547 1.117154667348172 188 | 1.060633387538547 -0.352523247456697 -1.117154667348172 189 | 1.262018167983111 -1.262018167983111 -0.359402565693185 190 | 9 8 191 | -0.352523247456696 -1.060633387538547 -1.117154667348172 192 | -1.060633387538547 -0.352523247456697 -1.117154667348172 193 | -1.262018167983111 -1.262018167983111 -0.359402565693185 194 | 9 9 195 | 18.346968318321832 -0.000000000000000 -0.000000000000000 196 | 0.000000000000000 18.346968318321832 0.000000000000007 197 | 0.000000000000000 -0.000000000000000 20.130025369232996 198 | 9 10 199 | -15.176481952206746 -0.000000000000000 -0.000000000000000 200 | -0.000000000000000 0.222972686508949 0.000000000000000 201 | -0.000000000000000 -0.000000000000000 0.222714447106462 202 | 9 11 203 | 0.222972686508949 -0.000000000000000 -0.000000000000000 204 | 0.000000000000000 -15.176481952206743 -0.000000000000000 205 | 0.000000000000000 -0.000000000000000 0.222714447106461 206 | 9 12 207 | -0.278109040588000 -0.000000000000000 0.000000000000000 208 | -0.000000000000000 -0.278109040588000 0.000000000000000 209 | -0.000000000000000 -0.000000000000000 0.317486776331104 210 | 9 13 211 | 0.213051362041525 -0.000000000000000 -0.000000000000000 212 | 0.000000000000000 0.213051362041525 -0.000000000000005 213 | 0.000000000000000 -0.000000000000000 -12.797206926578582 214 | 9 14 215 | -0.244702737442267 -0.000000000000000 0.000000000000000 216 | -0.000000000000000 0.286254782722525 0.000000000000000 217 | -0.000000000000000 0.000000000000000 -0.216342230489482 218 | 9 15 219 | 0.286254782722525 -0.000000000000000 0.000000000000000 220 | 0.000000000000000 -0.244702737442267 -0.000000000000000 221 | 0.000000000000000 -0.000000000000000 -0.216342230489483 222 | 9 16 223 | -0.294795810935974 -0.000000000000000 -0.000000000000000 224 | -0.000000000000000 -0.294795810935974 -0.000000000000000 225 | -0.000000000000000 -0.000000000000000 -0.292009845482679 226 | 9 17 227 | -0.308840574599676 -0.000000000000000 -0.299339464162100 228 | -0.000000000000000 -1.545434669887570 -0.000000000000001 229 | -0.483131936466583 0.000000000000000 -1.749221028314765 230 | 9 18 231 | -0.308840574599676 -0.000000000000000 0.299339464162100 232 | 0.000000000000000 -1.545434669887570 -0.000000000000001 233 | 0.483131936466583 0.000000000000000 -1.749221028314766 234 | 9 19 235 | 0.065466853055199 -0.000000000000000 -0.027233786383570 236 | 0.000000000000000 1.647852936823362 -0.000000000000000 237 | 0.064190288187125 -0.000000000000000 -0.142227825744294 238 | 9 20 239 | 0.065466853055199 -0.000000000000000 0.027233786383570 240 | -0.000000000000000 1.647852936823362 -0.000000000000000 241 | -0.064190288187125 -0.000000000000000 -0.142227825744294 242 | 9 21 243 | 0.046726375664740 -0.000000000000000 -0.022590421353751 244 | 0.000000000000000 -0.146174655304828 0.000000000000000 245 | 0.063191382150126 -0.000000000000000 1.430448540031277 246 | 9 22 247 | 0.046726375664740 -0.000000000000000 0.022590421353751 248 | -0.000000000000000 -0.146174655304828 0.000000000000000 249 | -0.063191382150126 -0.000000000000000 1.430448540031277 250 | 9 23 251 | -0.000928744228681 -0.000000000000000 -0.016849514256144 252 | 0.000000000000000 0.140323709109574 0.000000000000000 253 | 0.008107094014572 -0.000000000000000 0.149194014954701 254 | 9 24 255 | -0.000928744228681 -0.000000000000000 0.016849514256144 256 | -0.000000000000000 0.140323709109574 0.000000000000000 257 | -0.008107094014572 -0.000000000000000 0.149194014954701 258 | 9 25 259 | -1.545434669887570 -0.000000000000000 0.000000000000000 260 | -0.000000000000000 -0.308840574599676 -0.299339464162100 261 | -0.000000000000000 -0.483131936466583 -1.749221028314765 262 | 9 26 263 | 1.647852936823362 -0.000000000000000 -0.000000000000000 264 | 0.000000000000000 0.065466853055199 -0.027233786383570 265 | 0.000000000000000 0.064190288187125 -0.142227825744294 266 | 9 27 267 | -1.545434669887570 0.000000000000000 0.000000000000000 268 | -0.000000000000000 -0.308840574599676 0.299339464162099 269 | -0.000000000000000 0.483131936466583 -1.749221028314766 270 | 9 28 271 | 1.647852936823362 0.000000000000000 -0.000000000000000 272 | 0.000000000000000 0.065466853055199 0.027233786383570 273 | 0.000000000000000 -0.064190288187125 -0.142227825744294 274 | 9 29 275 | -0.146174655304828 -0.000000000000000 0.000000000000000 276 | -0.000000000000000 0.046726375664740 -0.022590421353751 277 | -0.000000000000000 0.063191382150126 1.430448540031277 278 | 9 30 279 | 0.140323709109574 0.000000000000000 0.000000000000000 280 | 0.000000000000000 -0.000928744228681 -0.016849514256144 281 | 0.000000000000000 0.008107094014572 0.149194014954701 282 | 9 31 283 | -0.146174655304828 0.000000000000000 0.000000000000000 284 | -0.000000000000000 0.046726375664740 0.022590421353752 285 | -0.000000000000000 -0.063191382150126 1.430448540031277 286 | 9 32 287 | 0.140323709109574 -0.000000000000000 0.000000000000000 288 | 0.000000000000000 -0.000928744228681 0.016849514256144 289 | 0.000000000000000 -0.008107094014572 0.149194014954701 290 | 9 33 291 | -1.431415646819300 -0.000000000000000 -0.000000000000000 292 | -0.000000000000000 -1.431415646819300 0.000000000000001 293 | 0.000000000000000 0.000000000000000 3.679814677252316 294 | 9 34 295 | 1.452562383701016 -0.000000000000000 -0.000000000000000 296 | 0.000000000000000 -0.166735941453433 0.000000000000000 297 | 0.000000000000000 -0.000000000000000 0.142577644709632 298 | 9 35 299 | -0.166735941453433 -0.000000000000000 0.000000000000000 300 | -0.000000000000000 1.452562383701015 0.000000000000000 301 | -0.000000000000000 0.000000000000000 0.142577644709632 302 | 9 36 303 | 0.160788132363163 -0.000000000000000 -0.000000000000000 304 | 0.000000000000000 0.160788132363163 0.000000000000000 305 | -0.000000000000000 -0.000000000000000 0.097355337701269 306 | 9 37 307 | -1.897663055296203 -0.000000000000000 -0.000000000000000 308 | -0.000000000000000 -1.897663055296203 -0.000000000000003 309 | 0.000000000000000 0.000000000000000 -6.898633604096065 310 | 9 38 311 | 1.668929163215323 -0.000000000000000 -0.000000000000000 312 | 0.000000000000000 -0.142966071907431 -0.000000000000000 313 | 0.000000000000000 0.000000000000000 -0.106295116699064 314 | 9 39 315 | -0.142966071907431 -0.000000000000000 -0.000000000000000 316 | -0.000000000000000 1.668929163215323 -0.000000000000000 317 | 0.000000000000000 -0.000000000000000 -0.106295116699064 318 | 9 40 319 | 0.131442948536400 -0.000000000000000 0.000000000000000 320 | -0.000000000000000 0.131442948536400 -0.000000000000000 321 | 0.000000000000000 -0.000000000000000 -0.125196223303921 322 | 17 1 323 | -0.889219663037781 0.000000000000000 -0.000000000000000 324 | 0.000000000000000 0.018217871568098 0.362757112956722 325 | -0.000000000000000 0.382257602423163 -0.020436986506397 326 | 17 2 327 | 0.575404968649627 0.000000000000000 -0.000000000000000 328 | -0.000000000000000 -0.016507036339874 0.142610647313863 329 | 0.000000000000000 0.106124096485875 -0.089655011301058 330 | 17 3 331 | -0.889219663037781 -0.000000000000000 -0.000000000000000 332 | 0.000000000000000 0.018217871568098 -0.362757112956722 333 | -0.000000000000000 -0.382257602423162 -0.020436986506397 334 | 17 4 335 | 0.575404968649627 -0.000000000000000 -0.000000000000000 336 | -0.000000000000000 -0.016507036339874 -0.142610647313863 337 | -0.000000000000000 -0.106124096485875 -0.089655011301059 338 | 17 5 339 | -0.933692241753971 -0.000000000000000 -0.000000000000000 340 | 0.000000000000000 0.227939642085568 -0.536117543395988 341 | -0.000000000000000 -0.543469088200565 0.308179102244635 342 | 17 6 343 | 0.708042560453283 -0.000000000000000 -0.000000000000000 344 | -0.000000000000000 -0.016100647707330 -0.125400915426283 345 | 0.000000000000000 -0.158921074680522 0.055704170407129 346 | 17 7 347 | -0.933692241753971 0.000000000000000 -0.000000000000000 348 | 0.000000000000000 0.227939642085568 0.536117543395988 349 | -0.000000000000000 0.543469088200565 0.308179102244635 350 | 17 8 351 | 0.708042560453283 0.000000000000000 -0.000000000000000 352 | -0.000000000000000 -0.016100647707330 0.125400915426282 353 | 0.000000000000000 0.158921074680522 0.055704170407129 354 | 17 9 355 | -0.306138996458065 -0.000000000000000 -0.483581152552462 356 | -0.000000000000000 -1.544654475328761 0.000000000000000 357 | -0.299764629417182 -0.000000000000000 -1.747741079068277 358 | 17 10 359 | -0.306138996458065 -0.000000000000000 0.483581152552462 360 | 0.000000000000000 -1.544654475328761 0.000000000000000 361 | 0.299764629417181 -0.000000000000000 -1.747741079068277 362 | 17 11 363 | 0.066269628968768 0.000000000000000 0.064703683906108 364 | -0.000000000000000 1.648522884708661 0.000000000000000 365 | -0.027205708888396 0.000000000000000 -0.140686142588242 366 | 17 12 367 | 0.066269628968768 0.000000000000000 -0.064703683906108 368 | -0.000000000000000 1.648522884708661 0.000000000000000 369 | 0.027205708888396 0.000000000000000 -0.140686142588242 370 | 17 13 371 | 0.047408671320478 -0.000000000000000 0.063869586466509 372 | -0.000000000000000 -0.145524549532433 0.000000000000000 373 | -0.022720963864242 -0.000000000000000 1.432399509612628 374 | 17 14 375 | 0.047408671320478 -0.000000000000000 -0.063869586466508 376 | -0.000000000000000 -0.145524549532433 0.000000000000000 377 | 0.022720963864242 -0.000000000000000 1.432399509612628 378 | 17 15 379 | -0.000252796354933 0.000000000000000 0.007103969168673 380 | -0.000000000000000 0.140714892204663 0.000000000000000 381 | -0.016851678199502 0.000000000000000 0.150511319928361 382 | 17 16 383 | -0.000252796354933 0.000000000000000 -0.007103969168673 384 | 0.000000000000000 0.140714892204663 0.000000000000000 385 | 0.016851678199502 0.000000000000000 0.150511319928362 386 | 17 17 387 | 19.159898692769733 0.000000000000000 0.000000000000000 388 | -0.000000000000001 5.146053132706726 0.000000000000000 389 | 0.000000000000000 0.000000000000001 5.021221066938294 390 | 17 18 391 | -7.105706110237379 -0.000000000000000 0.000000000000000 392 | 0.000000000000000 -0.208044873526224 0.000000000000000 393 | -0.000000000000000 -0.000000000000000 -0.122159547659653 394 | 17 19 395 | 1.194693818135539 -0.000000000000000 0.000000000000000 396 | -0.000000000000000 -0.427527803125584 0.000000000000000 397 | 0.000000000000000 -0.000000000000000 0.188516274246956 398 | 17 20 399 | -1.462984283566755 -0.000000000000000 0.000000000000000 400 | 0.000000000000000 -0.543008310819537 0.000000000000000 401 | -0.000000000000000 -0.000000000000000 0.024840237502760 402 | 17 21 403 | 1.037821714495248 0.000000000000000 0.000000000000000 404 | -0.000000000000000 0.167084902337363 0.000000000000000 405 | 0.000000000000000 0.000000000000000 -0.387763167374391 406 | 17 22 407 | -1.253651497457738 0.000000000000000 0.000000000000000 408 | 0.000000000000000 0.023939510238279 0.000000000000000 409 | 0.000000000000000 0.000000000000000 -0.471698584672284 410 | 17 23 411 | 0.325319756724042 -0.000000000000000 0.000000000000000 412 | -0.000000000000000 -0.291157875465441 0.000000000000000 413 | 0.000000000000000 -0.000000000000000 -0.305893409223048 414 | 17 24 415 | -0.317655806645216 -0.000000000000000 0.000000000000000 416 | 0.000000000000000 -0.042976250549897 0.000000000000000 417 | -0.000000000000000 -0.000000000000000 -0.051332659190012 418 | 17 25 419 | -1.315564196477923 2.586644936599599 0.105465464493124 420 | 1.367904354694815 -1.315809378484817 0.022752759708019 421 | 0.022683433719865 0.105756515528941 0.405758978832494 422 | 17 26 423 | -1.315564196477924 -2.586644936599600 -0.105465464493124 424 | -1.367904354694814 -1.315809378484816 0.022752759708020 425 | -0.022683433719865 0.105756515528941 0.405758978832494 426 | 17 27 427 | -1.315564196477923 -2.586644936599599 0.105465464493124 428 | -1.367904354694814 -1.315809378484816 -0.022752759708019 429 | 0.022683433719864 -0.105756515528941 0.405758978832494 430 | 17 28 431 | -1.315564196477923 2.586644936599599 -0.105465464493124 432 | 1.367904354694815 -1.315809378484817 -0.022752759708019 433 | -0.022683433719864 -0.105756515528941 0.405758978832494 434 | 17 29 435 | 0.003433853413313 0.222118146679660 -0.046429248609712 436 | 0.060159876101340 0.003256112774776 0.002173352483464 437 | 0.002174603794229 -0.046592494726121 -0.176145909744122 438 | 17 30 439 | 0.003433853413313 -0.222118146679660 0.046429248609712 440 | -0.060159876101340 0.003256112774776 0.002173352483464 441 | -0.002174603794229 -0.046592494726121 -0.176145909744122 442 | 17 31 443 | 0.003433853413313 -0.222118146679660 -0.046429248609712 444 | -0.060159876101340 0.003256112774776 -0.002173352483464 445 | 0.002174603794229 0.046592494726121 -0.176145909744122 446 | 17 32 447 | 0.003433853413313 0.222118146679660 0.046429248609712 448 | 0.060159876101340 0.003256112774776 -0.002173352483464 449 | -0.002174603794229 0.046592494726121 -0.176145909744122 450 | 17 33 451 | -1.153719053356200 0.000000000000000 2.106970597250145 452 | 0.000000000000000 0.365909017939748 -0.000000000000000 453 | 1.277449767581173 0.000000000000000 -1.255509430719988 454 | 17 34 455 | -1.153719053356200 0.000000000000000 -2.106970597250146 456 | -0.000000000000000 0.365909017939748 0.000000000000000 457 | -1.277449767581174 0.000000000000000 -1.255509430719988 458 | 17 35 459 | 0.007022604421044 -0.000000000000000 0.212013471724758 460 | 0.000000000000000 -0.176982684578373 -0.000000000000000 461 | 0.087133414514811 -0.000000000000000 0.012792417783607 462 | 17 36 463 | 0.007022604421044 -0.000000000000000 -0.212013471724759 464 | -0.000000000000000 -0.176982684578373 -0.000000000000000 465 | -0.087133414514811 -0.000000000000000 0.012792417783607 466 | 17 37 467 | -1.287122866125497 0.000000000000000 -2.516086036603405 468 | 0.000000000000000 0.380009050087725 -0.000000000000000 469 | -1.354303353863974 0.000000000000000 -1.096587927123530 470 | 17 38 471 | -1.287122866125497 0.000000000000000 2.516086036603405 472 | 0.000000000000000 0.380009050087725 -0.000000000000000 473 | 1.354303353863973 0.000000000000000 -1.096587927123530 474 | 17 39 475 | 0.001390162399333 -0.000000000000000 -0.278003327791251 476 | -0.000000000000000 -0.168618214479851 -0.000000000000000 477 | -0.049326619358531 -0.000000000000000 -0.016059899382116 478 | 17 40 479 | 0.001390162399333 -0.000000000000000 0.278003327791251 480 | 0.000000000000000 -0.168618214479851 -0.000000000000000 481 | 0.049326619358531 -0.000000000000000 -0.016059899382116 482 | 25 1 483 | 0.018217871568098 -0.000000000000000 0.362757112956722 484 | -0.000000000000000 -0.889219663037781 0.000000000000000 485 | 0.382257602423163 0.000000000000000 -0.020436986506397 486 | 25 2 487 | 0.018217871568098 -0.000000000000000 -0.362757112956722 488 | 0.000000000000000 -0.889219663037781 0.000000000000000 489 | -0.382257602423162 0.000000000000000 -0.020436986506397 490 | 25 3 491 | -0.016507036339874 0.000000000000000 0.142610647313863 492 | -0.000000000000000 0.575404968649627 0.000000000000000 493 | 0.106124096485875 -0.000000000000000 -0.089655011301058 494 | 25 4 495 | -0.016507036339874 0.000000000000000 -0.142610647313863 496 | 0.000000000000000 0.575404968649627 0.000000000000000 497 | -0.106124096485875 0.000000000000000 -0.089655011301059 498 | 25 5 499 | 0.227939642085568 -0.000000000000000 -0.536117543395988 500 | 0.000000000000000 -0.933692241753971 0.000000000000000 501 | -0.543469088200565 0.000000000000000 0.308179102244635 502 | 25 6 503 | 0.227939642085568 -0.000000000000000 0.536117543395988 504 | -0.000000000000000 -0.933692241753971 0.000000000000000 505 | 0.543469088200565 0.000000000000000 0.308179102244635 506 | 25 7 507 | -0.016100647707330 0.000000000000000 -0.125400915426283 508 | 0.000000000000000 0.708042560453283 0.000000000000000 509 | -0.158921074680522 -0.000000000000000 0.055704170407129 510 | 25 8 511 | -0.016100647707330 0.000000000000000 0.125400915426282 512 | -0.000000000000000 0.708042560453283 0.000000000000000 513 | 0.158921074680522 -0.000000000000000 0.055704170407129 514 | 25 9 515 | -1.544654475328761 -0.000000000000000 0.000000000000000 516 | 0.000000000000000 -0.306138996458065 -0.483581152552462 517 | -0.000000000000000 -0.299764629417181 -1.747741079068277 518 | 25 10 519 | 1.648522884708661 0.000000000000000 0.000000000000000 520 | -0.000000000000000 0.066269628968768 0.064703683906108 521 | 0.000000000000000 -0.027205708888396 -0.140686142588242 522 | 25 11 523 | -1.544654475328761 0.000000000000000 0.000000000000000 524 | 0.000000000000000 -0.306138996458065 0.483581152552462 525 | -0.000000000000000 0.299764629417182 -1.747741079068277 526 | 25 12 527 | 1.648522884708661 0.000000000000000 0.000000000000000 528 | -0.000000000000000 0.066269628968768 -0.064703683906108 529 | 0.000000000000000 0.027205708888396 -0.140686142588242 530 | 25 13 531 | -0.145524549532433 0.000000000000000 0.000000000000000 532 | 0.000000000000000 0.047408671320478 0.063869586466508 533 | -0.000000000000000 -0.022720963864242 1.432399509612628 534 | 25 14 535 | 0.140714892204663 -0.000000000000000 0.000000000000000 536 | -0.000000000000000 -0.000252796354933 0.007103969168673 537 | 0.000000000000000 -0.016851678199502 0.150511319928362 538 | 25 15 539 | -0.145524549532433 0.000000000000000 0.000000000000000 540 | 0.000000000000000 0.047408671320478 -0.063869586466509 541 | -0.000000000000000 0.022720963864242 1.432399509612628 542 | 25 16 543 | 0.140714892204663 0.000000000000000 0.000000000000000 544 | -0.000000000000000 -0.000252796354933 -0.007103969168673 545 | 0.000000000000000 0.016851678199502 0.150511319928361 546 | 25 17 547 | -1.315809378484816 1.367904354694814 0.022752759708020 548 | 2.586644936599600 -1.315564196477924 0.105465464493124 549 | 0.105756515528941 0.022683433719865 0.405758978832494 550 | 25 18 551 | -1.315809378484817 -1.367904354694815 -0.022752759708019 552 | -2.586644936599599 -1.315564196477923 0.105465464493124 553 | -0.105756515528941 0.022683433719864 0.405758978832494 554 | 25 19 555 | -1.315809378484817 -1.367904354694815 0.022752759708019 556 | -2.586644936599599 -1.315564196477923 -0.105465464493124 557 | 0.105756515528941 -0.022683433719865 0.405758978832494 558 | 25 20 559 | -1.315809378484816 1.367904354694814 -0.022752759708019 560 | 2.586644936599599 -1.315564196477923 -0.105465464493124 561 | -0.105756515528941 -0.022683433719864 0.405758978832494 562 | 25 21 563 | 0.003256112774776 0.060159876101340 0.002173352483464 564 | 0.222118146679660 0.003433853413313 -0.046429248609712 565 | -0.046592494726121 0.002174603794229 -0.176145909744122 566 | 25 22 567 | 0.003256112774776 -0.060159876101340 -0.002173352483464 568 | -0.222118146679660 0.003433853413313 -0.046429248609712 569 | 0.046592494726121 0.002174603794229 -0.176145909744122 570 | 25 23 571 | 0.003256112774776 -0.060159876101340 0.002173352483464 572 | -0.222118146679660 0.003433853413313 0.046429248609712 573 | -0.046592494726121 -0.002174603794229 -0.176145909744122 574 | 25 24 575 | 0.003256112774776 0.060159876101340 -0.002173352483464 576 | 0.222118146679660 0.003433853413313 0.046429248609712 577 | 0.046592494726121 -0.002174603794229 -0.176145909744122 578 | 25 25 579 | 5.146053132706726 0.000000000000001 0.000000000000000 580 | -0.000000000000000 19.159898692769733 -0.000000000000000 581 | 0.000000000000001 -0.000000000000000 5.021221066938294 582 | 25 26 583 | -0.427527803125584 0.000000000000000 0.000000000000000 584 | 0.000000000000000 1.194693818135539 -0.000000000000000 585 | -0.000000000000000 -0.000000000000000 0.188516274246956 586 | 25 27 587 | -0.208044873526224 -0.000000000000000 0.000000000000000 588 | 0.000000000000000 -7.105706110237379 -0.000000000000000 589 | -0.000000000000000 0.000000000000000 -0.122159547659653 590 | 25 28 591 | -0.543008310819537 -0.000000000000000 0.000000000000000 592 | 0.000000000000000 -1.462984283566755 -0.000000000000000 593 | -0.000000000000000 0.000000000000000 0.024840237502760 594 | 25 29 595 | 0.167084902337363 0.000000000000000 0.000000000000000 596 | -0.000000000000000 1.037821714495248 -0.000000000000000 597 | 0.000000000000000 -0.000000000000000 -0.387763167374391 598 | 25 30 599 | -0.291157875465441 0.000000000000000 0.000000000000000 600 | 0.000000000000000 0.325319756724042 -0.000000000000000 601 | -0.000000000000000 -0.000000000000000 -0.305893409223048 602 | 25 31 603 | 0.023939510238279 -0.000000000000000 0.000000000000000 604 | -0.000000000000000 -1.253651497457738 -0.000000000000000 605 | 0.000000000000000 -0.000000000000000 -0.471698584672284 606 | 25 32 607 | -0.042976250549897 -0.000000000000000 0.000000000000000 608 | 0.000000000000000 -0.317655806645216 -0.000000000000000 609 | -0.000000000000000 0.000000000000000 -0.051332659190012 610 | 25 33 611 | 0.365909017939748 0.000000000000000 0.000000000000000 612 | -0.000000000000000 -1.153719053356200 2.106970597250146 613 | 0.000000000000000 1.277449767581174 -1.255509430719988 614 | 25 34 615 | -0.176982684578373 0.000000000000000 -0.000000000000000 616 | 0.000000000000000 0.007022604421044 0.212013471724759 617 | -0.000000000000000 0.087133414514811 0.012792417783607 618 | 25 35 619 | 0.365909017939748 -0.000000000000000 -0.000000000000000 620 | -0.000000000000000 -1.153719053356200 -2.106970597250145 621 | 0.000000000000000 -1.277449767581173 -1.255509430719988 622 | 25 36 623 | -0.176982684578373 -0.000000000000000 -0.000000000000000 624 | 0.000000000000000 0.007022604421044 -0.212013471724758 625 | -0.000000000000000 -0.087133414514811 0.012792417783607 626 | 25 37 627 | 0.380009050087725 -0.000000000000000 -0.000000000000000 628 | -0.000000000000000 -1.287122866125497 -2.516086036603405 629 | 0.000000000000000 -1.354303353863973 -1.096587927123530 630 | 25 38 631 | -0.168618214479851 -0.000000000000000 -0.000000000000000 632 | 0.000000000000000 0.001390162399333 -0.278003327791251 633 | -0.000000000000000 -0.049326619358531 -0.016059899382116 634 | 25 39 635 | 0.380009050087725 -0.000000000000000 -0.000000000000000 636 | -0.000000000000000 -1.287122866125497 2.516086036603405 637 | 0.000000000000000 1.354303353863974 -1.096587927123530 638 | 25 40 639 | -0.168618214479851 0.000000000000000 -0.000000000000000 640 | 0.000000000000000 0.001390162399333 0.278003327791251 641 | -0.000000000000000 0.049326619358531 -0.016059899382116 642 | 33 1 643 | 0.111330721617997 0.437245518145710 -0.051759328956129 644 | 0.437245518145710 0.111330721617997 -0.051759328956130 645 | -0.258742641107609 -0.258742641107609 -0.865768765210838 646 | 33 2 647 | 0.111330721617997 -0.437245518145710 0.051759328956129 648 | -0.437245518145710 0.111330721617997 -0.051759328956130 649 | 0.258742641107609 -0.258742641107609 -0.865768765210838 650 | 33 3 651 | 0.111330721617997 -0.437245518145710 -0.051759328956129 652 | -0.437245518145710 0.111330721617997 0.051759328956129 653 | -0.258742641107609 0.258742641107609 -0.865768765210838 654 | 33 4 655 | 0.111330721617997 0.437245518145710 0.051759328956129 656 | 0.437245518145710 0.111330721617997 0.051759328956129 657 | 0.258742641107609 0.258742641107609 -0.865768765210838 658 | 33 5 659 | -0.016197114169126 0.129973267772687 0.015921482254633 660 | 0.129973267772687 -0.016197114169126 0.015921482254633 661 | 0.029083945267742 0.029083945267742 0.632450573330662 662 | 33 6 663 | -0.016197114169126 -0.129973267772687 -0.015921482254633 664 | -0.129973267772687 -0.016197114169126 0.015921482254633 665 | -0.029083945267742 0.029083945267742 0.632450573330662 666 | 33 7 667 | -0.016197114169126 -0.129973267772687 0.015921482254633 668 | -0.129973267772687 -0.016197114169126 -0.015921482254632 669 | 0.029083945267742 -0.029083945267742 0.632450573330663 670 | 33 8 671 | -0.016197114169126 0.129973267772687 -0.015921482254633 672 | 0.129973267772687 -0.016197114169126 -0.015921482254632 673 | -0.029083945267742 -0.029083945267742 0.632450573330662 674 | 33 9 675 | -1.430772505685483 -0.000000000000000 0.000000000000000 676 | -0.000000000000000 -1.430772505685482 0.000000000000001 677 | -0.000000000000000 -0.000000000000000 3.675099405458615 678 | 33 10 679 | 1.453426315257296 -0.000000000000000 0.000000000000000 680 | 0.000000000000000 -0.166079268003400 0.000000000000000 681 | 0.000000000000000 0.000000000000000 0.138544458465005 682 | 33 11 683 | -0.166079268003400 -0.000000000000000 0.000000000000000 684 | -0.000000000000000 1.453426315257295 0.000000000000000 685 | -0.000000000000000 0.000000000000000 0.138544458465005 686 | 33 12 687 | 0.161324439421596 -0.000000000000000 -0.000000000000000 688 | 0.000000000000000 0.161324439421596 -0.000000000000000 689 | 0.000000000000000 -0.000000000000000 0.092477881901561 690 | 33 13 691 | -1.896935871356416 -0.000000000000000 0.000000000000000 692 | -0.000000000000000 -1.896935871356416 -0.000000000000002 693 | -0.000000000000000 0.000000000000000 -6.901766353164483 694 | 33 14 695 | 1.669662757199633 -0.000000000000000 -0.000000000000000 696 | 0.000000000000000 -0.142365664403767 -0.000000000000000 697 | 0.000000000000000 0.000000000000000 -0.111589617085648 698 | 33 15 699 | -0.142365664403767 -0.000000000000000 -0.000000000000000 700 | -0.000000000000000 1.669662757199634 -0.000000000000000 701 | -0.000000000000000 -0.000000000000000 -0.111589617085648 702 | 33 16 703 | 0.131980680049172 -0.000000000000000 0.000000000000000 704 | 0.000000000000000 0.131980680049172 -0.000000000000000 705 | 0.000000000000000 0.000000000000000 -0.129856731667022 706 | 33 17 707 | -1.154092192798965 -0.000000000000000 1.277574934378426 708 | 0.000000000000001 0.365857564519088 -0.000000000000000 709 | 2.107729651212934 -0.000000000000000 -1.255193450968419 710 | 33 18 711 | -1.154092192798965 -0.000000000000000 -1.277574934378426 712 | -0.000000000000001 0.365857564519088 -0.000000000000000 713 | -2.107729651212934 -0.000000000000000 -1.255193450968419 714 | 33 19 715 | 0.006798920557504 -0.000000000000000 0.087135296338378 716 | 0.000000000000000 -0.177050415318274 -0.000000000000000 717 | 0.212156689572546 0.000000000000000 0.012860981047798 718 | 33 20 719 | 0.006798920557504 -0.000000000000000 -0.087135296338378 720 | -0.000000000000000 -0.177050415318274 0.000000000000000 721 | -0.212156689572546 0.000000000000000 0.012860981047798 722 | 33 21 723 | -1.287437500104388 -0.000000000000000 -1.354253667531701 724 | -0.000000000000001 0.379947554608036 -0.000000000000000 725 | -2.517996210409162 0.000000000000000 -1.096583636426862 726 | 33 22 727 | -1.287437500104388 -0.000000000000000 1.354253667531701 728 | 0.000000000000001 0.379947554608036 -0.000000000000000 729 | 2.517996210409162 0.000000000000000 -1.096583636426862 730 | 33 23 731 | 0.001148110196805 -0.000000000000000 -0.049315321424904 732 | -0.000000000000000 -0.168683882761287 -0.000000000000000 733 | -0.279444446541068 0.000000000000000 -0.016179083265938 734 | 33 24 735 | 0.001148110196805 -0.000000000000000 0.049315321424904 736 | 0.000000000000000 -0.168683882761287 -0.000000000000000 737 | 0.279444446541068 0.000000000000000 -0.016179083265938 738 | 33 25 739 | 0.365857564519088 -0.000000000000000 -0.000000000000000 740 | 0.000000000000000 -1.154092192798965 1.277574934378426 741 | 0.000000000000000 2.107729651212934 -1.255193450968419 742 | 33 26 743 | -0.177050415318274 0.000000000000000 0.000000000000000 744 | -0.000000000000000 0.006798920557504 0.087135296338378 745 | 0.000000000000000 0.212156689572546 0.012860981047798 746 | 33 27 747 | 0.365857564519088 0.000000000000000 -0.000000000000000 748 | 0.000000000000000 -1.154092192798966 -1.277574934378426 749 | 0.000000000000000 -2.107729651212934 -1.255193450968419 750 | 33 28 751 | -0.177050415318274 -0.000000000000000 0.000000000000000 752 | -0.000000000000000 0.006798920557504 -0.087135296338378 753 | 0.000000000000000 -0.212156689572546 0.012860981047798 754 | 33 29 755 | 0.379947554608036 0.000000000000000 -0.000000000000000 756 | 0.000000000000000 -1.287437500104389 -1.354253667531701 757 | 0.000000000000000 -2.517996210409162 -1.096583636426862 758 | 33 30 759 | -0.168683882761287 -0.000000000000000 -0.000000000000000 760 | -0.000000000000000 0.001148110196804 -0.049315321424904 761 | -0.000000000000000 -0.279444446541068 -0.016179083265938 762 | 33 31 763 | 0.379947554608036 -0.000000000000000 -0.000000000000000 764 | 0.000000000000000 -1.287437500104388 1.354253667531701 765 | 0.000000000000000 2.517996210409162 -1.096583636426862 766 | 33 32 767 | -0.168683882761287 0.000000000000000 -0.000000000000000 768 | -0.000000000000000 0.001148110196805 0.049315321424904 769 | -0.000000000000000 0.279444446541068 -0.016179083265938 770 | 33 33 771 | 5.090536858021810 -0.000000000000000 -0.000000000000000 772 | 0.000000000000000 5.090536858021810 0.000000000000008 773 | 0.000000000000000 0.000000000000000 19.965181124270035 774 | 33 34 775 | -0.398378569293463 -0.000000000000000 -0.000000000000000 776 | -0.000000000000000 0.186733143684005 0.000000000000000 777 | 0.000000000000000 0.000000000000000 1.059328706475515 778 | 33 35 779 | 0.186733143684005 -0.000000000000000 0.000000000000000 780 | 0.000000000000000 -0.398378569293463 0.000000000000000 781 | 0.000000000000000 0.000000000000000 1.059328706475515 782 | 33 36 783 | -0.321860443366851 -0.000000000000000 -0.000000000000000 784 | -0.000000000000000 -0.321860443366851 0.000000000000000 785 | -0.000000000000000 0.000000000000000 0.366124425751685 786 | 33 37 787 | -0.144203922727559 -0.000000000000000 -0.000000000000000 788 | -0.000000000000000 -0.144203922727559 -0.000000000000002 789 | 0.000000000000000 0.000000000000000 -6.126838534746956 790 | 33 38 791 | -0.486067978369505 -0.000000000000000 -0.000000000000000 792 | -0.000000000000000 0.023979264333757 -0.000000000000000 793 | -0.000000000000000 -0.000000000000000 -1.216802004308310 794 | 33 39 795 | 0.023979264333757 -0.000000000000000 -0.000000000000000 796 | 0.000000000000000 -0.486067978369505 -0.000000000000000 797 | -0.000000000000000 0.000000000000000 -1.216802004308310 798 | 33 40 799 | -0.044492119034854 -0.000000000000000 0.000000000000000 800 | -0.000000000000000 -0.044492119034854 -0.000000000000000 801 | -0.000000000000000 0.000000000000000 -0.325731481017439 -------------------------------------------------------------------------------- /tests/SrTiO3/POSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.00000000000000 3 | 3.9289565000000000 0.0000000000000000 0.0000000000000000 4 | 0.0000000000000000 3.9289565000000000 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 3.9856550942854989 6 | Sr Ti O 7 | 1 1 3 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.0240173774801846 10 | 0.5000000000000000 0.5000000000000000 0.5259051370582881 11 | 0.0000000000000000 0.5000000000000000 0.4994707522946911 12 | 0.5000000000000000 0.0000000000000000 0.4994707522946911 13 | 0.5000000000000000 0.5000000000000000 0.0011359808721565 14 | 15 | 0.00000000E+00 0.00000000E+00 0.00000000E+00 16 | 0.00000000E+00 0.00000000E+00 0.00000000E+00 17 | 0.00000000E+00 0.00000000E+00 0.00000000E+00 18 | 0.00000000E+00 0.00000000E+00 0.00000000E+00 19 | 0.00000000E+00 0.00000000E+00 0.00000000E+00 20 | -------------------------------------------------------------------------------- /tests/SrTiO3/SPOSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 7.8579129999999999 0.0000000000000000 0.0000000000000000 4 | 0.0000000000000000 7.8579129999999999 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 7.9713101885709978 6 | Sr Ti O 7 | 8 8 24 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.0120086887400923 10 | 0.5000000000000000 0.0000000000000000 0.0120086887400923 11 | 0.0000000000000000 0.5000000000000000 0.0120086887400923 12 | 0.5000000000000000 0.5000000000000000 0.0120086887400923 13 | 0.0000000000000000 0.0000000000000000 0.5120086887400923 14 | 0.5000000000000000 0.0000000000000000 0.5120086887400923 15 | 0.0000000000000000 0.5000000000000000 0.5120086887400923 16 | 0.5000000000000000 0.5000000000000000 0.5120086887400923 17 | 0.2500000000000000 0.2500000000000000 0.2629525685291441 18 | 0.7500000000000000 0.2500000000000000 0.2629525685291441 19 | 0.2500000000000000 0.7500000000000000 0.2629525685291441 20 | 0.7500000000000000 0.7500000000000000 0.2629525685291441 21 | 0.2500000000000000 0.2500000000000000 0.7629525685291441 22 | 0.7500000000000000 0.2500000000000000 0.7629525685291441 23 | 0.2500000000000000 0.7500000000000000 0.7629525685291441 24 | 0.7500000000000000 0.7500000000000000 0.7629525685291441 25 | 0.0000000000000000 0.2500000000000000 0.2497353761473456 26 | 0.5000000000000000 0.2500000000000000 0.2497353761473456 27 | 0.0000000000000000 0.7500000000000000 0.2497353761473456 28 | 0.5000000000000000 0.7500000000000000 0.2497353761473456 29 | 0.0000000000000000 0.2500000000000000 0.7497353761473455 30 | 0.5000000000000000 0.2500000000000000 0.7497353761473455 31 | 0.0000000000000000 0.7500000000000000 0.7497353761473455 32 | 0.5000000000000000 0.7500000000000000 0.7497353761473455 33 | 0.2500000000000000 0.0000000000000000 0.2497353761473456 34 | 0.7500000000000000 0.0000000000000000 0.2497353761473456 35 | 0.2500000000000000 0.5000000000000000 0.2497353761473456 36 | 0.7500000000000000 0.5000000000000000 0.2497353761473456 37 | 0.2500000000000000 0.0000000000000000 0.7497353761473455 38 | 0.7500000000000000 0.0000000000000000 0.7497353761473455 39 | 0.2500000000000000 0.5000000000000000 0.7497353761473455 40 | 0.7500000000000000 0.5000000000000000 0.7497353761473455 41 | 0.2500000000000000 0.2500000000000000 0.0005679904360782 42 | 0.7500000000000000 0.2500000000000000 0.0005679904360782 43 | 0.2500000000000000 0.7500000000000000 0.0005679904360782 44 | 0.7500000000000000 0.7500000000000000 0.0005679904360782 45 | 0.2500000000000000 0.2500000000000000 0.5005679904360782 46 | 0.7500000000000000 0.2500000000000000 0.5005679904360782 47 | 0.2500000000000000 0.7500000000000000 0.5005679904360782 48 | 0.7500000000000000 0.7500000000000000 0.5005679904360782 49 | -------------------------------------------------------------------------------- /tests/graphene/POSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 2.4600000000000000 0.0000000000000000 0.0000000000000000 4 | 1.2300000000000000 2.1304224933097191 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 10.0000000000000018 6 | C 7 | 2 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.5000000000000000 10 | 0.3333333333333333 0.3333333333333333 0.5000000000000000 11 | -------------------------------------------------------------------------------- /tests/graphene/SPOSCAR: -------------------------------------------------------------------------------- 1 | generated by phonopy 2 | 1.0 3 | 12.3000000000000007 0.0000000000000000 0.0000000000000000 4 | 6.1500000000000004 10.6521124665485960 0.0000000000000000 5 | 0.0000000000000000 0.0000000000000000 10.0000000000000000 6 | C 7 | 50 8 | Direct 9 | 0.0000000000000000 0.0000000000000000 0.5000000000000000 10 | 0.2000000000000000 0.0000000000000000 0.5000000000000000 11 | 0.4000000000000000 0.0000000000000000 0.5000000000000000 12 | 0.6000000000000001 0.0000000000000000 0.5000000000000000 13 | 0.8000000000000000 0.0000000000000000 0.5000000000000000 14 | 0.0000000000000000 0.2000000000000000 0.5000000000000000 15 | 0.2000000000000000 0.2000000000000000 0.5000000000000000 16 | 0.4000000000000000 0.2000000000000000 0.5000000000000000 17 | 0.6000000000000001 0.2000000000000000 0.5000000000000000 18 | 0.8000000000000000 0.2000000000000000 0.5000000000000000 19 | 0.0000000000000000 0.4000000000000000 0.5000000000000000 20 | 0.2000000000000000 0.4000000000000000 0.5000000000000000 21 | 0.4000000000000000 0.4000000000000000 0.5000000000000000 22 | 0.6000000000000001 0.4000000000000000 0.5000000000000000 23 | 0.8000000000000000 0.4000000000000000 0.5000000000000000 24 | 0.0000000000000000 0.6000000000000001 0.5000000000000000 25 | 0.2000000000000000 0.6000000000000001 0.5000000000000000 26 | 0.4000000000000000 0.6000000000000001 0.5000000000000000 27 | 0.6000000000000001 0.6000000000000001 0.5000000000000000 28 | 0.8000000000000000 0.6000000000000001 0.5000000000000000 29 | 0.0000000000000000 0.8000000000000000 0.5000000000000000 30 | 0.2000000000000000 0.8000000000000000 0.5000000000000000 31 | 0.4000000000000000 0.8000000000000000 0.5000000000000000 32 | 0.6000000000000001 0.8000000000000000 0.5000000000000000 33 | 0.8000000000000000 0.8000000000000000 0.5000000000000000 34 | 0.0666666666000000 0.0666666666000000 0.5000000000000000 35 | 0.2666666666000000 0.0666666666000000 0.5000000000000000 36 | 0.4666666666000001 0.0666666666000000 0.5000000000000000 37 | 0.6666666666000001 0.0666666666000000 0.5000000000000000 38 | 0.8666666666000000 0.0666666666000000 0.5000000000000000 39 | 0.0666666666000000 0.2666666666000000 0.5000000000000000 40 | 0.2666666666000000 0.2666666666000000 0.5000000000000000 41 | 0.4666666666000001 0.2666666666000000 0.5000000000000000 42 | 0.6666666666000001 0.2666666666000000 0.5000000000000000 43 | 0.8666666666000000 0.2666666666000000 0.5000000000000000 44 | 0.0666666666000000 0.4666666666000001 0.5000000000000000 45 | 0.2666666666000000 0.4666666666000001 0.5000000000000000 46 | 0.4666666666000001 0.4666666666000001 0.5000000000000000 47 | 0.6666666666000001 0.4666666666000001 0.5000000000000000 48 | 0.8666666666000000 0.4666666666000001 0.5000000000000000 49 | 0.0666666666000000 0.6666666666000001 0.5000000000000000 50 | 0.2666666666000000 0.6666666666000001 0.5000000000000000 51 | 0.4666666666000001 0.6666666666000001 0.5000000000000000 52 | 0.6666666666000001 0.6666666666000001 0.5000000000000000 53 | 0.8666666666000000 0.6666666666000001 0.5000000000000000 54 | 0.0666666666000000 0.8666666666000000 0.5000000000000000 55 | 0.2666666666000000 0.8666666666000000 0.5000000000000000 56 | 0.4666666666000001 0.8666666666000000 0.5000000000000000 57 | 0.6666666666000001 0.8666666666000000 0.5000000000000000 58 | 0.8666666666000000 0.8666666666000000 0.5000000000000000 59 | -------------------------------------------------------------------------------- /topophonon/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | topophonon package is a python package that allows users to calculate topological 4 | properties (berry phase, berry curvature, wannier charge center evolution...), by 5 | building phonon tight bindinbg model. 6 | 7 | @author: zhuhe 8 | """ 9 | 10 | import topophonon.structure 11 | import topophonon.model 12 | import topophonon.topology 13 | 14 | __all__ = ['structure', 'model', 'topology', 'masses'] 15 | -------------------------------------------------------------------------------- /topophonon/runExamples.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Wed Sep 7 15:08:31 2022 4 | 5 | @author: zhuhe 6 | """ 7 | 8 | from topophonon.structure import Structure 9 | from topophonon.model import read_from_files, Model 10 | from topophonon.topology import Topology 11 | 12 | 13 | ######### LiCaAs ############# 14 | print("LiCaAs!!") 15 | # read files from one line of code 16 | model = read_from_files(r"..\tests\LiCaAs") 17 | # specify the k path 18 | k_path = [[0.5, 0.5, 0.5], [0.5, 0.25, 0.75], [0.5, 0.0, 0.5], [0.0, 0.0, 0.0]] 19 | # plot the band structure of the tight binding model 20 | model.atom_projected_band(k_path, node_names=["L", "W", "X", "$\Gamma$"], k_num=80) 21 | 22 | # build a Topology object 23 | tp = Topology(model) 24 | # wannier center evolution of the third band around [0.5,0.222,0.722] 25 | tp.wcc_evol_sphere( 26 | [2], 27 | [0.5, 0.222, 0.722], 28 | r=0.003, 29 | dirc=2, 30 | num=30, 31 | ) 32 | # berry curvature distribution 33 | tp.berry_curvature_proj([2], 2, 0.722, center=[0.5, 0.222], xy_range=0.005, num=5) 34 | 35 | 36 | ######### BeAu ############## 37 | print("BeAu!!") 38 | model = read_from_files(r"..\tests\BeAu") 39 | 40 | k_path = [ 41 | [0.0, 0.0, 0.0], 42 | [0.0, 0.5, 0.0], 43 | [0.5, 0.5, 0.0], 44 | [0.0, 0.0, 0.0], 45 | [0.5, 0.5, 0.5], 46 | ] 47 | # plot atom-projected band 48 | model.atom_projected_band( 49 | k_path, 50 | node_names=["$\Gamma$", "X", "M", "$\Gamma$", "R"], 51 | k_num=80, 52 | site_comb=[[0, 1, 2, 3], [4, 5, 6, 7]], 53 | unit="cm-1", 54 | ) 55 | 56 | tp = Topology(model) 57 | ## wannier center evolution 58 | # at Gamma point 59 | tp.wcc_evol_sphere( 60 | [4], 61 | [0, 0, 0], 62 | r=0.0001, 63 | dirc=2, 64 | num=30, 65 | ) 66 | tp.wcc_evol_sphere( 67 | [9], 68 | [0, 0, 0], 69 | r=0.0001, 70 | dirc=2, 71 | num=30, 72 | ) 73 | # at R point, 4-fold degenerate points 74 | tp.wcc_evol_sphere( 75 | [0, 1], 76 | [0.5, 0.5, 0.5], 77 | r=0.0001, 78 | dirc=2, 79 | num=30, 80 | ) 81 | tp.wcc_evol_sphere( 82 | [8, 9], 83 | [0.5, 0.5, 0.5], 84 | r=0.0001, 85 | dirc=2, 86 | num=30, 87 | ) 88 | 89 | # berry curvature distribution at Gamma 90 | tp.berry_curvature_proj([9], 2, 0, xy_range=0.04, num=5) 91 | tp.berry_curvature_proj([10], 2, 0, xy_range=0.01, num=5) 92 | # berry curvature distribution at R 93 | tp.berry_curvature_proj( 94 | [0, 1], 95 | 2, 96 | 0.5, 97 | [0.5, 0.5], 98 | xy_range=0.01, 99 | num=5, 100 | ) 101 | tp.berry_curvature_proj( 102 | [8, 9], 103 | 2, 104 | 0.5, 105 | [0.5, 0.5], 106 | xy_range=0.01, 107 | num=5, 108 | ) 109 | 110 | ## 2d slab model 111 | # build a 2d slab on z plane with 17 layers along z direction 112 | model_2d = model.cut_piece(17, 2, bottom_shift=0) 113 | # plot the surface band structure 114 | q_path_2d = [ 115 | [-0.5, 0.0], 116 | [0.0, -0.5], 117 | [0.5, 0.0], 118 | [0.0, 0.0], 119 | [0.5, 0.5], 120 | [0.5, 0.0], 121 | [0.0, 0.5], 122 | [-0.5, 0.0], 123 | ] 124 | model_2d.atom_projected_band( 125 | q_path_2d, 126 | node_names=["X", "Y", "X", "$\Gamma$", "M", "X", "Y", "X"], 127 | k_num=70, 128 | y_min=100, 129 | y_max=126, 130 | margin_highlight=[0.45, 0], 131 | unit="cm-1", 132 | ) 133 | # plot the gaussian smeared surface band structure 134 | model_2d.plot_edge( 135 | q_path_2d, [1, 0], y_min=100, y_max=126, k_num=150, fin_dirc=None, unit="cm-1" 136 | ) 137 | 138 | 139 | ######### graphene ############## 140 | print("Graphene!!") 141 | model = read_from_files(r"..\tests\graphene") 142 | # make the model 2d! 143 | model_2d = model.cut_piece(1, 2) 144 | node_names = [r"$\Gamma$", "M", "K", r"$\Gamma$", "K'"] 145 | k_path_2d = [[0.0, 0.0], [0.5, 0.5], [2 / 3, 1 / 3], [0.0, 0.0], [1 / 3, 2 / 3]] 146 | model_2d.atom_projected_band( 147 | k_path_2d, site_comb=[[0], [1]], node_names=node_names, k_num=80 148 | ) 149 | 150 | 151 | # plot 3d surface band structures and highlight the degenerate points 152 | model_2d.plot_3d_band([0, 1], [2 / 3, 1 / 3], 0.005, view=[-160, 50]) 153 | model_2d.plot_3d_band([4, 5], [0.261, 0.522], 0.005, tol=5.0, view=[-160, 50]) 154 | 155 | ## plot edge modes 156 | model_1d = model_2d.cut_piece(30, 1, bottom_shift=0) 157 | k_path_1d = [[0.0], [0.5], [1.0]] 158 | model_1d.plot_edge(k_path_1d, [0, 1], y_min=6, y_max=30, k_num=100, fin_dirc=1, sigma=3) 159 | model_1d.atom_projected_band( 160 | k_path_1d, y_min=0, y_max=50, fin_dirc=1, margin_highlight=[0, 1] 161 | ) 162 | 163 | # explicitly specify dim=2 164 | tp = Topology(model_2d, dim=2) 165 | wfs1 = tp.gen_circle_wfs([2 / 3, 1 / 3], r=0.0001) 166 | wfs2 = tp.gen_circle_wfs([0.45, 0.45], r=0.01) 167 | wfs3 = tp.gen_circle_wfs([0.26, 0.52], r=0.01) 168 | print( 169 | "berry phase for dirac point1", 170 | tp.wilson_loop( 171 | [0], 172 | wfs1, 173 | ), 174 | ) 175 | print( 176 | "berry phase for dirac point2", 177 | tp.wilson_loop( 178 | [4], 179 | wfs2, 180 | ), 181 | ) 182 | print( 183 | "berry phase for dirac point3", 184 | tp.wilson_loop( 185 | [4], 186 | wfs3, 187 | ), 188 | ) 189 | 190 | 191 | ######## SrTiO3 with NAC ########## 192 | print("SrTiO3!!") 193 | ## phonopy setup 194 | import phonopy 195 | from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix 196 | from phonopy.phonon.band_structure import BandStructure 197 | from phonopy.phonon.band_structure import get_band_qpoints_and_path_connections 198 | 199 | # create phonopy object 200 | unitcell = r"..\tests\SrTiO3\POSCAR" 201 | supercell = r"..\tests\SrTiO3\SPOSCAR" 202 | born = r"..\tests\SrTiO3\BORN" 203 | force_const = r"..\tests\SrTiO3\FORCE_CONSTANTS" 204 | ph = phonopy.load( 205 | supercell_filename=supercell, 206 | born_filename=born, 207 | force_constants_filename=force_const, 208 | ) 209 | # create DynamicalMatrix object 210 | dm = get_dynamical_matrix( 211 | ph.force_constants, ph.supercell, ph.primitive, nac_params=ph.nac_params 212 | ) 213 | 214 | ## topoPhonon side 215 | # build a Structure object 216 | structure = Structure(3) 217 | structure.read_POSCAR(unitcell) 218 | structure.read_supercell(supercell) 219 | # build a model object with Phonopy DynamicalMatrix object 220 | model = Model(structure, dm=dm) 221 | k_path = [ 222 | [0.0, 0.0, 0.0], 223 | [0.0, 0.5, 0.0], 224 | [0.5, 0.5, 0.0], 225 | [0.0, 0.0, 0.0], 226 | [0.5, 0.5, 0.5], 227 | ] 228 | model.atom_projected_band( 229 | k_path, 230 | node_names=["$\Gamma$", "X", "M", "$\Gamma$", "R"], 231 | site_comb=[[0], [1], [2, 3, 4]], 232 | ) 233 | 234 | 235 | ######## MgB2 ########## 236 | print("nodal lines for MgB2!!") 237 | model = read_from_files(r"..\tests\MgB2") 238 | q_path = [ 239 | [0.5,0.0,0.0], 240 | [0.0,0.0,0.0], 241 | [1/3,1/3,0.0], 242 | [1/3,1/3,0.5], 243 | [0.0,0.0,0.0], 244 | [0.0,0.0,0.5] 245 | ] 246 | node_names=['M', "$\Gamma$", 'K', 'H', "$\Gamma$", 'A'] 247 | # project electron scattering intensity onto the band structure 248 | model.atom_projected_band( 249 | q_path, 250 | node_names=node_names, 251 | k_num=200, 252 | unit='THz', 253 | qi=[1,0,0], 254 | T=1000, 255 | int_factor=1, 256 | max_size=0.1 257 | ) 258 | tp = Topology(model) 259 | wfs1 = tp.gen_circle_wfs([1/3,1/3],r=0.01,z=0.2) 260 | print("berry phase around the nodal line") 261 | print("for band1:", tp.wilson_loop([1], wfs1,)) 262 | print("for band3:", tp.wilson_loop([3], wfs1,)) 263 | print("for band6:", tp.wilson_loop([6], wfs1,)) 264 | -------------------------------------------------------------------------------- /topophonon/structure.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | This module contains the class that describes the crystal structure related 4 | properties 5 | """ 6 | 7 | from topophonon.units import masses_dict 8 | import numpy as np 9 | import os 10 | import re 11 | import warnings 12 | from typing import List 13 | from copy import deepcopy 14 | 15 | class Structure(): 16 | 17 | #regex for finding coordinates 18 | PATTERN = "(-?\d+\.?\d+)\s*(-?\d+\.?\d+)\s*(-?\d+\.?\d+).*" 19 | 20 | 21 | def __init__(self, 22 | dim: int, 23 | lat: List[List[float]] = None, 24 | coords: List[List[float]] = None, 25 | masses: List[float] = None, 26 | atoms: List[str] = None, 27 | shift: List[float] = [0.0, 0.0, 0.0]): 28 | """ 29 | Parameters 30 | ---------- 31 | dim : int 32 | dimension of the crystal. 33 | lat : 2d list or ndarray, optional 34 | a matrix defines the lattice parameters in cartesian coordinates. 35 | The default is None 36 | coords : 2d list or ndarray, optional 37 | a list of vectors define the coordinates of atoms in the unit cell. 38 | The default is None 39 | masses : list, optional 40 | a list contains the massses of atoms. If not specified, 41 | default values will be used based on "atoms" 42 | The default is None 43 | atoms : list, optional 44 | a list contains the name of atoms. 45 | The default is None. 46 | """ 47 | 48 | self.dim = dim 49 | assert isinstance(self.dim, int) and 1 <= dim <= 3, "dimension must be 1, 2 or 3" 50 | if lat is None: 51 | self.lat = np.zeros((self.dim,self.dim)) 52 | else: 53 | self.lat = np.array(lat,dtype=float) 54 | # calculate the reciprocal lattice 55 | # self.k_lat = np.linalg.inv(np.dot(self.lat,self.lat.T)) 56 | self.k_lat = np.linalg.inv(self.lat.T) 57 | 58 | if coords is not None: 59 | for coord in coords: 60 | if len(coord) != self.dim: 61 | raise ValueError("The lenght of a coordinate must match dim") 62 | self.coords = coords 63 | 64 | self.prm_dirc = np.array(coords,dtype=float) 65 | self.prm_cart = self._direct_to_cartesian(self.prm_dirc, self.lat) 66 | 67 | if masses is None: 68 | self.masses = None 69 | # set the atoms and default masses 70 | self._set_atoms(atoms) 71 | if masses is not None: 72 | assert isinstance(masses, list), ("the masses must be given in a list") 73 | if self.masses is not None: 74 | warnings.warn("masses are already given, will be overwritten") 75 | self.masses = masses 76 | self.shift = np.array(shift) 77 | 78 | 79 | def _atoms_to_masses(self, 80 | atoms: List[str]): 81 | """ 82 | convert a list of atoms to their masses based on their names 83 | """ 84 | masses = [] 85 | for a in atoms: 86 | assert isinstance(a,str), "the atoms must be given in string type" 87 | assert a.upper() in masses_dict,\ 88 | "unrecognized atom type {}".format(a) 89 | masses.append(masses_dict[a.upper()]) 90 | self.masses = masses 91 | 92 | 93 | def _set_atoms(self, 94 | atoms: List[str]): 95 | """ 96 | set atom list and mass list 97 | 98 | """ 99 | if atoms is None: 100 | self.atoms = None 101 | return 102 | warnings.warn("default masses are used") 103 | self.atoms = atoms 104 | self._atoms_to_masses(atoms) 105 | 106 | 107 | def set_lat(self, 108 | lat: np.ndarray): 109 | """ 110 | set real space and reciprocal lattice tensor 111 | 112 | Parameters 113 | ---------- 114 | lat : 2d ndarray of float 115 | 3 lattice vectors 116 | """ 117 | 118 | self.lat = lat 119 | self.k_lat = np.linalg.inv(np.dot(lat, lat.T)) 120 | 121 | 122 | @staticmethod 123 | def _direct_to_cartesian(coord: np.ndarray, 124 | lat: np.ndarray) -> np.ndarray : 125 | """ 126 | convert a direct coordinate to a cartesian coordinate 127 | 128 | """ 129 | return np.dot(coord, lat) 130 | 131 | 132 | @staticmethod 133 | def _cartesian_to_direct(coord: np.ndarray, 134 | lat: np.ndarray) -> np.ndarray : 135 | """ 136 | convert a cartesian coordinate to a direct coordinate 137 | 138 | """ 139 | return np.dot(coord, np.linalg.inv(lat)) 140 | 141 | 142 | def del_atoms(self, indices): 143 | self.masses = [x for i, x in enumerate(self.masses) if i not in indices] 144 | self.atoms = [x for i, x in enumerate(self.atoms) if i not in indices] 145 | self.prm_cart = deepcopy(self.prm_cart[[i for i in range(len(self.prm_cart)) if i not in indices]]) 146 | self.prm_dirc = deepcopy(self.prm_dirc[[i for i in range(len(self.prm_dirc)) if i not in indices]]) 147 | 148 | 149 | def read_POSCAR(self, poscar: str): 150 | """ 151 | read the VASP POSCAR file 152 | 153 | Parameters 154 | ---------- 155 | poscar : str 156 | the path of POSCAR file 157 | """ 158 | 159 | assert self.dim == 3, "To read files from phonopy, the dimension must be 3" 160 | assert os.path.exists(poscar), "{} not existed".format(poscar) 161 | 162 | self.prm_dirc, self.prm_cart = [], [] 163 | # try: 164 | with open(poscar) as p: 165 | # skip the fist line 166 | p.readline() 167 | # the factor of lattice 168 | factor = float(p.readline().strip()) 169 | # read the lattice constants 170 | for i in range(3): 171 | r_str = p.readline().strip().split() 172 | r_float = [float(r) * factor for r in r_str] 173 | self.lat[i] = np.array(r_float) 174 | self.k_lat = np.linalg.inv(self.lat.T) 175 | # read atoms 176 | atoms = p.readline().strip().split() 177 | counts = p.readline().strip().split() 178 | all_atoms = [] 179 | for i in range(len(counts)): 180 | for _ in range(int(counts[i])): 181 | all_atoms.append(atoms[i]) 182 | #convert atoms to masses 183 | if self.masses is None: 184 | self._set_atoms(all_atoms) 185 | 186 | # read the mode 187 | mode = p.readline().strip() 188 | 189 | # read all coordinates 190 | if mode.lower().startswith('c'): 191 | pass 192 | 193 | elif mode.lower().startswith('d'): 194 | for i in range(len(self.atoms)): 195 | coord_str = re.findall(Structure.PATTERN, p.readline())[0] 196 | coord_array = np.array([float(r) for r in coord_str]) 197 | self.prm_dirc.append(coord_array) 198 | self.prm_cart.append( 199 | self._direct_to_cartesian(coord_array, self.lat)) 200 | self.prm_dirc = np.array(self.prm_dirc) 201 | self.prm_cart = np.array(self.prm_cart) 202 | else: 203 | raise Exception("unknown mode in POSCAR; can be direct or cartesian") 204 | # except: 205 | # raise ValueError("Something goes wrong with {}".format(poscar)) 206 | 207 | 208 | def read_supercell(self, sposcar: str): 209 | """ 210 | read the supercell file which can be generated by phonopy 211 | 212 | Parameters 213 | ---------- 214 | sposcar : str 215 | the path of SPOSCAR file 216 | 217 | """ 218 | 219 | assert os.path.exists(sposcar), "{} not existed".format(sposcar) 220 | 221 | #convert the original coordinates to cartesian coordinates 222 | # org_coords_cart = [] 223 | # for coord in self.prm_dirc: 224 | # org_coords_cart.append(self._direct_to_cartesian(coord, self.lat)) 225 | # org_coords_cart = np.array(org_coords_cart) 226 | 227 | self.super_dirc, self.super_cart = [], [] 228 | self.super_lat = np.zeros((self.dim,self.dim)) 229 | #Read information in the supercell 230 | try: 231 | with open(sposcar) as p: 232 | p.readline() 233 | factor = float(p.readline().strip()) 234 | # read the lattice constants 235 | for i in range(3): 236 | r_str = p.readline().strip().split() 237 | r_float = [float(r) * factor for r in r_str] 238 | self.super_lat[i] = np.array(r_float) 239 | p.readline() 240 | #total number of atoms in the supercell 241 | nums = p.readline().strip().split() 242 | nums = [int(num) for num in nums] 243 | total = sum(nums) 244 | # read the mode 245 | mode = p.readline().strip() 246 | 247 | # read all coordinates 248 | if mode.lower().startswith('c'): 249 | pass 250 | elif mode.lower().startswith('d'): 251 | 252 | for i in range(total): 253 | coord_str = re.findall(Structure.PATTERN, p.readline())[0] 254 | coord = np.array([float(r) for r in coord_str]) 255 | self.super_dirc.append(coord) 256 | self.super_cart.append( 257 | self._direct_to_cartesian(coord, self.super_lat)) 258 | self.super_dirc = np.array(self.super_dirc) 259 | self.super_cart = np.array(self.super_cart) 260 | except: 261 | raise ValueError("Something goes wrong with {}". format(sposcar)) 262 | 263 | 264 | @staticmethod 265 | def _write_structure(file, lat, atoms, count, coords): 266 | with open (file, 'w') as f: 267 | f.write('Output from topoPhonon\n') 268 | f.write(' {:.6f} \n'.format(1)) 269 | f.write(" {:.6f} {:.6f} {:.6f}\n {:.6f} {:.6f} {:.6f}\n {:.6f} {:.6f} {:.6f}\n"\ 270 | .format(lat[0][0], lat[0][1], lat[0][2], 271 | lat[1][0], lat[1][1], lat[1][2], 272 | lat[2][0], lat[2][1], lat[2][2],)) 273 | for atom in atoms: 274 | f.write(" {}".format(atom)) 275 | f.write('\n') 276 | for c in count: 277 | f.write(" {}".format(c)) 278 | f.write('\n') 279 | f.write('Direct') 280 | f.write('\n') 281 | for coord in coords: 282 | f.write(' {:.6f} {:.6f} {:.6f}\n'.format(coord[0], coord[1], coord[2])) 283 | 284 | 285 | def write_poscar(self, file): 286 | """ 287 | output the structure in VASP POSCAR format 288 | 289 | Parameters 290 | ---------- 291 | file : str 292 | the path of output POSCAR file 293 | 294 | """ 295 | lat = self.lat 296 | atoms, count = np.unique(self.atoms,return_counts=True) 297 | coords = self.prm_dirc 298 | self._write_structure(file, lat, atoms, count, coords) -------------------------------------------------------------------------------- /topophonon/topology.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sat Aug 20 21:10:49 2022 4 | 5 | @author: zhuhe 6 | """ 7 | 8 | import copy 9 | import numpy as np 10 | from scipy.linalg import sqrtm 11 | import warnings 12 | import matplotlib.pyplot as plt 13 | import functools 14 | from copy import deepcopy 15 | from scipy.optimize import basinhopping, minimize 16 | 17 | class Topology(): 18 | """ 19 | Class with topology-related properties and methods 20 | """ 21 | 22 | 23 | def __init__(self, model, dim=None): 24 | self.model = model 25 | self.nb = len(model.structure.masses) * model.dim 26 | if dim is None: 27 | self.dim = model.dim 28 | else: 29 | self.dim = dim 30 | 31 | def _wfs_at_kpt(self, kpt): 32 | """ 33 | Return the modified phonon eigenvectors at kpt 34 | """ 35 | modified_wf = [] 36 | dy_mt, all_freqs, eig_vecs =\ 37 | self.model.solve_dynamical_matrix_kpath([kpt], k_num=1) 38 | dim = len(all_freqs[0]) 39 | for i in range(dim): 40 | # convert the row vector to column vector 41 | # old_wf = eig_vecs[0][:,i].reshape((-1,1)) 42 | # freq = all_freqs[0][i] 43 | # new_wf = np.zeros(dim*2, dtype=complex) 44 | # new_wf[:dim] = np.dot(sqrtm(dy_mt), old_wf).flatten() 45 | # new_wf[dim:] = (-1j * freq * old_wf).flatten() 46 | # modified_wf.append(new_wf) 47 | old_wf = np.array(eig_vecs[0][:,i]) 48 | modified_wf.append(old_wf) 49 | return modified_wf 50 | 51 | 52 | def _gen_k_loop_bz(self, k_along, k_start, k_num=50): 53 | """ 54 | Generate a closed k loop for wilson_loop function 55 | 56 | """ 57 | step = np.array([0 for _ in range(self.dim)],dtype=float) 58 | step[k_along] = 1/(k_num-1) 59 | # self._back_to_bz(k_start) 60 | k_grids = [copy.deepcopy(k_start)] 61 | for i in range(k_num-1): 62 | k_start += step 63 | # print(k_start) 64 | # self._back_to_bz(k_start) 65 | # print(k_start) 66 | temp = copy.deepcopy(k_start) 67 | k_grids.append(temp) 68 | return np.array(k_grids) 69 | 70 | 71 | def gen_BZ_wfs(self, k_along, k_start, k_num=60): 72 | """ 73 | Generate the phonon eigenvectors along a closed line over the whole brillioun zone. 74 | 75 | Parameters 76 | ---------- 77 | k_along : int 78 | the direction of the line 79 | k_start : list of float 80 | the starting (and the ending) point of the line 81 | k_num : int, optional 82 | total number of kpoints on the line 83 | The default is 60 84 | Returns 85 | ------- 86 | an array of eigenvectors along the line 87 | """ 88 | k_start = np.array(k_start, dtype=float) 89 | k_grids = self._gen_k_loop_bz(k_along, k_start, k_num) 90 | self.k_grids = k_grids 91 | all_wfs = [] 92 | for kpt in k_grids: 93 | modified_wf = self._wfs_at_kpt(kpt) 94 | all_wfs.append(modified_wf) 95 | return np.array(all_wfs) 96 | 97 | 98 | def gen_circle_wfs(self, center, dirc=2, z=0, r=0.05, k_num=60): 99 | """ 100 | Generate the eigenvectors along a circle. 101 | 102 | Parameters 103 | ---------- 104 | center : list, [float, float] 105 | two floats that specify the coordinates of the center 106 | dirc : int, optional 107 | the direction that is normal to the circle 108 | The default is 2 109 | z : float, optional 110 | the third coordinate that defines the plane of the circle; for example, 111 | if the dirc=0 and z=0.5, the wfs are generated on x=0.5 plane. 112 | The default is 0.0 113 | r : float, optional 114 | the radius of the circle 115 | The default is 0.05 116 | k_num : int, optional 117 | total number of kpoints on the line 118 | The default is 60 119 | Returns 120 | ------- 121 | an array of eigenvectors on the circle 122 | """ 123 | 124 | kpts = [] 125 | wfs = [] 126 | for i in range(k_num): 127 | theta = 2 * np.pi * i / k_num 128 | x = center[0] + r * np.cos(theta) 129 | y = center[1] + r * np.sin(theta) 130 | 131 | if self.dim == 2: 132 | kpt = np.array([x,y,0]) 133 | else: 134 | if dirc == 0: 135 | kpt = np.array([z,x,y]) 136 | elif dirc == 1: 137 | kpt = np.array([y,z,x]) 138 | elif dirc == 2: 139 | kpt = np.array([x,y,z]) 140 | else: 141 | raise Exception("dirc must be 0, 1 or 2 if dim of the model is 3") 142 | # kpt = np.dot(kpt, np.linalg.inv(self.model.structure.k_lat)) 143 | kpts.append(kpt) 144 | wfs.append(self._wfs_at_kpt(kpt)) 145 | # make sure the last wf is equal to the first one 146 | kpts.append(kpts[0]) 147 | wfs.append(wfs[0]) 148 | return np.array(kpts), np.array(wfs) 149 | 150 | 151 | def _gen_orbit_wfs(self, center, r, theta, dirc, k_num=60): 152 | """ 153 | Generate an orbit around for a given center 154 | """ 155 | wfs = [] 156 | for i in range(k_num+1): 157 | phi = 2 * np.pi * i / k_num 158 | x = center[0] + r * np.sin(theta) * np.cos(phi) 159 | y = center[1] + r * np.sin(theta) * np.sin(phi) 160 | z = center[2] + r * np.cos(theta) 161 | if dirc == 0: 162 | kpt = np.array([y,z,x]) 163 | elif dirc == 1: 164 | kpt = np.array([z,x,y]) 165 | elif dirc == 2: 166 | kpt = np.array([x,y,z]) 167 | else: 168 | raise Exception("dirc must be 0, 1 or 2") 169 | # print(kpt) 170 | wfs.append(self._wfs_at_kpt(kpt)) 171 | return np.array(wfs) 172 | 173 | 174 | @staticmethod 175 | def find_vector_with_fixed_gauge_by_making_one_component_real(vector, precision=0.001, index=None): 176 | # find the gauge for continous berry connections 177 | # print(np.abs(vector)) 178 | vector = np.array(vector) 179 | if index == None: 180 | index = np.argmax(np.abs(vector)) 181 | print('index: ', index) 182 | angle = np.angle(vector[index]) 183 | vector = vector*np.exp(-1j*angle) 184 | return vector 185 | 186 | 187 | @staticmethod 188 | def find_vector_with_fixed_gauge_by_minimizing_real_part(vector, index): 189 | # find the gauge for continous berry connections 190 | def func(theta): 191 | res = np.cos(theta) * vector.real - np.sin(theta) * vector.imag 192 | return np.linalg.norm(res) 193 | 194 | min_real = float('inf') 195 | # minimizer_kwargs = dict(method="L-BFGS-B", bounds=[(0, 2*np.pi)], tol=1e-12) 196 | for start_point in np.arange(0, 2*3.14, 0.5): 197 | # argmin_theta = basinhopping(func, start_point, minimizer_kwargs=minimizer_kwargs, stepwise_factor=0.1).x[0] 198 | argmin_theta = minimize(func, start_point, method='COBYLA' , bounds=[(0, 2*np.pi)], tol=1e-30, options={'maxiter':100}).x[0] 199 | # print(argmin_theta, func(argmin_theta)) 200 | if func(argmin_theta) < min_real: 201 | globalmin_theta = argmin_theta 202 | min_real = func(argmin_theta) 203 | # print(min_real) 204 | 205 | vector = vector * np.exp(1j * globalmin_theta) 206 | # set one component positive 207 | if vector[index].real < 0: 208 | vector *= -1 209 | return vector 210 | 211 | 212 | def connection(self, k, band, index=None, delta=1e-9, precision=0.0001): 213 | """ 214 | Calculate Berry Connection 215 | """ 216 | # print(k) 217 | dy_mt = self.model._make_dynamical_matrix(k) 218 | eigenvalue, eigenvector = np.linalg.eigh(dy_mt) 219 | vector = eigenvector[:, np.argsort(np.real(eigenvalue))[band]] 220 | # vector = eigenvector[:, band] 221 | # print('vector_org',vector) 222 | print(abs(vector)) 223 | vector = self.find_vector_with_fixed_gauge_by_making_one_component_real(vector, index=index) 224 | # vector = self.find_vector_with_fixed_gauge_by_minimizing_real_part(vector, index) 225 | # print('vector',vector) 226 | # vector = self.find_vector_with_the_same_gauge(d_vector, vector) 227 | 228 | k = np.dot(k, self.model.structure.k_lat) 229 | A = [] 230 | for d in range(self.model.dim): 231 | dk = copy.deepcopy(k) 232 | dk[d] = dk[d] + delta 233 | dk = np.dot(dk, np.linalg.inv(self.model.structure.k_lat)) 234 | # print(dk) 235 | dmt = self.model._make_dynamical_matrix(dk) 236 | d_eigenvalue, d_eigenvector = np.linalg.eigh(dmt) 237 | d_vector = d_eigenvector[:, np.argsort(np.real(d_eigenvalue))[band]] 238 | # d_vector = d_eigenvector[:, band] 239 | # print('d_vector_org',d_vector) 240 | d_vector = self.find_vector_with_fixed_gauge_by_making_one_component_real(d_vector, index=index) 241 | # d_vector = self.find_vector_with_fixed_gauge_by_minimizing_real_part(d_vector, index) 242 | # d_vector = self.find_vector_with_the_same_gauge(d_vector, vector) 243 | # print('d_vector',d_vector) 244 | # print('d_vector-vector', d_vector-vector) 245 | # if d == 0: 246 | # print('d_vector', d_vector) 247 | # print('d_vector-vector', d_vector-vector) 248 | A.append(1j * np.dot(vector.transpose().conj(), d_vector-vector)/delta) 249 | # print(' ') 250 | # print('---------------') 251 | return A 252 | 253 | 254 | @staticmethod 255 | def wilson_loop(band_indices, all_wfs,): 256 | """ 257 | Compute the berry phase of a given set of eigenvectors, the first eigenvector 258 | must be equal to the last eigenvector 259 | 260 | Parameters 261 | ---------- 262 | band_indices : list of ints 263 | list of band indices for which the wilson loop is calculated. 264 | all_wfs : ndarray of complex 265 | an array of eigenvectors around a closed path. 266 | 267 | Returns 268 | ------- 269 | berry phase calculated with wilson loop method 270 | """ 271 | 272 | if isinstance(band_indices, int): 273 | band_indices = [band_indices] 274 | num_bands = len(band_indices) 275 | k_num = len(all_wfs) 276 | prod = np.identity(num_bands, dtype=complex) 277 | det = 1 278 | #iterate over all kpoints on the loop 279 | for i in range(k_num-1): 280 | #container for overlap matrix 281 | ovlp = np.zeros([num_bands,num_bands],dtype=complex) 282 | #iterate over all bands for overlap matrix 283 | for j in range(num_bands): 284 | for k in range(num_bands): 285 | wf_1 = all_wfs[i][band_indices[j]] 286 | wf_2 = all_wfs[i+1][band_indices[k]] 287 | ovlp[j,k] = np.dot(wf_1.conjugate(),wf_2) 288 | # det *= np.linalg.det(ovlp) 289 | # print(np.linalg.det(ovlp),det) 290 | # phase = -np.imag(np.log(det)) / np.pi 291 | # calculate determinant for each overlap matrix and then multiply? 292 | # multiply all overlap matrices 293 | prod = np.dot(prod,ovlp) 294 | # print(prod) 295 | # compute the determinant 296 | det = np.linalg.det(prod) 297 | # the flux for this small plaquette 298 | phase = (-1.0)*np.angle(det, deg=False)/np.pi 299 | return phase 300 | 301 | 302 | def wcc_evol_sphere(self, band_indices, center, r=0.001, dirc=2, num=60,): 303 | """ 304 | Generate a sphere and plot the evolution of wannier centers around that sphere, 305 | for 3d only. The sphere is sliced into multiple orbitals. Wilson loop 306 | method is applied to calculate the wannier center on each orbit. 307 | 308 | Parameters 309 | ---------- 310 | band_indices : list of int 311 | list of band indices on which the wannier centers are calculated. 312 | center : list, [float, float, float] 313 | three floats that specify the coordinates of the sphere center 314 | r : float, optional 315 | the radius of the sphere 316 | The default is 0.001 317 | dirc : int, optional 318 | the direction along which theta evolves; in other words, the orbitals 319 | are perpendicular to those orbitals 320 | The default is 2 321 | num : int, optional 322 | number of slices and number of k points on the loop 323 | The default is 60 324 | 325 | Returns 326 | ------- 327 | berry phase calculated with wilson loop method 328 | """ 329 | 330 | if isinstance(band_indices, int): 331 | band_indices = [[band_indices]] 332 | if isinstance(band_indices[0],int): 333 | band_indices = [band_indices] 334 | print("calculating wcc charge center evolution around {}...".format(center)) 335 | polar_angles = [] 336 | all_wccs = [[] for _ in range(len(band_indices))] 337 | for i in range(num+1): 338 | theta = np.pi * i / num 339 | polar_angles.append(theta/np.pi) 340 | wfs = self._gen_orbit_wfs(center, r, theta, dirc, k_num=num) 341 | for j in range(len(band_indices)): 342 | w = self.wilson_loop(band_indices[j], wfs) 343 | all_wccs[j].append(w) 344 | # self.polar_angles = polar_angles 345 | # self.wccs = wccs 346 | for i, wccs in enumerate(all_wccs): 347 | plt.figure() 348 | plt.scatter(polar_angles, wccs) 349 | plt.ylim(-1, 1) 350 | plt.xlim(0, 1) 351 | plt.title("band {}".format(str(band_indices[i]))) 352 | # return polar_angles, all_wccs 353 | 354 | 355 | def berry_curvature(self, kpt, band_indices, delta=1e-9): 356 | """ 357 | Compute the berry curvature for one or more bands on a given k point, 358 | using Kubo formulation. 359 | Works for 2d and 3d cases. 360 | 361 | Parameters 362 | ---------- 363 | kpt : list of floats 364 | the coordinates of the kpoint; the length must be equal to self.dim 365 | band_indices : list of ints 366 | list of band indices on which the berry curvature is calculated. 367 | delta : float, optional 368 | a small distance between two points for differentiating the Hamiltonian. 369 | The default is 1e-9 370 | 371 | Returns 372 | ------- 373 | a 3/1-component vector for 3-d/2-d models 374 | """ 375 | 376 | assert len(kpt) == self.dim, ("wrong dimension of kpt") 377 | # build a wilson loop adjacent to the point 378 | d, freqs, eig_vecs =\ 379 | self.model.solve_dynamical_matrix_kpath([kpt], 380 | k_num=1) 381 | num_deg = len(band_indices) 382 | num_bands = len(freqs[0]) 383 | f0 = [freqs[0][i] for i in band_indices] 384 | wfs = [eig_vecs[0][:,i] for i in band_indices] 385 | 386 | if self.dim == 2: 387 | # total = np.array(0+0j) 388 | kxp = kpt + np.array([delta,0]) 389 | kyp = kpt + np.array([0,delta]) 390 | d_x, _, _ = self.model.solve_dynamical_matrix_kpath([kxp], 391 | k_num=1,) 392 | d_y, _, _ = self.model.solve_dynamical_matrix_kpath([kyp], 393 | k_num=1,) 394 | delta_x = (d_x - d)/delta 395 | delta_y = (d_y - d)/delta 396 | # build the berry curvature matrix B_ij 397 | total = np.zeros((num_deg, num_deg),dtype=complex) 398 | for i in range(num_deg): 399 | for j in range(num_deg): 400 | fi, fj = f0[i], f0[j] 401 | wfi, wfj = wfs[i], wfs[j] 402 | # iterate over all bands 403 | for m in range(num_bands): 404 | if m in band_indices: 405 | continue 406 | wfm = np.array(eig_vecs[0][:,m]) 407 | fm = freqs[0][m] 408 | if abs(fi - fm) < 1e-11: 409 | raise Exception("band {} and {} are degenerate"\ 410 | .format(i, m)) 411 | if abs(fj - fm) < 1e-11: 412 | raise Exception("band {} and {} are degenerate"\ 413 | .format(j, m)) 414 | prod1, prod2 = np.zeros(2, dtype=complex), np.zeros(2, dtype=complex) 415 | prod1[0] = np.dot(wfi.conjugate(),np.dot(delta_x, wfm)) 416 | prod1[1] = np.dot(wfi.conjugate(),np.dot(delta_y, wfm)) 417 | prod2[0] = np.dot(wfm.conjugate(),np.dot(delta_x, wfj)) 418 | prod2[1] = np.dot(wfm.conjugate(),np.dot(delta_y, wfj)) 419 | # total[i][j] += np.cross(prod1, prod2) / (fi-fm) / (fj-fm) 420 | total[i][j] += np.cross(prod1, prod2) / (fi-fm) / (fj-fm) 421 | elif self.dim == 3: 422 | # total = np.zeros(3, dtype=complex) 423 | kxp = kpt + np.array([delta,0,0]) 424 | kyp = kpt + np.array([0,delta,0]) 425 | kzp = kpt + np.array([0,0,delta]) 426 | d_x, _, _ = self.model.solve_dynamical_matrix_kpath([kxp], 427 | k_num=1,) 428 | d_y, _, _ = self.model.solve_dynamical_matrix_kpath([kyp], 429 | k_num=1,) 430 | d_z, _, _ = self.model.solve_dynamical_matrix_kpath([kzp], 431 | k_num=1,) 432 | delta_x = (d_x - d)/delta 433 | delta_y = (d_y - d)/delta 434 | delta_z = (d_z - d)/delta 435 | 436 | # build the berry curvature matrix B_ij 437 | total = np.zeros((num_deg, num_deg, 3),dtype=complex) 438 | for i in range(num_deg): 439 | for j in range(num_deg): 440 | fi, fj = f0[i], f0[j] 441 | wfi, wfj = wfs[i], wfs[j] 442 | # iterate over all bands 443 | for m in range(num_bands): 444 | if m in band_indices: 445 | continue 446 | wfm = np.array(eig_vecs[0][:,m]) 447 | fm = freqs[0][m] 448 | if abs(fi - fm) < 1e-22: 449 | warnings.warn("band {} and {} are likely to be degenerate at {}"\ 450 | .format(band_indices[i], m, kpt)) 451 | if abs(fj - fm) < 1e-22: 452 | warnings.warn("band {} and {} are likely to be degenerate at {}"\ 453 | .format(band_indices[j], m, kpt)) 454 | prod1, prod2 = np.zeros(3, dtype=complex), np.zeros(3, dtype=complex) 455 | prod1[0] = np.dot(wfi.conjugate(),np.dot(delta_x, wfm)) 456 | prod1[1] = np.dot(wfi.conjugate(),np.dot(delta_y, wfm)) 457 | prod1[2] = np.dot(wfi.conjugate(),np.dot(delta_z, wfm)) 458 | prod2[0] = np.dot(wfm.conjugate(),np.dot(delta_x, wfj)) 459 | prod2[1] = np.dot(wfm.conjugate(),np.dot(delta_y, wfj)) 460 | prod2[2] = np.dot(wfm.conjugate(),np.dot(delta_z, wfj)) 461 | total[i][j] += np.cross(prod1, prod2) / (fi-fm) / (fj-fm) 462 | else: 463 | raise Exception("To calculate berry curvatures, the dimension must\ 464 | be 2 or 3") 465 | return np.real(1j * np.trace(total)) 466 | 467 | 468 | @staticmethod 469 | def _make_k_grid(xy_range, num): 470 | """ 471 | make a 2d k_grid for berry_curvature_proj and berry_curvature_2d method 472 | """ 473 | interval = xy_range/num 474 | a = np.arange(-xy_range, xy_range+interval, interval) 475 | kx,ky = np.meshgrid(a,a) 476 | return kx, ky 477 | 478 | 479 | # @staticmethod 480 | # def _log_scale(x): 481 | # # scale the vector logarithmically 482 | # return np.sign(x)*np.log10(1+np.abs(x)) 483 | 484 | 485 | # @staticmethod 486 | # def _normalization(x, y): 487 | # return x/np.sqrt(x**2 + y**2), y/np.sqrt(x**2 + y**2) 488 | 489 | 490 | def berry_curvature_proj(self, 491 | band_indices, 492 | dirc, 493 | kz, 494 | center=[0,0], 495 | xy_range=0.5, 496 | num=10,): 497 | 498 | """ 499 | plot 3d berry curvature for one or more bands projected on a 2D plane, 500 | "dirc" is normal to the plane, "center" specify the center of the map; 501 | "kz" determines the position of the plane on "dirc" axis. for example: 502 | dirc=2, kz=0.5, center=[0,0], the berry curvature is plotted on xy 503 | plane with kz=0.5 around [0,0,0.5] point. 504 | 505 | Parameters 506 | ---------- 507 | band_indices : list of ints 508 | list of band indices on which the berry curvature is calculated. 509 | dirc : int 510 | the direction that is normal to the plane on which the berry curvatures 511 | are projected. 512 | kz : float 513 | the third coordinate that defines the plane of the circle; for example, 514 | if the dirc=0 and z=0.5, the berry curvatures will be plotted on x=0.5 plane. 515 | center : list, [float, float], optional 516 | coordinate of the point around which the berry curvatures are plotted; 517 | specify only two component on the plane; the third coordinate is specified by kz. 518 | xy_range : float 519 | the range of the grid, i.e., the plot spans [center[0]-xy_range, 520 | center[0]+xy_range] and [center[1]-xy_range, center[1]+xy_range] 521 | The default is 0.5 522 | num : int, optional 523 | number of points sampled on the plane is given by num * num 524 | The default is 10 525 | 526 | """ 527 | 528 | print("start plotting the berry curvature field map...") 529 | if isinstance(band_indices, int): 530 | band_indices = [band_indices] 531 | # # a1 = np.arange(-xy_range[0], -interval/2, interval) 532 | # # a2 = np.arange(interval/2, xy_range[0], interval) 533 | # # a = np.hstack((a1,a2)) 534 | # interval_0, interval_1 = xy_range[0]/num, xy_range[1]/num 535 | # a = np.arange(-xy_range[0], xy_range[0], interval_0) 536 | # # b1 = np.arange(-xy_range[1], -interval/2, interval) 537 | # # b2 = np.arange(interval/2, xy_range[1], interval) 538 | # # b = np.hstack((b1,b2)) 539 | # b = np.arange(-xy_range[1], xy_range[1], interval_1) 540 | # kx,ky = np.meshgrid(a,b) 541 | kx, ky = self._make_k_grid(xy_range, num) 542 | kx0, ky0 = center[0], center[1] 543 | #the x and y component of berry curvature 544 | # for group in band_indices: 545 | 546 | u = np.zeros((len(kx), len(kx[0])), dtype=float) 547 | v = np.zeros((len(kx), len(kx[0])), dtype=float) 548 | plt.figure() 549 | for i in range(len(kx)): 550 | for j in range(len(kx[0])): 551 | if dirc == 0: 552 | kpt = np.array([kz,kx0+kx[i][j],ky0+ky[i][j]]) 553 | berry_curv = self.berry_curvature(kpt, band_indices) 554 | norm = np.sqrt(berry_curv[1]**2 + berry_curv[2]**2) 555 | if norm == 0: 556 | u[i][j] = None 557 | v[i][j] = None 558 | else: 559 | u[i][j] = berry_curv[1]/norm 560 | v[i][j] = berry_curv[2]/norm 561 | elif dirc == 1: 562 | kpt = np.array([ky0+ky[i][j],kz,kx0+kx[i][j]]) 563 | berry_curv = self.berry_curvature(kpt, band_indices) 564 | norm = np.sqrt(berry_curv[2]**2 + berry_curv[0]**2) 565 | if norm == 0: 566 | u[i][j] = None 567 | v[i][j] = None 568 | else: 569 | u[i][j] = berry_curv[2]/norm 570 | v[i][j] = berry_curv[0]/norm 571 | elif dirc == 2: 572 | kpt = np.array([kx0+kx[i][j],ky0+ky[i][j],kz]) 573 | berry_curv = self.berry_curvature(kpt, band_indices) 574 | norm = np.sqrt(berry_curv[0]**2 + berry_curv[1]**2) 575 | # print(norm) 576 | if norm == 0: 577 | u[i][j] = None 578 | v[i][j] = None 579 | else: 580 | u[i][j] = berry_curv[0]/norm 581 | v[i][j] = berry_curv[1]/norm 582 | else: 583 | raise Exception("dirc must be 0, 1 or 2") 584 | # plt.quiver(kx,ky,self._log_scale(u),self._log_scale(v), scale_units='xy') 585 | # print(u, v) 586 | plt.quiver(kx+kx0, ky+ky0, u, v, scale_units='xy') 587 | plt.title("band {}".format(str(band_indices))) 588 | -------------------------------------------------------------------------------- /topophonon/units.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Aug 19 15:18:17 2022 4 | 5 | @author: zhuhe 6 | """ 7 | 8 | masses_dict = {'H' : 1.008,'HE' : 4.003, 'LI' : 6.941, 'BE' : 9.012,\ 9 | 'B' : 10.811, 'C' : 12.011, 'N' : 14.007, 'O' : 15.999,\ 10 | 'F' : 18.998, 'NE' : 20.180, 'NA' : 22.990, 'MG' : 24.305,\ 11 | 'AL' : 26.982, 'SI' : 28.086, 'P' : 30.974, 'S' : 32.066,\ 12 | 'CL' : 35.453, 'AR' : 39.948, 'K' : 39.098, 'CA' : 40.078,\ 13 | 'SC' : 44.956, 'TI' : 47.867, 'V' : 50.942, 'CR' : 51.996,\ 14 | 'MN' : 54.938, 'FE' : 55.845, 'CO' : 58.933, 'NI' : 58.693,\ 15 | 'CU' : 63.546, 'ZN' : 65.38, 'GA' : 69.723, 'GE' : 72.631,\ 16 | 'AS' : 74.922, 'SE' : 78.971, 'BR' : 79.904, 'KR' : 84.798,\ 17 | 'RB' : 84.468, 'SR' : 87.62, 'Y' : 88.906, 'ZR' : 91.224,\ 18 | 'NB' : 92.906, 'MO' : 95.95, 'TC' : 98.907, 'RU' : 101.07,\ 19 | 'RH' : 102.906, 'PD' : 106.42, 'AG' : 107.868, 'CD' : 112.414,\ 20 | 'IN' : 114.818, 'SN' : 118.711, 'SB' : 121.760, 'TE' : 126.7,\ 21 | 'I' : 126.904, 'XE' : 131.294, 'CS' : 132.905, 'BA' : 137.328,\ 22 | 'LA' : 138.905, 'CE' : 140.116, 'PR' : 140.908, 'ND' : 144.243,\ 23 | 'PM' : 144.913, 'SM' : 150.36, 'EU' : 151.964, 'GD' : 157.25,\ 24 | 'TB' : 158.925, 'DY': 162.500, 'HO' : 164.930, 'ER' : 167.259,\ 25 | 'TM' : 168.934, 'YB' : 173.055, 'LU' : 174.967, 'HF' : 178.49,\ 26 | 'TA' : 180.948, 'W' : 183.84, 'RE' : 186.207, 'OS' : 190.23,\ 27 | 'IR' : 192.217, 'PT' : 195.085, 'AU' : 196.967, 'HG' : 200.592,\ 28 | 'TL' : 204.383, 'PB' : 207.2, 'BI' : 208.980, 'PO' : 208.982,\ 29 | 'AT' : 209.987, 'RN' : 222.081, 'FR' : 223.020, 'RA' : 226.025,\ 30 | 'AC' : 227.028, 'TH' : 232.038, 'PA' : 231.036, 'U' : 238.029,\ 31 | 'NP' : 237, 'PU' : 244, 'AM' : 243, 'CM' : 247, 'BK' : 247,\ 32 | 'CT' : 251, 'ES' : 252, 'FM' : 257, 'MD' : 258, 'NO' : 259,\ 33 | 'LR' : 262, 'RF' : 261, 'DB' : 262, 'SG' : 266, 'BH' : 264,\ 34 | 'HS' : 269, 'MT' : 268, 'DS' : 271, 'RG' : 272, 'CN' : 285,\ 35 | 'NH' : 284, 'FL' : 289, 'MC' : 288, 'LV' : 292, 'TS' : 294,\ 36 | 'OG' : 294} 37 | 38 | # convert VASP default frequency unit to THz 39 | VASP2THZ = 15.633302 40 | 41 | unit_dict = {"thz" : 1, 42 | "cm-1" : 33.356, 43 | "cm^-1" : 33.356, 44 | "ev" : 4.136 * 1e-3, 45 | "mev" : 4.136 46 | } 47 | 48 | HBARCGS = 1.0546 * 10 ** (-27) # in cm^2 * g / s 49 | HBAR = 6.5821 * 10 ** (-16) # in eV * s 50 | KB = 8.6173 * 10 ** (-5) # in eV / K 51 | 52 | MOLE = 6.022 * 10 ** 23 53 | 54 | ATOMS = ['H', 'HE', 'LI', 'BE', 'B', 'C', 'N', 'O', 'F', 'NE', 'NA', 'Mg', 'AL',\ 55 | 'Si', 'P', 'S', 'CL', 'AR', 'K', 'CA', 'SC', 'TI', 'V', 'CR', 'MN', 'FE',\ 56 | 'CO', 'NI', 'CU', 'ZN', 'Ga', 'Ge', 'As', 'SE', 'BR', 'KR', 'RB', 'SR',\ 57 | 'Y', 'ZR', 'NB', 'MO', 'TC', 'RU', 'RH', 'PD', 'AG', 'CD', 'IN', 'SN',\ 58 | 'SB', 'TE', 'I', 'XE', 'CS', 'BA', 'LA', 'CE', 'PR', 'ND', 'PM', 'SM',\ 59 | 'EU', 'GD', 'TB', 'DY', 'HO', 'ER', 'TM', 'YB', 'LU', 'HF', 'TA', 'W',\ 60 | 'RE', 'OS', 'IR', 'PT', 'AU', 'HG', 'TL', 'PB', 'BI', 'PO', 'AT', 'RN',\ 61 | 'FR', 'RA', 'AC', 'TH', 'PA', 'U', 'NP', 'PU', 'AM', 'CM', 'BK', 'CT',\ 62 | 'ES', 'FM', 'MD', 'NO', 'LR', 'RF', 'DB', 'SG', 'BH', 'HS', 'MT', 'DS',\ 63 | 'RG', 'CN', 'NH', 'FL', 'MC', 'LV', 'TS', 'OG'] 64 | 65 | SCATTER_PAR_A = {'H' : 1.008,'HE' : 4.003, 'LI' : 6.941, 'BE' : 9.012,\ 66 | 'B' : [0.945, 1.312, 0.419, 0.116],\ 67 | 'C' : [0.731, 1.195, 0.456, 0.125], 'N' : 14.007, 'O' : 15.999,\ 68 | 'F' : 18.998, 'NE' : 20.180, 'NA' : 22.990,\ 69 | 'Mg' : [2.268, 1.803, 0.839, 0.289],\ 70 | 'AL' : 26.982, 'Si' : [2.129, 2.533, 0.835, 0.322], 'P' : 30.974, 'S' : 32.066,\ 71 | 'CL' : 35.453, 'AR' : 39.948, 'K' : 39.098, 'CA' : 40.078,\ 72 | 'SC' : 44.956, 'TI' : 47.867, 'V' : 50.942, 'CR' : 51.996,\ 73 | 'MN' : 54.938, 'FE' : 55.845, 'CO' : 58.933, 'NI' : 58.693,\ 74 | 'CU' : 63.546, 'ZN' : 65.38, 'Ga' : [2.321, 2.486, 1.688, 0.599], 'Ge' : [2.447, 2.702, 1.616, 0.601],\ 75 | 'As' : [2.399, 2.790, 1.529, 0.594], 'SE' : 78.971, 'BR' : 79.904, 'KR' : 84.798,\ 76 | 'RB' : 84.468, 'SR' : 87.62, 'Y' : 88.906, 'ZR' : 91.224,\ 77 | 'NB' : 92.906, 'MO' : 95.95, 'TC' : 98.907, 'RU' : 101.07,\ 78 | 'RH' : 102.906, 'PD' : 106.42, 'AG' : 107.868, 'CD' : 112.414,\ 79 | 'IN' : 114.818, 'SN' : 118.711, 'SB' : 121.760, 'TE' : 126.7,\ 80 | 'I' : 126.904, 'XE' : 131.294, 'CS' : 132.905, 'BA' : 137.328,\ 81 | 'LA' : 138.905, 'CE' : 140.116, 'PR' : 140.908, 'ND' : 144.243,\ 82 | 'PM' : 144.913, 'SM' : 150.36, 'EU' : 151.964, 'GD' : 157.25,\ 83 | 'TB' : 158.925, 'DY': 162.500, 'HO' : 164.930, 'ER' : 167.259,\ 84 | 'TM' : 168.934, 'YB' : 173.055, 'LU' : 174.967, 'HF' : 178.49,\ 85 | 'TA' : 180.948, 'W' : 183.84, 'RE' : 186.207, 'OS' : 190.23,\ 86 | 'IR' : 192.217, 'PT' : 195.085, 'AU' : 196.967, 'HG' : 200.592,\ 87 | 'TL' : 204.383, 'PB' : 207.2, 'BI' : 208.980, 'PO' : 208.982,\ 88 | 'AT' : 209.987, 'RN' : 222.081, 'FR' : 223.020, 'RA' : 226.025,\ 89 | 'AC' : 227.028, 'TH' : 232.038, 'PA' : 231.036, 'U' : 238.029,\ 90 | 'NP' : 237, 'PU' : 244, 'AM' : 243, 'CM' : 247, 'BK' : 247,\ 91 | 'CT' : 251, 'ES' : 252, 'FM' : 257, 'MD' : 258, 'NO' : 259,\ 92 | 'LR' : 262, 'RF' : 261, 'DB' : 262, 'SG' : 266, 'BH' : 264,\ 93 | 'HS' : 269, 'MT' : 268, 'DS' : 271, 'RG' : 272, 'CN' : 285,\ 94 | 'NH' : 284, 'FL' : 289, 'MC' : 288, 'LV' : 292, 'TS' : 294,\ 95 | 'OG' : 294} 96 | 97 | SCATTER_PAR_B = {'H' : 1.008,'HE' : 4.003, 'LI' : 6.941, 'BE' : 9.012,\ 98 | 'B' : [46.444, 14.178, 3.223, 0.377],\ 99 | 'C' : [36.995, 11.297, 2.814, 0.346], 'N' : 14.007, 'O' : 15.999,\ 100 | 'F' : 18.998, 'NE' : 20.180, 'NA' : 22.990,\ 101 | 'Mg' : [73.76, 20.175, 3.013, 0.405],\ 102 | 'AL' : 26.982, 'Si' : [57.78, 16.48, 2.880, 0.386], 'P' : 30.974, 'S' : 32.066,\ 103 | 'CL' : 35.453, 'AR' : 39.948, 'K' : 39.098, 'CA' : 40.078,\ 104 | 'SC' : 44.956, 'TI' : 47.867, 'V' : 50.942, 'CR' : 51.996,\ 105 | 'MN' : 54.938, 'FE' : 55.845, 'CO' : 58.933, 'NI' : 58.693,\ 106 | 'CU' : 63.546, 'ZN' : 65.38, 'Ga' : [65.602, 15.458, 2.581, 0.351], 'Ge' : [55.89, 14.39, 2.45, 0.342],\ 107 | 'As' : [45.718, 12.817, 2.280, 0.328], 'SE' : 78.971, 'BR' : 79.904, 'KR' : 84.798,\ 108 | 'RB' : 84.468, 'SR' : 87.62, 'Y' : 88.906, 'ZR' : 91.224,\ 109 | 'NB' : 92.906, 'MO' : 95.95, 'TC' : 98.907, 'RU' : 101.07,\ 110 | 'RH' : 102.906, 'PD' : 106.42, 'AG' : 107.868, 'CD' : 112.414,\ 111 | 'IN' : 114.818, 'SN' : 118.711, 'SB' : 121.760, 'TE' : 126.7,\ 112 | 'I' : 126.904, 'XE' : 131.294, 'CS' : 132.905, 'BA' : 137.328,\ 113 | 'LA' : 138.905, 'CE' : 140.116, 'PR' : 140.908, 'ND' : 144.243,\ 114 | 'PM' : 144.913, 'SM' : 150.36, 'EU' : 151.964, 'GD' : 157.25,\ 115 | 'TB' : 158.925, 'DY': 162.500, 'HO' : 164.930, 'ER' : 167.259,\ 116 | 'TM' : 168.934, 'YB' : 173.055, 'LU' : 174.967, 'HF' : 178.49,\ 117 | 'TA' : 180.948, 'W' : 183.84, 'RE' : 186.207, 'OS' : 190.23,\ 118 | 'IR' : 192.217, 'PT' : 195.085, 'AU' : 196.967, 'HG' : 200.592,\ 119 | 'TL' : 204.383, 'PB' : 207.2, 'BI' : 208.980, 'PO' : 208.982,\ 120 | 'AT' : 209.987, 'RN' : 222.081, 'FR' : 223.020, 'RA' : 226.025,\ 121 | 'AC' : 227.028, 'TH' : 232.038, 'PA' : 231.036, 'U' : 238.029,\ 122 | 'NP' : 237, 'PU' : 244, 'AM' : 243, 'CM' : 247, 'BK' : 247,\ 123 | 'CT' : 251, 'ES' : 252, 'FM' : 257, 'MD' : 258, 'NO' : 259,\ 124 | 'LR' : 262, 'RF' : 261, 'DB' : 262, 'SG' : 266, 'BH' : 264,\ 125 | 'HS' : 269, 'MT' : 268, 'DS' : 271, 'RG' : 272, 'CN' : 285,\ 126 | 'NH' : 284, 'FL' : 289, 'MC' : 288, 'LV' : 292, 'TS' : 294,\ 127 | 'OG' : 294} 128 | 129 | SCATTER_PAR_C = {'H' : 1.008,'HE' : 4.003, 'LI' : 6.941, 'BE' : 9.012,\ 130 | 'B' : -0.1932, 'C' : 12.011, 'N' : 14.007, 'O' : 15.999,\ 131 | 'F' : 18.998, 'NE' : 20.180, 'NA' : 22.990, 'Mg' : 0.8584,\ 132 | 'AL' : 26.982, 'Si' : 12.011, 'P' : 30.974, 'S' : 32.066,\ 133 | 'CL' : 35.453, 'AR' : 39.948, 'K' : 39.098, 'CA' : 40.078,\ 134 | 'SC' : 44.956, 'TI' : 47.867, 'V' : 50.942, 'CR' : 51.996,\ 135 | 'MN' : 54.938, 'FE' : 55.845, 'CO' : 58.933, 'NI' : 58.693,\ 136 | 'CU' : 63.546, 'ZN' : 65.38, 'GA' : 69.723, 'GE' : 72.631,\ 137 | 'AS' : 74.922, 'SE' : 78.971, 'BR' : 79.904, 'KR' : 84.798,\ 138 | 'RB' : 84.468, 'SR' : 87.62, 'Y' : 88.906, 'ZR' : 91.224,\ 139 | 'NB' : 92.906, 'MO' : 95.95, 'TC' : 98.907, 'RU' : 101.07,\ 140 | 'RH' : 102.906, 'PD' : 106.42, 'AG' : 107.868, 'CD' : 112.414,\ 141 | 'IN' : 114.818, 'SN' : 118.711, 'SB' : 121.760, 'TE' : 126.7,\ 142 | 'I' : 126.904, 'XE' : 131.294, 'CS' : 132.905, 'BA' : 137.328,\ 143 | 'LA' : 138.905, 'CE' : 140.116, 'PR' : 140.908, 'ND' : 144.243,\ 144 | 'PM' : 144.913, 'SM' : 150.36, 'EU' : 151.964, 'GD' : 157.25,\ 145 | 'TB' : 158.925, 'DY': 162.500, 'HO' : 164.930, 'ER' : 167.259,\ 146 | 'TM' : 168.934, 'YB' : 173.055, 'LU' : 174.967, 'HF' : 178.49,\ 147 | 'TA' : 180.948, 'W' : 183.84, 'RE' : 186.207, 'OS' : 190.23,\ 148 | 'IR' : 192.217, 'PT' : 195.085, 'AU' : 196.967, 'HG' : 200.592,\ 149 | 'TL' : 204.383, 'PB' : 207.2, 'BI' : 208.980, 'PO' : 208.982,\ 150 | 'AT' : 209.987, 'RN' : 222.081, 'FR' : 223.020, 'RA' : 226.025,\ 151 | 'AC' : 227.028, 'TH' : 232.038, 'PA' : 231.036, 'U' : 238.029,\ 152 | 'NP' : 237, 'PU' : 244, 'AM' : 243, 'CM' : 247, 'BK' : 247,\ 153 | 'CT' : 251, 'ES' : 252, 'FM' : 257, 'MD' : 258, 'NO' : 259,\ 154 | 'LR' : 262, 'RF' : 261, 'DB' : 262, 'SG' : 266, 'BH' : 264,\ 155 | 'HS' : 269, 'MT' : 268, 'DS' : 271, 'RG' : 272, 'CN' : 285,\ 156 | 'NH' : 284, 'FL' : 289, 'MC' : 288, 'LV' : 292, 'TS' : 294,\ 157 | 'OG' : 294} 158 | -------------------------------------------------------------------------------- /topophonon/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8*- 2 | """ 3 | Created on Fri Jun 30 14:02:07 2023 4 | 5 | @author: zhuhe 6 | """ 7 | 8 | # Some help functions 9 | 10 | 11 | import numpy as np 12 | 13 | from typing import List, Union 14 | 15 | 16 | def _direct_to_cartesian(coord: np.ndarray, 17 | lat: np.ndarray) -> np.ndarray : 18 | """ 19 | convert a direct coordinate to a cartesian coordinate 20 | 21 | """ 22 | return np.dot(coord, lat) 23 | 24 | 25 | def _cartesian_to_direct(coord: np.ndarray, 26 | lat: np.ndarray) -> np.ndarray : 27 | """ 28 | convert a cartesian coordinate to a direct coordinate 29 | 30 | """ 31 | return np.dot(coord, np.linalg.inv(lat)) 32 | 33 | 34 | def _convert_pair_to_str(index_prm_1: int, 35 | index_prm_2: int, 36 | lattice_vec: Union[List[int], np.ndarray] 37 | ) -> str: 38 | """ 39 | hash the atomic a pair by converting the information to a string 40 | 41 | """ 42 | temp = str(index_prm_1) + str(index_prm_2) 43 | for x in lattice_vec: 44 | temp += str(int(x)) 45 | return temp 46 | 47 | 48 | def _cartesian_to_direct(coord: np.ndarray, 49 | lat: np.ndarray): 50 | """ 51 | convert a cartesian coordinate to a direct coordinate 52 | 53 | """ 54 | return np.dot(coord, np.linalg.inv(lat)) 55 | 56 | 57 | def _modify_freq(eig_vals: np.ndarray): 58 | """ 59 | convert the imaginary numbers to negative numbers 60 | 61 | """ 62 | for j, eig_val in enumerate(eig_vals): 63 | if eig_val >= 0: 64 | eig_vals[j] = np.sqrt(eig_val) 65 | else: 66 | eig_vals[j] = -np.sqrt(-eig_val) 67 | 68 | 69 | def _set_ylabel(unit: str) -> str: 70 | """ 71 | determine the ylabel of the plot based on unit specified 72 | 73 | """ 74 | 75 | if isinstance(unit, str): 76 | return "Frequency ({})".format(unit) 77 | return "Frequency" 78 | 79 | 80 | def _coth(x: float) -> float: 81 | return (np.exp(2*x) + 1) / (np.exp(2*x) - 1) 82 | 83 | 84 | def _make_k_grid(xy_range, 85 | num): 86 | """ 87 | make a 2d k_grid; num points along each axis, between [-xy_range, xr_range] 88 | """ 89 | interval = xy_range/num 90 | a = np.arange(-xy_range, xy_range+interval, interval) 91 | kx,ky = np.meshgrid(a,a) 92 | return kx, ky 93 | --------------------------------------------------------------------------------