├── LICENSE
├── README.md
├── demo
├── DNA_sequence.txt
├── NAFlex_params.txt
├── in.run
└── nucl.txt
├── lammps_custom_src
├── Makefile.DNA_mpi
├── bond_harmonic_DNA.cpp
├── bond_harmonic_DNA.h
├── fix_langevin.cpp
├── fix_langevin.h
├── hremd_steve.cpp
├── hremd_steve.h
├── neighbor.cpp
├── neighbor.h
├── pair_aniso.cpp
├── pair_aniso.h
├── pair_ljlambda.cpp
└── pair_ljlambda.h
└── main_simulations
└── input_scripts
├── chemically_specific_12N_165NRL_HREMD
├── DNA_sequence.txt
├── NAFlex_params.txt
├── in.hremd_breathing
├── in.hremd_nonbreathing
├── nucl_b.txt
└── nucl_nonb.txt
└── minimal_coexistence
├── DNA_sequence.txt
├── NAFlex_params.txt
├── data_b.txt
├── data_nonb.txt
└── in.run
/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 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Source code for "Nucleosome plasticity is a critical element of chromatin liquid–liquid phase separation and multivalent nucleosome interactions"
2 |
3 | We are delighted to share our model with the community. Please use it freely and cite our paper DOI:XXX (Preprint: https://doi.org/10.1101/2020.11.23.391599 ) .
4 | We are happy to answer any questions and comments by email (rc597@cam.ac.uk), and welcome contributions for any updates.
5 |
6 |
7 |
8 |
9 | # System requirements
10 |
11 | Linux with C++ compilers with MPI.
12 | Tested on: CSD3 peta-4 cluster (https://www.hpc.cam.ac.uk/systems/peta-4) with Intel 2017 compliers
13 |
14 |
15 | # Installation guide
16 |
17 | ## To compile LAMMPS with our custom code
18 |
19 | 1. clone a copy of LAMMPS
20 | > git clone https://github.com/lammps/lammps.git
21 |
22 | 2. checkout stable version 3rd March 2020
23 | > cd lammps
24 | > git checkout tags/stable_3Mar2020 -b stable
25 |
26 | 3. copy all our code from lammps_custom_code into lammps/src
27 |
28 | 4. move Makefile_DNA_mpi from lammps/src into lammps/src/MAKE
29 |
30 | 5. Install required lammps packages
31 | >make yes-asphere
32 | >make yes-rigid
33 | >make yes-molecule
34 |
35 | 6. compile using our makefile, note this is for Intel compilers only
36 | >make DNA_mpi
37 |
38 | 7. the executable will be lmp_DNA_mpi
39 |
40 | # Demo
41 | ## To run a single nucleosome system:
42 | 1. move to the "demo" directory
43 |
44 | 2. run with lammps
45 | >mpirun -np 1 ./lmp_DNA_mpi -in in.run
46 |
47 | It will produce a LAMMPS trajectory file "dna.dump" this can be viewed in Ovito (https://www.ovito.org/)
48 |
49 | Visible molecular dynamics will be observable after a few minutes runtime on a single core.
50 |
51 | # Instructions to reproduce results
52 | ## To run chemically-specific 12N chromatin HREMD simulations:
53 |
54 | 1. The files are in main_simulations/input_scripts/chemically_specific_12N_165NRL_HREMD. The lammps input scripts are in.hremd_breathing and in.hremd_nonbreathing
55 |
56 | 2. run lammps using at least 16 cores
57 | >mpirun -np 16 ./lmp_DNA_mpi -partition 16x1 -in in.hremd_breathing
58 |
59 | These simulations for both breathing and non-breathing will generate the trajectories for our main results in figures 3 and 4.
60 |
61 |
62 | ## To run minimal model coexistence simulation:
63 |
64 | 1. The files are in main_simulations/input_scripts/minimal_coexistence/
65 |
66 | 2. to run a coexistence simulation:
67 | >mpirun -np 16 ./lmp_DNA_mpi -in in.run
68 |
69 | 3. to reproduce the phase diagram (Figure 6) one would need to vary the parameters E1 and A in the input script. These correspond to the variables E and S respectively in table 5 of the supporting info. Additionally the breathing and non-breathing structures can be used by changing which data file is read in ("data_nonb.txt" or "data_b.txt").
70 |
--------------------------------------------------------------------------------
/demo/DNA_sequence.txt:
--------------------------------------------------------------------------------
1 | # 211
2 | 975 GC
3 | 978 TA
4 | 981 TA
5 | 984 AT
6 | 987 CG
7 | 990 AT
8 | 993 TA
9 | 996 CG
10 | 999 CG
11 | 1002 TA
12 | 1005 GC
13 | 1008 TA
14 | 1011 GC
15 | 1014 CG
16 | 1017 AT
17 | 1020 TA
18 | 1023 GC
19 | 1026 TA
20 | 1029 AT
21 | 1032 AT
22 | 1035 GC
23 | 1038 TA
24 | 1041 AT
25 | 1044 CG
26 | 1047 TA
27 | 1050 TA
28 | 1053 AT
29 | 1056 CG
30 | 1059 AT
31 | 1062 TA
32 | 1065 GC
33 | 1068 CG
34 | 1071 AT
35 | 1074 CG
36 | 1077 AT
37 | 1080 GC
38 | 1083 GC
39 | 1086 AT
40 | 1089 TA
41 | 1092 GC
42 | 1095 TA
43 | 1098 AT
44 | 1101 AT
45 | 1104 CG
46 | 1107 CG
47 | 1110 TA
48 | 1113 GC
49 | 1116 CG
50 | 1119 AT
51 | 1122 GC
52 | 1125 AT
53 | 1128 TA
54 | 1131 AT
55 | 1134 CG
56 | 1137 TA
57 | 1140 AT
58 | 1143 CG
59 | 1146 CG
60 | 1149 AT
61 | 1152 AT
62 | 1155 AT
63 | 1158 AT
64 | 1161 GC
65 | 1164 TA
66 | 1167 GC
67 | 1170 TA
68 | 1173 AT
69 | 1176 TA
70 | 1179 TA
71 | 1182 TA
72 | 1185 GC
73 | 1188 GC
74 | 1191 AT
75 | 1194 AT
76 | 1197 AT
77 | 1200 CG
78 | 1203 TA
79 | 1206 GC
80 | 1209 CG
81 | 1212 TA
82 | 1215 CG
83 | 1218 CG
84 | 1221 AT
85 | 1224 TA
86 | 1227 CG
87 | 1230 AT
88 | 1233 AT
89 | 1236 AT
90 | 1239 AT
91 | 1242 GC
92 | 1245 GC
93 | 1248 CG
94 | 1251 AT
95 | 1254 TA
96 | 1257 GC
97 | 1260 TA
98 | 1263 TA
99 | 1266 CG
100 | 1269 AT
101 | 1272 GC
102 | 1275 CG
103 | 1278 TA
104 | 1281 GC
105 | 1284 GC
106 | 1287 AT
107 | 1290 TA
108 | 1293 TA
109 | 1296 CG
110 | 1299 CG
111 | 1302 AT
112 | 1305 GC
113 | 1308 CG
114 | 1311 TA
115 | 1314 GC
116 | 1317 AT
117 | 1320 AT
118 | 1323 CG
119 | 1326 AT
120 | 1329 TA
121 | 1332 GC
122 | 1335 CG
123 | 1338 CG
124 | 1341 TA
125 | 1344 TA
126 | 1347 TA
127 | 1350 TA
128 | 1353 GC
129 | 1356 AT
130 | 1359 TA
131 | 1362 GC
132 | 1365 GC
133 | 1368 AT
134 | 1371 GC
135 | 1374 CG
136 | 1377 AT
137 | 1380 GC
138 | 1383 TA
139 | 1386 TA
140 | 1389 TA
141 | 1392 CG
142 | 1395 CG
143 | 1398 AT
144 | 1401 AT
145 | 1404 AT
146 | 1407 TA
147 | 1410 AT
148 | 1413 CG
149 | 1416 AT
150 | 1419 CG
151 | 1422 TA
152 | 1425 TA
153 | 1428 TA
154 | 1431 TA
155 | 1434 GC
156 | 1437 GC
157 | 1440 TA
158 | 1443 AT
159 | 1446 GC
160 | 1449 TA
161 | 1452 AT
162 | 1455 TA
163 | 1458 CG
164 | 1461 TA
165 | 1464 GC
166 | 1467 CG
167 | 1470 AT
168 | 1473 GC
169 | 1476 GC
170 | 1479 TA
171 | 1482 GC
172 | 1485 AT
173 | 1488 TA
174 | 1491 TA
175 | 1494 CG
176 | 1497 TA
177 | 1500 CG
178 | 1503 CG
179 | 1506 AT
180 | 1509 GC
181 | 1512 GC
182 | 1515 GC
183 | 1518 CG
184 | 1521 GC
185 | 1524 GC
186 | 1527 CG
187 | 1530 CG
188 | 1533 AT
189 | 1536 GC
190 | 1539 TA
191 | 1542 AT
192 | 1545 CG
193 | 1548 TA
194 | 1551 TA
195 | 1554 AT
196 | 1557 CG
197 | 1560 AT
198 | 1563 TA
199 | 1566 GC
200 | 1569 CG
201 | 1572 AT
202 | 1575 CG
203 | 1578 AT
204 | 1581 GC
205 | 1584 GC
206 | 1587 AT
207 | 1590 TA
208 | 1593 GC
209 | 1596 TA
210 | 1599 AT
211 | 1602 AT
212 | 1605 CG
213 |
--------------------------------------------------------------------------------
/demo/NAFlex_params.txt:
--------------------------------------------------------------------------------
1 | Step Shift Slide Rise Tilt Roll Twist
2 |
3 | AA_TT
4 | -0.3 -0.3 3.3 -2.6 0.3 35.4
5 |
6 | 1.72017 0.19796 0.32533 -0.01249 0.00576 0.05913
7 | 0.19797 2.12618 0.75074 -0.00581 -0.05309 -0.10162
8 | 0.32534 0.75074 7.64359 -0.18348 -0.04547 -0.1485
9 | -0.01249 -0.00581 -0.18349 0.03738 0.00211 0.00597
10 | 0.00576 -0.05309 -0.04547 0.00211 0.01961 0.00742
11 | 0.05913 -0.10162 -0.1485 0.00597 0.00742 0.02761
12 |
13 | AC_GT
14 | 0.1 -0.6 3.3 -0.7 -0.6 32
15 |
16 | 1.28288 0.13127 0.29502 -0.0278 0.00302 0.03646
17 | 0.13127 2.97699 2.10518 -0.0228 0.03038 -0.10881
18 | 0.29502 2.10518 8.83137 0.04907 0.10478 -0.14741
19 | -0.0278 -0.0228 0.04907 0.03776 0.00378 0.00418
20 | 0.00302 0.03038 0.10479 0.00378 0.02306 0.00708
21 | 0.03646 -0.10881 -0.14742 0.00418 0.00708 0.03551
22 |
23 | AG_CT
24 | -0.4 -0.6 3.4 -2.5 3.1 33.5
25 |
26 | 1.3999 0.27887 0.27572 -0.03917 0.0208 0.07408
27 | 0.27887 1.78493 0.99427 -0.00395 -0.01181 -0.06894
28 | 0.27572 0.99427 7.0413 -0.15259 -0.02113 -0.14069
29 | -0.03917 -0.00395 -0.15259 0.03699 0.0041 0.0063
30 | 0.0208 -0.01181 -0.02113 0.0041 0.01912 0.005
31 | 0.07408 -0.06894 -0.14069 0.0063 0.005 0.02797
32 |
33 | AT_AT
34 | 0 -0.8 3.3 0 -0.5 30.4
35 |
36 | 1.04661 0 0 0.03066 0 0
37 | 0 3.76524 2.16877 0 -0.03029 -0.04352
38 | 0 2.16877 9.33735 0 0.06011 -0.09916
39 | 0.03066 0 0 0.03494 0 0
40 | 0 -0.03029 0.06011 0 0.02157 0.00877
41 | 0 -0.04352 -0.09916 0 0.00877 0.03122
42 |
43 | CA_TG
44 | -0.2 -0.2 3.1 0.2 10.3 29.6
45 |
46 | 1.05328 0.07552 0.23196 -0.03375 0.00158 -0.01277
47 | 0.07552 1.79677 0.52999 -0.00472 0.02114 -0.03759
48 | 0.23197 0.53 6.30474 0.01221 -0.07708 -0.144
49 | -0.03375 -0.00472 0.01221 0.02498 -0.00127 0.00137
50 | 0.00158 0.02114 -0.07708 -0.00127 0.01647 0.00541
51 | -0.01277 -0.03759 -0.14399 0.00137 0.00541 0.01534
52 |
53 | CC_GG
54 | 0.2 -0.7 3.5 0 4.9 32.7
55 |
56 | 1.43205 -0.29768 -0.35747 -0.08468 -0.01448 -0.03982
57 | -0.29768 1.5731 1.18241 -0.00677 0.01068 -0.09303
58 | -0.35748 1.18243 7.85985 0.25771 0.00156 -0.11971
59 | -0.08468 -0.00677 0.25771 0.04202 0.00134 0.00022
60 | -0.01448 0.01068 0.00156 0.00134 0.02012 0.00493
61 | -0.03982 -0.09303 -0.1197 0.00022 0.00493 0.02602
62 |
63 | CG_CG
64 | 0 0 3.1 0 9.3 29.8
65 |
66 | 1.05459 0 0 -0.07841 0 0
67 | 0 1.91048 0.56341 0 0.02388 -0.05037
68 | 0 0.56342 6.11191 0 -0.04625 -0.14832
69 | -0.07841 0 0 0.02587 0 0
70 | 0 0.02388 -0.04625 0 0.01562 0.00319
71 | 0 -0.05037 -0.14832 0 0.00319 0.014
72 |
73 | CT_AG
74 | 0.4 -0.6 3.4 2.5 3.1 33.5
75 |
76 | 1.3999 -0.27887 -0.27572 -0.03917 -0.0208 -0.07408
77 | -0.27887 1.78493 0.99427 0.00395 -0.01181 -0.06894
78 | -0.27572 0.99427 7.0413 0.15259 -0.02113 -0.14069
79 | -0.03917 0.00395 0.15259 0.03699 -0.0041 -0.0063
80 | -0.0208 -0.01181 -0.02113 -0.0041 0.01912 0.005
81 | -0.07408 -0.06894 -0.14069 -0.0063 0.005 0.02797
82 |
83 | GA_TC
84 | -0.4 -0.3 3.4 -1.6 1.6 36.6
85 |
86 | 1.31766 0.29517 0.40655 -0.04665 0.00977 0.01782
87 | 0.29517 1.87898 1.00952 0.00116 -0.01328 -0.09736
88 | 0.40656 1.00952 8.48201 -0.25663 -0.01013 -0.12376
89 | -0.04665 0.00116 -0.25663 0.03758 -0.00252 0.00117
90 | 0.00977 -0.01328 -0.01012 -0.00252 0.02025 0.00861
91 | 0.01782 -0.09736 -0.12376 0.00117 0.00861 0.02441
92 |
93 | GC_GC
94 | 0 -0.4 3.5 0 -1.3 35.7
95 |
96 | 1.179 0 0 -0.08357 0 0
97 | 0 2.58821 2.05067 0 0.08753 -0.07364
98 | 0 2.05063 9.46559 0 0.1572 -0.18431
99 | -0.08357 0 0 0.03618 0 0
100 | 0 0.08753 0.1572 0 0.02569 0.00442
101 | 0 -0.07364 -0.18431 0 0.00442 0.02238
102 |
103 | GG_CC
104 | -0.2 -0.7 3.5 0 4.9 32.7
105 |
106 | 1.43205 0.29768 0.35747 -0.08468 0.01448 0.03982
107 | 0.29768 1.5731 1.18241 0.00677 0.01068 -0.09303
108 | 0.35748 1.18243 7.85985 -0.25771 0.00156 -0.11971
109 | -0.08468 0.00677 -0.25771 0.04202 -0.00134 -0.00022
110 | 0.01448 0.01068 0.00156 -0.00134 0.02012 0.00493
111 | 0.03982 -0.09303 -0.1197 -0.00022 0.00493 0.02602
112 |
113 | GT_AC
114 | -0.1 -0.6 3.3 0.7 -0.6 32
115 |
116 | 1.28288 -0.13127 -0.29502 -0.0278 -0.00302 -0.03646
117 | -0.13127 2.97699 2.10518 0.0228 0.03038 -0.10881
118 | -0.29502 2.10518 8.83137 -0.04907 0.10478 -0.14741
119 | -0.0278 0.0228 -0.04907 0.03776 -0.00378 -0.00418
120 | -0.00302 0.03038 0.10479 -0.00378 0.02306 0.00708
121 | -0.03646 -0.10881 -0.14742 -0.00418 0.00708 0.03551
122 |
123 | TA_TA
124 | 0 -0.2 3.2 0 10 28.9
125 |
126 | 0.64315 0 0 -0.01544 0 0
127 | 0 1.24864 0.53653 0 0.02038 -0.04224
128 | 0 0.53653 6.07971 0 -0.07916 -0.14834
129 | -0.01544 0 0 0.019 0 0
130 | 0 0.02038 -0.07916 0 0.01464 0.00831
131 | 0 -0.04224 -0.14835 0 0.00831 0.01759
132 |
133 | TC_GA
134 | 0.4 -0.3 3.4 1.6 1.6 36.6
135 |
136 | 1.31766 -0.29517 -0.40655 -0.04665 -0.00977 -0.01782
137 | -0.29517 1.87898 1.00952 -0.00116 -0.01328 -0.09736
138 | -0.40656 1.00952 8.48201 0.25663 -0.01013 -0.12376
139 | -0.04665 -0.00116 0.25663 0.03758 0.00252 -0.00117
140 | -0.00977 -0.01328 -0.01012 0.00252 0.02025 0.00861
141 | -0.01782 -0.09736 -0.12376 -0.00117 0.00861 0.02441
142 |
143 | TG_CA
144 | 0.2 -0.2 3.1 -0.2 10.3 29.6
145 |
146 | 1.05328 -0.07552 -0.23196 -0.03375 -0.00158 0.01277
147 | -0.07552 1.79677 0.52999 0.00472 0.02114 -0.03759
148 | -0.23197 0.53 6.30474 -0.01221 -0.07708 -0.144
149 | -0.03375 0.00472 -0.01221 0.02498 0.00127 -0.00137
150 | -0.00158 0.02114 -0.07708 0.00127 0.01647 0.00541
151 | 0.01277 -0.03759 -0.14399 -0.00137 0.00541 0.01534
152 |
153 | TT_AA
154 | 0.3 -0.3 3.3 2.6 0.3 35.4
155 |
156 | 1.72017 -0.19796 -0.32533 -0.01249 -0.00576 -0.05913
157 | -0.19797 2.12618 0.75074 0.00581 -0.05309 -0.10162
158 | -0.32534 0.75074 7.64359 0.18348 -0.04547 -0.1485
159 | -0.01249 0.00581 0.18349 0.03738 -0.00211 -0.00597
160 | -0.00576 -0.05309 -0.04547 -0.00211 0.01961 0.00742
161 | -0.05913 -0.10162 -0.1485 -0.00597 0.00742 0.02761
162 |
--------------------------------------------------------------------------------
/lammps_custom_src/Makefile.DNA_mpi:
--------------------------------------------------------------------------------
1 | # mpi = MPI with its default compiler
2 |
3 | SHELL = /bin/sh
4 |
5 | # ---------------------------------------------------------------------
6 | # compiler/linker settings
7 | # specify flags and libraries needed for your compiler
8 |
9 | CC = mpicxx
10 | CCFLAGS = -g -O3 -Wextra -Wall -std=c++11 -restrict -xhost
11 | SHFLAGS = -fPIC
12 | DEPFLAGS = -M
13 |
14 | LINK = mpicxx
15 | LINKFLAGS = -g -O3 -Wextra -Wall -std=c++11 -restrict -xhost
16 | LIB =
17 | SIZE = size
18 |
19 | ARCHIVE = ar
20 | ARFLAGS = -rc
21 | SHLIBFLAGS = -shared
22 |
23 | # ---------------------------------------------------------------------
24 | # LAMMPS-specific settings, all OPTIONAL
25 | # specify settings for LAMMPS features you will use
26 | # if you change any -D setting, do full re-compile after "make clean"
27 |
28 | # LAMMPS ifdef settings
29 | # see possible settings in Section 2.2 (step 4) of manual
30 |
31 | LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64
32 |
33 | # MPI library
34 | # see discussion in Section 2.2 (step 5) of manual
35 | # MPI wrapper compiler/linker can provide this info
36 | # can point to dummy MPI library in src/STUBS as in Makefile.serial
37 | # use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
38 | # INC = path for mpi.h, MPI compiler settings
39 | # PATH = path for MPI library
40 | # LIB = name of MPI library
41 |
42 | MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
43 | MPI_PATH =
44 | MPI_LIB =
45 |
46 | # FFT library
47 | # see discussion in Section 2.2 (step 6) of manual
48 | # can be left blank to use provided KISS FFT library
49 | # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
50 | # PATH = path for FFT library
51 | # LIB = name of FFT library
52 |
53 | FFT_INC =
54 | FFT_PATH =
55 | FFT_LIB =
56 |
57 | # JPEG and/or PNG library
58 | # see discussion in Section 2.2 (step 7) of manual
59 | # only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
60 | # INC = path(s) for jpeglib.h and/or png.h
61 | # PATH = path(s) for JPEG library and/or PNG library
62 | # LIB = name(s) of JPEG library and/or PNG library
63 |
64 | JPG_INC =
65 | JPG_PATH =
66 | JPG_LIB =
67 |
68 | # ---------------------------------------------------------------------
69 | # build rules and dependencies
70 | # do not edit this section
71 |
72 | include Makefile.package.settings
73 | include Makefile.package
74 |
75 | EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
76 | EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
77 | EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
78 | EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
79 | EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
80 |
81 | # Path to src files
82 |
83 | vpath %.cpp ..
84 | vpath %.h ..
85 |
86 | # Link target
87 |
88 | $(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
89 | $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
90 | $(SIZE) $(EXE)
91 |
92 | # Library targets
93 |
94 | lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
95 | $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
96 |
97 | shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
98 | $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
99 | $(OBJ) $(EXTRA_LIB) $(LIB)
100 |
101 | # Compilation rules
102 |
103 | %.o:%.cpp
104 | $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
105 |
106 | # Individual dependencies
107 |
108 | depend : fastdep.exe $(SRC)
109 | @./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
110 |
111 | fastdep.exe: ../DEPEND/fastdep.c
112 | cc -O -o $@ $<
113 |
114 | sinclude .depend
115 |
--------------------------------------------------------------------------------
/lammps_custom_src/bond_harmonic_DNA.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 |
13 | DNA rigid basepair interaction, modified from bond_harmonic.h
14 | S.FARR 9/2018
15 | ------------------------------------------------------------------------- */
16 |
17 | /* ----------------------------------------------------------------------
18 | DNA rigid basepair interaction, modified from bond_harmonic.cpp
19 | S.FARR 2018
20 | ------------------------------------------------------------------------- */
21 |
22 |
23 | #ifdef BOND_CLASS
24 |
25 | BondStyle(harmonic/DNA,BondHarmonic_DNA)
26 |
27 | #else
28 |
29 | #ifndef LMP_BOND_HARMONIC_DNA_H
30 | #define LMP_BOND_HARMONIC_DNA_H
31 |
32 | #include
33 | #include "bond.h"
34 | #include "atom_vec_ellipsoid.h"
35 | #include
36 | #include
37 | #include
38 |
39 | // Conversion factor for helical paramters
40 | // They are in Kcal/mol/Angstrom which agree with lammps "real" units
41 | #define E_CONV_FACTOR_STEVE 1.0
42 |
43 | namespace LAMMPS_NS {
44 |
45 | class BondHarmonic_DNA : public Bond {
46 | public:
47 | BondHarmonic_DNA(class LAMMPS *);
48 | virtual ~BondHarmonic_DNA();
49 | virtual void compute(int, int);
50 | virtual void coeff(int, char **);
51 | double equilibrium_distance(int);
52 | void write_restart(FILE *);
53 | virtual void read_restart(FILE *);
54 | void write_data(FILE *);
55 | double single(int, double, int, int, double &);
56 | virtual void *extract(char *, int &);
57 | void init_style();
58 |
59 | protected:
60 | class AtomVecEllipsoid *avec;
61 |
62 | // The equilibrium values and stiffness matrices for each base-pair step
63 | // combination.
64 | struct helical_paramsstruct {
65 | double means[6];
66 | double K[6][6];
67 |
68 | //constructor and initialisation list
69 | helical_paramsstruct() : means{}, K{} {
70 | // required (empty) body of constructor
71 | }
72 | };
73 |
74 | // map linking bp step type to helical params
75 | std::unordered_map helical_params_map;
76 |
77 | // map linking global atom tag of DNA to its base_pairs
78 | std::unordered_map base_pairs;
79 |
80 | void get_helical_param_map(std::string fname);
81 | void get_basepairs(std::string fname);
82 |
83 | double compute_bond_energy(const double * x1, double * q1, const double * x2, double * q2,struct helical_paramsstruct * helical_params);
84 | double *k,*r0;
85 |
86 | virtual void allocate();
87 |
88 | // math functions
89 |
90 | double arcos(double x);
91 | double vec_dot_mat_dot_vec(const double * vec, double mat[6][6]);
92 | void rotation(const double *x, double *y, double *axis, double angle);
93 | void compute_helical_parameters(const double * x1, const double * ex1_in, const double * ey1_in, const double * ez1_in, const double * x2, const double * ex2_in, const double * ey2_in,const double * ez2_in, double * out,double * mstx_out, double * msty_out, double * mstz_out);
94 | double mag_vec(const double * v);
95 |
96 | };
97 |
98 | }
99 |
100 | #endif
101 | #endif
102 |
103 | /* ERROR/WARNING messages:
104 |
105 | E: Incorrect args for bond coefficients
106 |
107 | Self-explanatory. Check the input script or data file.
108 |
109 | */
110 |
--------------------------------------------------------------------------------
/lammps_custom_src/fix_langevin.cpp:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | /* ----------------------------------------------------------------------
15 | Contributing authors: Carolyn Phillips (U Mich), reservoir energy tally
16 | Aidan Thompson (SNL) GJF formulation
17 | ------------------------------------------------------------------------- */
18 |
19 | #include "fix_langevin.h"
20 | #include
21 | #include
22 | #include
23 | #include "math_extra.h"
24 | #include "atom.h"
25 | #include "atom_vec_ellipsoid.h"
26 | #include "force.h"
27 | #include "update.h"
28 | #include "modify.h"
29 | #include "compute.h"
30 | #include "respa.h"
31 | #include "comm.h"
32 | #include "input.h"
33 | #include "variable.h"
34 | #include "random_mars.h"
35 | #include "memory.h"
36 | #include "error.h"
37 | #include "group.h"
38 |
39 | using namespace LAMMPS_NS;
40 | using namespace FixConst;
41 |
42 | enum{NOBIAS,BIAS};
43 | enum{CONSTANT,EQUAL,ATOM};
44 |
45 | #define SINERTIA 0.4 // moment of inertia prefactor for sphere
46 | #define EINERTIA 0.2 // moment of inertia prefactor for ellipsoid
47 |
48 | /* ---------------------------------------------------------------------- */
49 |
50 | FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) :
51 | Fix(lmp, narg, arg),
52 | gjfflag(0), gfactor1(NULL), gfactor2(NULL), ratio(NULL), tstr(NULL),
53 | flangevin(NULL), tforce(NULL), franprev(NULL), id_temp(NULL), random(NULL)
54 | {
55 | if (narg < 7) error->all(FLERR,"Illegal fix langevin command");
56 |
57 | dynamic_group_allow = 1;
58 | scalar_flag = 1;
59 | global_freq = 1;
60 | extscalar = 1;
61 | nevery = 1;
62 |
63 | if (strstr(arg[3],"v_") == arg[3]) {
64 | int n = strlen(&arg[3][2]) + 1;
65 | tstr = new char[n];
66 | strcpy(tstr,&arg[3][2]);
67 | } else {
68 | t_start = force->numeric(FLERR,arg[3]);
69 | t_target = t_start;
70 | tstyle = CONSTANT;
71 | }
72 |
73 | t_stop = force->numeric(FLERR,arg[4]);
74 | t_period = force->numeric(FLERR,arg[5]);
75 | seed = force->inumeric(FLERR,arg[6]);
76 |
77 | if (t_period <= 0.0) error->all(FLERR,"Fix langevin period must be > 0.0");
78 | if (seed <= 0) error->all(FLERR,"Illegal fix langevin command");
79 |
80 | // initialize Marsaglia RNG with processor-unique seed
81 |
82 | random = new RanMars(lmp,seed + comm->me);
83 |
84 | // allocate per-type arrays for force prefactors
85 |
86 | gfactor1 = new double[atom->ntypes+1];
87 | gfactor2 = new double[atom->ntypes+1];
88 | ratio = new double[atom->ntypes+1];
89 |
90 | // optional args
91 |
92 | for (int i = 1; i <= atom->ntypes; i++) ratio[i] = 1.0;
93 | ascale = 0.0;
94 | gjfflag = 0;
95 | oflag = 0;
96 | tallyflag = 0;
97 | zeroflag = 0;
98 |
99 | int iarg = 7;
100 | while (iarg < narg) {
101 | if (strcmp(arg[iarg],"angmom") == 0) {
102 | if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command");
103 | if (strcmp(arg[iarg+1],"no") == 0) ascale = 0.0;
104 | else ascale = force->numeric(FLERR,arg[iarg+1]);
105 | iarg += 2;
106 | } else if (strcmp(arg[iarg],"gjf") == 0) {
107 | if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command");
108 | if (strcmp(arg[iarg+1],"no") == 0) gjfflag = 0;
109 | else if (strcmp(arg[iarg+1],"yes") == 0) gjfflag = 1;
110 | else error->all(FLERR,"Illegal fix langevin command");
111 | iarg += 2;
112 | } else if (strcmp(arg[iarg],"omega") == 0) {
113 | if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command");
114 | if (strcmp(arg[iarg+1],"no") == 0) oflag = 0;
115 | else if (strcmp(arg[iarg+1],"yes") == 0) oflag = 1;
116 | else error->all(FLERR,"Illegal fix langevin command");
117 | iarg += 2;
118 | } else if (strcmp(arg[iarg],"scale") == 0) {
119 | if (iarg+3 > narg) error->all(FLERR,"Illegal fix langevin command");
120 | int itype = force->inumeric(FLERR,arg[iarg+1]);
121 | double scale = force->numeric(FLERR,arg[iarg+2]);
122 | if (itype <= 0 || itype > atom->ntypes)
123 | error->all(FLERR,"Illegal fix langevin command");
124 | ratio[itype] = scale;
125 | iarg += 3;
126 | } else if (strcmp(arg[iarg],"tally") == 0) {
127 | if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command");
128 | if (strcmp(arg[iarg+1],"no") == 0) tallyflag = 0;
129 | else if (strcmp(arg[iarg+1],"yes") == 0) tallyflag = 1;
130 | else error->all(FLERR,"Illegal fix langevin command");
131 | iarg += 2;
132 | } else if (strcmp(arg[iarg],"zero") == 0) {
133 | if (iarg+2 > narg) error->all(FLERR,"Illegal fix langevin command");
134 | if (strcmp(arg[iarg+1],"no") == 0) zeroflag = 0;
135 | else if (strcmp(arg[iarg+1],"yes") == 0) zeroflag = 1;
136 | else error->all(FLERR,"Illegal fix langevin command");
137 | iarg += 2;
138 | } else error->all(FLERR,"Illegal fix langevin command");
139 | }
140 |
141 | // set temperature = NULL, user can override via fix_modify if wants bias
142 |
143 | id_temp = NULL;
144 | temperature = NULL;
145 |
146 | energy = 0.0;
147 |
148 | // flangevin is unallocated until first call to setup()
149 | // compute_scalar checks for this and returns 0.0
150 | // if flangevin_allocated is not set
151 |
152 | flangevin = NULL;
153 | flangevin_allocated = 0;
154 | franprev = NULL;
155 | tforce = NULL;
156 | maxatom1 = maxatom2 = 0;
157 |
158 | // setup atom-based array for franprev
159 | // register with Atom class
160 | // no need to set peratom_flag, b/c data is for internal use only
161 |
162 | if (gjfflag) {
163 | nvalues = 3;
164 | grow_arrays(atom->nmax);
165 | atom->add_callback(0);
166 |
167 | // initialize franprev to zero
168 |
169 | int nlocal = atom->nlocal;
170 | for (int i = 0; i < nlocal; i++) {
171 | franprev[i][0] = 0.0;
172 | franprev[i][1] = 0.0;
173 | franprev[i][2] = 0.0;
174 | }
175 | }
176 |
177 | }
178 |
179 | /* ---------------------------------------------------------------------- */
180 |
181 | FixLangevin::~FixLangevin()
182 | {
183 | delete random;
184 | delete [] tstr;
185 | delete [] gfactor1;
186 | delete [] gfactor2;
187 | delete [] ratio;
188 | delete [] id_temp;
189 | memory->destroy(flangevin);
190 | memory->destroy(tforce);
191 |
192 | if (gjfflag) {
193 | memory->destroy(franprev);
194 | atom->delete_callback(id,0);
195 | }
196 | }
197 |
198 | /* ---------------------------------------------------------------------- */
199 |
200 | int FixLangevin::setmask()
201 | {
202 | int mask = 0;
203 | mask |= POST_FORCE;
204 | mask |= POST_FORCE_RESPA;
205 | mask |= END_OF_STEP;
206 | mask |= THERMO_ENERGY;
207 | return mask;
208 | }
209 |
210 | /* ---------------------------------------------------------------------- */
211 |
212 | void FixLangevin::init()
213 | {
214 | if (oflag && !atom->sphere_flag)
215 | error->all(FLERR,"Fix langevin omega requires atom style sphere");
216 | if (ascale && !atom->ellipsoid_flag)
217 | error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid");
218 |
219 | // check variable
220 |
221 | if (tstr) {
222 | tvar = input->variable->find(tstr);
223 | if (tvar < 0)
224 | error->all(FLERR,"Variable name for fix langevin does not exist");
225 | if (input->variable->equalstyle(tvar)) tstyle = EQUAL;
226 | else if (input->variable->atomstyle(tvar)) tstyle = ATOM;
227 | else error->all(FLERR,"Variable for fix langevin is invalid style");
228 | }
229 |
230 | // if oflag or ascale set, check that all group particles are finite-size
231 |
232 | if (oflag) {
233 | double *radius = atom->radius;
234 | int *mask = atom->mask;
235 | int nlocal = atom->nlocal;
236 |
237 | for (int i = 0; i < nlocal; i++)
238 | if (mask[i] & groupbit)
239 | if (radius[i] == 0.0)
240 | error->one(FLERR,"Fix langevin omega requires extended particles");
241 | }
242 |
243 | if (ascale) {
244 | avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
245 | if (!avec)
246 | error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid");
247 |
248 | int *ellipsoid = atom->ellipsoid;
249 | int *mask = atom->mask;
250 | int nlocal = atom->nlocal;
251 |
252 | for (int i = 0; i < nlocal; i++)
253 | if (mask[i] & groupbit)
254 | if (ellipsoid[i] < 0)
255 | error->one(FLERR,"Fix langevin angmom requires extended particles");
256 | }
257 |
258 | // set force prefactors
259 |
260 | if (!atom->rmass) {
261 | for (int i = 1; i <= atom->ntypes; i++) {
262 | gfactor1[i] = -atom->mass[i] / t_period / force->ftm2v;
263 | gfactor2[i] = sqrt(atom->mass[i]) *
264 | sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) /
265 | force->ftm2v;
266 | gfactor1[i] *= 1.0/ratio[i];
267 | gfactor2[i] *= 1.0/sqrt(ratio[i]);
268 | }
269 | }
270 |
271 | if (temperature && temperature->tempbias) tbiasflag = BIAS;
272 | else tbiasflag = NOBIAS;
273 |
274 | if (strstr(update->integrate_style,"respa"))
275 | nlevels_respa = ((Respa *) update->integrate)->nlevels;
276 |
277 | if (gjfflag) gjffac = 1.0/(1.0+update->dt/2.0/t_period);
278 |
279 | }
280 |
281 | /* ---------------------------------------------------------------------- */
282 |
283 | void FixLangevin::setup(int vflag)
284 | {
285 | if (strstr(update->integrate_style,"verlet"))
286 | post_force(vflag);
287 | else {
288 | ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
289 | post_force_respa(vflag,nlevels_respa-1,0);
290 | ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
291 | }
292 | }
293 |
294 | /* ---------------------------------------------------------------------- */
295 |
296 | void FixLangevin::post_force(int /*vflag*/)
297 | {
298 | double *rmass = atom->rmass;
299 |
300 | // enumerate all 2^6 possibilities for template parameters
301 | // this avoids testing them inside inner loop:
302 | // TSTYLEATOM, GJF, TALLY, BIAS, RMASS, ZERO
303 |
304 | if (tstyle == ATOM)
305 | if (gjfflag)
306 | if (tallyflag)
307 | if (tbiasflag == BIAS)
308 | if (rmass)
309 | if (zeroflag) post_force_templated<1,1,1,1,1,1>();
310 | else post_force_templated<1,1,1,1,1,0>();
311 | else
312 | if (zeroflag) post_force_templated<1,1,1,1,0,1>();
313 | else post_force_templated<1,1,1,1,0,0>();
314 | else
315 | if (rmass)
316 | if (zeroflag) post_force_templated<1,1,1,0,1,1>();
317 | else post_force_templated<1,1,1,0,1,0>();
318 | else
319 | if (zeroflag) post_force_templated<1,1,1,0,0,1>();
320 | else post_force_templated<1,1,1,0,0,0>();
321 | else
322 | if (tbiasflag == BIAS)
323 | if (rmass)
324 | if (zeroflag) post_force_templated<1,1,0,1,1,1>();
325 | else post_force_templated<1,1,0,1,1,0>();
326 | else
327 | if (zeroflag) post_force_templated<1,1,0,1,0,1>();
328 | else post_force_templated<1,1,0,1,0,0>();
329 | else
330 | if (rmass)
331 | if (zeroflag) post_force_templated<1,1,0,0,1,1>();
332 | else post_force_templated<1,1,0,0,1,0>();
333 | else
334 | if (zeroflag) post_force_templated<1,1,0,0,0,1>();
335 | else post_force_templated<1,1,0,0,0,0>();
336 | else
337 | if (tallyflag)
338 | if (tbiasflag == BIAS)
339 | if (rmass)
340 | if (zeroflag) post_force_templated<1,0,1,1,1,1>();
341 | else post_force_templated<1,0,1,1,1,0>();
342 | else
343 | if (zeroflag) post_force_templated<1,0,1,1,0,1>();
344 | else post_force_templated<1,0,1,1,0,0>();
345 | else
346 | if (rmass)
347 | if (zeroflag) post_force_templated<1,0,1,0,1,1>();
348 | else post_force_templated<1,0,1,0,1,0>();
349 | else
350 | if (zeroflag) post_force_templated<1,0,1,0,0,1>();
351 | else post_force_templated<1,0,1,0,0,0>();
352 | else
353 | if (tbiasflag == BIAS)
354 | if (rmass)
355 | if (zeroflag) post_force_templated<1,0,0,1,1,1>();
356 | else post_force_templated<1,0,0,1,1,0>();
357 | else
358 | if (zeroflag) post_force_templated<1,0,0,1,0,1>();
359 | else post_force_templated<1,0,0,1,0,0>();
360 | else
361 | if (rmass)
362 | if (zeroflag) post_force_templated<1,0,0,0,1,1>();
363 | else post_force_templated<1,0,0,0,1,0>();
364 | else
365 | if (zeroflag) post_force_templated<1,0,0,0,0,1>();
366 | else post_force_templated<1,0,0,0,0,0>();
367 | else
368 | if (gjfflag)
369 | if (tallyflag)
370 | if (tbiasflag == BIAS)
371 | if (rmass)
372 | if (zeroflag) post_force_templated<0,1,1,1,1,1>();
373 | else post_force_templated<0,1,1,1,1,0>();
374 | else
375 | if (zeroflag) post_force_templated<0,1,1,1,0,1>();
376 | else post_force_templated<0,1,1,1,0,0>();
377 | else
378 | if (rmass)
379 | if (zeroflag) post_force_templated<0,1,1,0,1,1>();
380 | else post_force_templated<0,1,1,0,1,0>();
381 | else
382 | if (zeroflag) post_force_templated<0,1,1,0,0,1>();
383 | else post_force_templated<0,1,1,0,0,0>();
384 | else
385 | if (tbiasflag == BIAS)
386 | if (rmass)
387 | if (zeroflag) post_force_templated<0,1,0,1,1,1>();
388 | else post_force_templated<0,1,0,1,1,0>();
389 | else
390 | if (zeroflag) post_force_templated<0,1,0,1,0,1>();
391 | else post_force_templated<0,1,0,1,0,0>();
392 | else
393 | if (rmass)
394 | if (zeroflag) post_force_templated<0,1,0,0,1,1>();
395 | else post_force_templated<0,1,0,0,1,0>();
396 | else
397 | if (zeroflag) post_force_templated<0,1,0,0,0,1>();
398 | else post_force_templated<0,1,0,0,0,0>();
399 | else
400 | if (tallyflag)
401 | if (tbiasflag == BIAS)
402 | if (rmass)
403 | if (zeroflag) post_force_templated<0,0,1,1,1,1>();
404 | else post_force_templated<0,0,1,1,1,0>();
405 | else
406 | if (zeroflag) post_force_templated<0,0,1,1,0,1>();
407 | else post_force_templated<0,0,1,1,0,0>();
408 | else
409 | if (rmass)
410 | if (zeroflag) post_force_templated<0,0,1,0,1,1>();
411 | else post_force_templated<0,0,1,0,1,0>();
412 | else
413 | if (zeroflag) post_force_templated<0,0,1,0,0,1>();
414 | else post_force_templated<0,0,1,0,0,0>();
415 | else
416 | if (tbiasflag == BIAS)
417 | if (rmass)
418 | if (zeroflag) post_force_templated<0,0,0,1,1,1>();
419 | else post_force_templated<0,0,0,1,1,0>();
420 | else
421 | if (zeroflag) post_force_templated<0,0,0,1,0,1>();
422 | else post_force_templated<0,0,0,1,0,0>();
423 | else
424 | if (rmass)
425 | if (zeroflag) post_force_templated<0,0,0,0,1,1>();
426 | else post_force_templated<0,0,0,0,1,0>();
427 | else
428 | if (zeroflag) post_force_templated<0,0,0,0,0,1>();
429 | else post_force_templated<0,0,0,0,0,0>();
430 | }
431 |
432 | /* ---------------------------------------------------------------------- */
433 |
434 | void FixLangevin::post_force_respa(int vflag, int ilevel, int /*iloop*/)
435 | {
436 | if (ilevel == nlevels_respa-1) post_force(vflag);
437 | }
438 |
439 | /* ----------------------------------------------------------------------
440 | modify forces using one of the many Langevin styles
441 | ------------------------------------------------------------------------- */
442 |
443 | template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
444 | int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
445 | void FixLangevin::post_force_templated()
446 | {
447 | double gamma1,gamma2;
448 |
449 | double **v = atom->v;
450 | double **f = atom->f;
451 | double *rmass = atom->rmass;
452 | int *type = atom->type;
453 | int *mask = atom->mask;
454 | int nlocal = atom->nlocal;
455 |
456 | // apply damping and thermostat to atoms in group
457 |
458 | // for Tp_TSTYLEATOM:
459 | // use per-atom per-coord target temperature
460 | // for Tp_GJF:
461 | // use Gronbech-Jensen/Farago algorithm
462 | // else use regular algorithm
463 | // for Tp_TALLY:
464 | // store drag plus random forces in flangevin[nlocal][3]
465 | // for Tp_BIAS:
466 | // calculate temperature since some computes require temp
467 | // computed on current nlocal atoms to remove bias
468 | // test v = 0 since some computes mask non-participating atoms via v = 0
469 | // and added force has extra term not multiplied by v = 0
470 | // for Tp_RMASS:
471 | // use per-atom masses
472 | // else use per-type masses
473 | // for Tp_ZERO:
474 | // sum random force over all atoms in group
475 | // subtract sum/count from each atom in group
476 |
477 | double fdrag[3],fran[3],fsum[3],fsumall[3];
478 | bigint count;
479 | double fswap;
480 |
481 | double boltz = force->boltz;
482 | double dt = update->dt;
483 | double mvv2e = force->mvv2e;
484 | double ftm2v = force->ftm2v;
485 |
486 | compute_target();
487 |
488 | if (Tp_ZERO) {
489 | fsum[0] = fsum[1] = fsum[2] = 0.0;
490 | count = group->count(igroup);
491 | if (count == 0)
492 | error->all(FLERR,"Cannot zero Langevin force of 0 atoms");
493 | }
494 |
495 | // reallocate flangevin if necessary
496 |
497 | if (Tp_TALLY) {
498 | if (atom->nmax > maxatom1) {
499 | memory->destroy(flangevin);
500 | maxatom1 = atom->nmax;
501 | memory->create(flangevin,maxatom1,3,"langevin:flangevin");
502 | }
503 | flangevin_allocated = 1;
504 | }
505 |
506 | if (Tp_BIAS) temperature->compute_scalar();
507 |
508 | for (int i = 0; i < nlocal; i++) {
509 | if (mask[i] & groupbit) {
510 | if (Tp_TSTYLEATOM) tsqrt = sqrt(tforce[i]);
511 | if (Tp_RMASS) {
512 | gamma1 = -rmass[i] / t_period / ftm2v;
513 | gamma2 = sqrt(rmass[i]) * sqrt(24.0*boltz/t_period/dt/mvv2e) / ftm2v;
514 | gamma1 *= 1.0/ratio[type[i]];
515 | gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt;
516 | } else {
517 | gamma1 = gfactor1[type[i]];
518 | gamma2 = gfactor2[type[i]] * tsqrt;
519 | }
520 |
521 | fran[0] = gamma2*(random->uniform()-0.5);
522 | fran[1] = gamma2*(random->uniform()-0.5);
523 | fran[2] = gamma2*(random->uniform()-0.5);
524 |
525 | if (Tp_BIAS) {
526 | temperature->remove_bias(i,v[i]);
527 | fdrag[0] = gamma1*v[i][0];
528 | fdrag[1] = gamma1*v[i][1];
529 | fdrag[2] = gamma1*v[i][2];
530 | if (v[i][0] == 0.0) fran[0] = 0.0;
531 | if (v[i][1] == 0.0) fran[1] = 0.0;
532 | if (v[i][2] == 0.0) fran[2] = 0.0;
533 | temperature->restore_bias(i,v[i]);
534 | } else {
535 | fdrag[0] = gamma1*v[i][0];
536 | fdrag[1] = gamma1*v[i][1];
537 | fdrag[2] = gamma1*v[i][2];
538 | }
539 |
540 | if (Tp_GJF) {
541 | fswap = 0.5*(fran[0]+franprev[i][0]);
542 | franprev[i][0] = fran[0];
543 | fran[0] = fswap;
544 | fswap = 0.5*(fran[1]+franprev[i][1]);
545 | franprev[i][1] = fran[1];
546 | fran[1] = fswap;
547 | fswap = 0.5*(fran[2]+franprev[i][2]);
548 | franprev[i][2] = fran[2];
549 | fran[2] = fswap;
550 |
551 | fdrag[0] *= gjffac;
552 | fdrag[1] *= gjffac;
553 | fdrag[2] *= gjffac;
554 | fran[0] *= gjffac;
555 | fran[1] *= gjffac;
556 | fran[2] *= gjffac;
557 | f[i][0] *= gjffac;
558 | f[i][1] *= gjffac;
559 | f[i][2] *= gjffac;
560 | }
561 |
562 | f[i][0] += fdrag[0] + fran[0];
563 | f[i][1] += fdrag[1] + fran[1];
564 | f[i][2] += fdrag[2] + fran[2];
565 |
566 | if (Tp_TALLY) {
567 | flangevin[i][0] = fdrag[0] + fran[0];
568 | flangevin[i][1] = fdrag[1] + fran[1];
569 | flangevin[i][2] = fdrag[2] + fran[2];
570 | }
571 |
572 | if (Tp_ZERO) {
573 | fsum[0] += fran[0];
574 | fsum[1] += fran[1];
575 | fsum[2] += fran[2];
576 | }
577 | }
578 | }
579 |
580 | // set total force to zero
581 |
582 | if (Tp_ZERO) {
583 | MPI_Allreduce(fsum,fsumall,3,MPI_DOUBLE,MPI_SUM,world);
584 | fsumall[0] /= count;
585 | fsumall[1] /= count;
586 | fsumall[2] /= count;
587 | for (int i = 0; i < nlocal; i++) {
588 | if (mask[i] & groupbit) {
589 | f[i][0] -= fsumall[0];
590 | f[i][1] -= fsumall[1];
591 | f[i][2] -= fsumall[2];
592 | if (Tp_TALLY) {
593 | flangevin[i][0] -= fsumall[0];
594 | flangevin[i][1] -= fsumall[1];
595 | flangevin[i][2] -= fsumall[2];
596 | }
597 | }
598 | }
599 | }
600 |
601 | // thermostat omega and angmom
602 |
603 | if (oflag) omega_thermostat();
604 | if (ascale) angmom_thermostat();
605 | }
606 |
607 | /* ----------------------------------------------------------------------
608 | set current t_target and t_sqrt
609 | ------------------------------------------------------------------------- */
610 |
611 | void FixLangevin::compute_target()
612 | {
613 | int *mask = atom->mask;
614 | int nlocal = atom->nlocal;
615 |
616 | double delta = update->ntimestep - update->beginstep;
617 | if (delta != 0.0) delta /= update->endstep - update->beginstep;
618 |
619 | // if variable temp, evaluate variable, wrap with clear/add
620 | // reallocate tforce array if necessary
621 |
622 | if (tstyle == CONSTANT) {
623 | t_target = t_start + delta * (t_stop-t_start);
624 | tsqrt = sqrt(t_target);
625 | } else {
626 | modify->clearstep_compute();
627 | if (tstyle == EQUAL) {
628 | t_target = input->variable->compute_equal(tvar);
629 | if (t_target < 0.0)
630 | error->one(FLERR,"Fix langevin variable returned negative temperature");
631 | tsqrt = sqrt(t_target);
632 | } else {
633 | if (atom->nmax > maxatom2) {
634 | maxatom2 = atom->nmax;
635 | memory->destroy(tforce);
636 | memory->create(tforce,maxatom2,"langevin:tforce");
637 | }
638 | input->variable->compute_atom(tvar,igroup,tforce,1,0);
639 | for (int i = 0; i < nlocal; i++)
640 | if (mask[i] & groupbit)
641 | if (tforce[i] < 0.0)
642 | error->one(FLERR,
643 | "Fix langevin variable returned negative temperature");
644 | }
645 | modify->addstep_compute(update->ntimestep + 1);
646 | }
647 | }
648 |
649 | /* ----------------------------------------------------------------------
650 | thermostat rotational dof via omega
651 | ------------------------------------------------------------------------- */
652 |
653 | void FixLangevin::omega_thermostat()
654 | {
655 | double gamma1,gamma2;
656 |
657 | double boltz = force->boltz;
658 | double dt = update->dt;
659 | double mvv2e = force->mvv2e;
660 | double ftm2v = force->ftm2v;
661 |
662 | double **torque = atom->torque;
663 | double **omega = atom->omega;
664 | double *radius = atom->radius;
665 | double *rmass = atom->rmass;
666 | int *mask = atom->mask;
667 | int *type = atom->type;
668 | int nlocal = atom->nlocal;
669 |
670 | // rescale gamma1/gamma2 by 10/3 & sqrt(10/3) for spherical particles
671 | // does not affect rotational thermosatting
672 | // gives correct rotational diffusivity behavior
673 |
674 | double tendivthree = 10.0/3.0;
675 | double tran[3];
676 | double inertiaone;
677 |
678 | for (int i = 0; i < nlocal; i++) {
679 | if ((mask[i] & groupbit) && (radius[i] > 0.0)) {
680 | inertiaone = SINERTIA*radius[i]*radius[i]*rmass[i];
681 | if (tstyle == ATOM) tsqrt = sqrt(tforce[i]);
682 | gamma1 = -tendivthree*inertiaone / t_period / ftm2v;
683 | gamma2 = sqrt(inertiaone) * sqrt(80.0*boltz/t_period/dt/mvv2e) / ftm2v;
684 | gamma1 *= 1.0/ratio[type[i]];
685 | gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt;
686 | tran[0] = gamma2*(random->uniform()-0.5);
687 | tran[1] = gamma2*(random->uniform()-0.5);
688 | tran[2] = gamma2*(random->uniform()-0.5);
689 | torque[i][0] += gamma1*omega[i][0] + tran[0];
690 | torque[i][1] += gamma1*omega[i][1] + tran[1];
691 | torque[i][2] += gamma1*omega[i][2] + tran[2];
692 | }
693 | }
694 | }
695 |
696 | /* ----------------------------------------------------------------------
697 | thermostat rotational dof via angmom
698 | ------------------------------------------------------------------------- */
699 |
700 | void FixLangevin::angmom_thermostat()
701 | {
702 | double gamma1,gamma2;
703 |
704 | double boltz = force->boltz;
705 | double dt = update->dt;
706 | double mvv2e = force->mvv2e;
707 | double ftm2v = force->ftm2v;
708 |
709 | AtomVecEllipsoid::Bonus *bonus = avec->bonus;
710 | double **torque = atom->torque;
711 | double **angmom = atom->angmom;
712 | double *rmass = atom->rmass;
713 | int *ellipsoid = atom->ellipsoid;
714 | int *mask = atom->mask;
715 | int *type = atom->type;
716 | int nlocal = atom->nlocal;
717 |
718 | // rescale gamma1/gamma2 by ascale for aspherical particles
719 | // does not affect rotational thermosatting
720 | // gives correct rotational diffusivity behavior if (nearly) spherical
721 | // any value will be incorrect for rotational diffusivity if aspherical
722 |
723 | double inertia[3],omega[3],tran[3];
724 | double *shape,*quat;
725 |
726 | for (int i = 0; i < nlocal; i++) {
727 | if (mask[i] & groupbit) {
728 | shape = bonus[ellipsoid[i]].shape;
729 | inertia[0] = EINERTIA*rmass[i] * (shape[1]*shape[1]+shape[2]*shape[2]);
730 | inertia[1] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[2]*shape[2]);
731 | inertia[2] = EINERTIA*rmass[i] * (shape[0]*shape[0]+shape[1]*shape[1]);
732 | quat = bonus[ellipsoid[i]].quat;
733 | MathExtra::mq_to_omega(angmom[i],quat,inertia,omega);
734 |
735 | if (tstyle == ATOM) tsqrt = sqrt(tforce[i]);
736 | gamma1 = -ascale / t_period / ftm2v;
737 | gamma2 = sqrt(ascale*24.0*boltz/t_period/dt/mvv2e) / ftm2v;
738 | gamma1 *= 1.0/ratio[type[i]];
739 | gamma2 *= 1.0/sqrt(ratio[type[i]]) * tsqrt;
740 | tran[0] = sqrt(inertia[0])*gamma2*(random->uniform()-0.5);
741 | tran[1] = sqrt(inertia[1])*gamma2*(random->uniform()-0.5);
742 | tran[2] = sqrt(inertia[2])*gamma2*(random->uniform()-0.5);
743 | torque[i][0] += inertia[0]*gamma1*omega[0] + tran[0];
744 | torque[i][1] += inertia[1]*gamma1*omega[1] + tran[1];
745 | torque[i][2] += inertia[2]*gamma1*omega[2] + tran[2];
746 | }
747 | }
748 | }
749 |
750 | /* ----------------------------------------------------------------------
751 | tally energy transfer to thermal reservoir
752 | ------------------------------------------------------------------------- */
753 |
754 | void FixLangevin::end_of_step()
755 | {
756 | if (!tallyflag) return;
757 |
758 | double **v = atom->v;
759 | int *mask = atom->mask;
760 | int nlocal = atom->nlocal;
761 |
762 | energy_onestep = 0.0;
763 |
764 | for (int i = 0; i < nlocal; i++)
765 | if (mask[i] & groupbit)
766 | energy_onestep += flangevin[i][0]*v[i][0] + flangevin[i][1]*v[i][1] +
767 | flangevin[i][2]*v[i][2];
768 |
769 | energy += energy_onestep*update->dt;
770 | }
771 |
772 | /* ---------------------------------------------------------------------- */
773 |
774 | void FixLangevin::reset_target(double t_new)
775 | {
776 | t_target = t_start = t_stop = t_new;
777 | }
778 |
779 |
780 | void FixLangevin::reset_tdamp(double new_tdamp)
781 | {
782 | // set force prefactors
783 | t_period = new_tdamp;
784 | if (!atom->rmass) {
785 | for (int i = 1; i <= atom->ntypes; i++) {
786 | gfactor1[i] = -atom->mass[i] / t_period / force->ftm2v;
787 | gfactor2[i] = sqrt(atom->mass[i]) *
788 | sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) /
789 | force->ftm2v;
790 | gfactor1[i] *= 1.0/ratio[i];
791 | gfactor2[i] *= 1.0/sqrt(ratio[i]);
792 | }
793 | }
794 |
795 |
796 | if (gjfflag) gjffac = 1.0/(1.0+update->dt/2.0/t_period);
797 |
798 | }
799 |
800 | /* ---------------------------------------------------------------------- */
801 |
802 | void FixLangevin::reset_dt()
803 | {
804 | if (atom->mass) {
805 | for (int i = 1; i <= atom->ntypes; i++) {
806 | gfactor2[i] = sqrt(atom->mass[i]) *
807 | sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) /
808 | force->ftm2v;
809 | gfactor2[i] *= 1.0/sqrt(ratio[i]);
810 | }
811 | }
812 | }
813 |
814 | /* ---------------------------------------------------------------------- */
815 |
816 | int FixLangevin::modify_param(int narg, char **arg)
817 | {
818 | if (strcmp(arg[0],"temp") == 0) {
819 | if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
820 | delete [] id_temp;
821 | int n = strlen(arg[1]) + 1;
822 | id_temp = new char[n];
823 | strcpy(id_temp,arg[1]);
824 |
825 | int icompute = modify->find_compute(id_temp);
826 | if (icompute < 0)
827 | error->all(FLERR,"Could not find fix_modify temperature ID");
828 | temperature = modify->compute[icompute];
829 |
830 | if (temperature->tempflag == 0)
831 | error->all(FLERR,
832 | "Fix_modify temperature ID does not compute temperature");
833 | if (temperature->igroup != igroup && comm->me == 0)
834 | error->warning(FLERR,"Group for fix_modify temp != fix group");
835 | return 2;
836 | }
837 | return 0;
838 | }
839 |
840 | /* ---------------------------------------------------------------------- */
841 |
842 | double FixLangevin::compute_scalar()
843 | {
844 | if (!tallyflag || !flangevin_allocated) return 0.0;
845 |
846 | // capture the very first energy transfer to thermal reservoir
847 |
848 | double **v = atom->v;
849 | int *mask = atom->mask;
850 | int nlocal = atom->nlocal;
851 |
852 | if (update->ntimestep == update->beginstep) {
853 | energy_onestep = 0.0;
854 | for (int i = 0; i < nlocal; i++)
855 | if (mask[i] & groupbit)
856 | energy_onestep += flangevin[i][0]*v[i][0] + flangevin[i][1]*v[i][1] +
857 | flangevin[i][2]*v[i][2];
858 | energy = 0.5*energy_onestep*update->dt;
859 | }
860 |
861 | // convert midstep energy back to previous fullstep energy
862 |
863 | double energy_me = energy - 0.5*energy_onestep*update->dt;
864 |
865 | double energy_all;
866 | MPI_Allreduce(&energy_me,&energy_all,1,MPI_DOUBLE,MPI_SUM,world);
867 | return -energy_all;
868 | }
869 |
870 | /* ----------------------------------------------------------------------
871 | extract thermostat properties
872 | ------------------------------------------------------------------------- */
873 |
874 | void *FixLangevin::extract(const char *str, int &dim)
875 | {
876 | dim = 0;
877 | if (strcmp(str,"t_target") == 0) {
878 | return &t_target;
879 | }
880 | return NULL;
881 | }
882 |
883 | /* ----------------------------------------------------------------------
884 | memory usage of tally array
885 | ------------------------------------------------------------------------- */
886 |
887 | double FixLangevin::memory_usage()
888 | {
889 | double bytes = 0.0;
890 | if (gjfflag) bytes += atom->nmax*3 * sizeof(double);
891 | if (tallyflag) bytes += atom->nmax*3 * sizeof(double);
892 | if (tforce) bytes += atom->nmax * sizeof(double);
893 | return bytes;
894 | }
895 |
896 | /* ----------------------------------------------------------------------
897 | allocate atom-based array for franprev
898 | ------------------------------------------------------------------------- */
899 |
900 | void FixLangevin::grow_arrays(int nmax)
901 | {
902 | memory->grow(franprev,nmax,3,"fix_langevin:franprev");
903 | }
904 |
905 | /* ----------------------------------------------------------------------
906 | copy values within local atom-based array
907 | ------------------------------------------------------------------------- */
908 |
909 | void FixLangevin::copy_arrays(int i, int j, int /*delflag*/)
910 | {
911 | for (int m = 0; m < nvalues; m++)
912 | franprev[j][m] = franprev[i][m];
913 | }
914 |
915 | /* ----------------------------------------------------------------------
916 | pack values in local atom-based array for exchange with another proc
917 | ------------------------------------------------------------------------- */
918 |
919 | int FixLangevin::pack_exchange(int i, double *buf)
920 | {
921 | for (int m = 0; m < nvalues; m++) buf[m] = franprev[i][m];
922 | return nvalues;
923 | }
924 |
925 | /* ----------------------------------------------------------------------
926 | unpack values in local atom-based array from exchange with another proc
927 | ------------------------------------------------------------------------- */
928 |
929 | int FixLangevin::unpack_exchange(int nlocal, double *buf)
930 | {
931 | for (int m = 0; m < nvalues; m++) franprev[nlocal][m] = buf[m];
932 | return nvalues;
933 | }
934 |
--------------------------------------------------------------------------------
/lammps_custom_src/fix_langevin.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | #ifdef FIX_CLASS
15 |
16 | FixStyle(langevin,FixLangevin)
17 |
18 | #else
19 |
20 | #ifndef LMP_FIX_LANGEVIN_H
21 | #define LMP_FIX_LANGEVIN_H
22 |
23 | #include "fix.h"
24 |
25 | namespace LAMMPS_NS {
26 |
27 | class FixLangevin : public Fix {
28 | public:
29 | FixLangevin(class LAMMPS *, int, char **);
30 | virtual ~FixLangevin();
31 | int setmask();
32 | void init();
33 | void setup(int);
34 | virtual void post_force(int);
35 | void post_force_respa(int, int, int);
36 | virtual void end_of_step();
37 | void reset_target(double);
38 | void reset_tdamp(double);
39 | void reset_dt();
40 | int modify_param(int, char **);
41 | virtual double compute_scalar();
42 | double memory_usage();
43 | virtual void *extract(const char *, int &);
44 | void grow_arrays(int);
45 | void copy_arrays(int, int, int);
46 | int pack_exchange(int, double *);
47 | int unpack_exchange(int, double *);
48 |
49 | protected:
50 | int gjfflag,oflag,tallyflag,zeroflag,tbiasflag;
51 | int flangevin_allocated;
52 | double ascale;
53 | double t_start,t_stop,t_period,t_target;
54 | double *gfactor1,*gfactor2,*ratio;
55 | double energy,energy_onestep;
56 | double tsqrt;
57 | int tstyle,tvar;
58 | double gjffac;
59 | char *tstr;
60 |
61 | class AtomVecEllipsoid *avec;
62 |
63 | int maxatom1,maxatom2;
64 | double **flangevin;
65 | double *tforce;
66 | double **franprev;
67 | int nvalues;
68 |
69 | char *id_temp;
70 | class Compute *temperature;
71 |
72 | int nlevels_respa;
73 | class RanMars *random;
74 | int seed;
75 |
76 | template < int Tp_TSTYLEATOM, int Tp_GJF, int Tp_TALLY,
77 | int Tp_BIAS, int Tp_RMASS, int Tp_ZERO >
78 | void post_force_templated();
79 |
80 | void omega_thermostat();
81 | void angmom_thermostat();
82 | void compute_target();
83 | };
84 |
85 | }
86 |
87 | #endif
88 | #endif
89 |
90 | /* ERROR/WARNING messages:
91 |
92 | E: Illegal ... command
93 |
94 | Self-explanatory. Check the input script syntax and compare to the
95 | documentation for the command. You can use -echo screen as a
96 | command-line option when running LAMMPS to see the offending line.
97 |
98 | E: Fix langevin period must be > 0.0
99 |
100 | The time window for temperature relaxation must be > 0
101 |
102 | E: Fix langevin omega requires atom style sphere
103 |
104 | Self-explanatory.
105 |
106 | E: Fix langevin angmom requires atom style ellipsoid
107 |
108 | Self-explanatory.
109 |
110 | E: Variable name for fix langevin does not exist
111 |
112 | Self-explanatory.
113 |
114 | E: Variable for fix langevin is invalid style
115 |
116 | It must be an equal-style variable.
117 |
118 | E: Fix langevin omega requires extended particles
119 |
120 | One of the particles has radius 0.0.
121 |
122 | E: Fix langevin angmom requires extended particles
123 |
124 | This fix option cannot be used with point particles.
125 |
126 | E: Cannot zero Langevin force of 0 atoms
127 |
128 | The group has zero atoms, so you cannot request its force
129 | be zeroed.
130 |
131 | E: Fix langevin variable returned negative temperature
132 |
133 | Self-explanatory.
134 |
135 | E: Could not find fix_modify temperature ID
136 |
137 | The compute ID for computing temperature does not exist.
138 |
139 | E: Fix_modify temperature ID does not compute temperature
140 |
141 | The compute ID assigned to the fix must compute temperature.
142 |
143 | W: Group for fix_modify temp != fix group
144 |
145 | The fix_modify command is specifying a temperature computation that
146 | computes a temperature on a different group of atoms than the fix
147 | itself operates on. This is probably not what you want to do.
148 |
149 | */
150 |
--------------------------------------------------------------------------------
/lammps_custom_src/hremd_steve.cpp:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | /* ----------------------------------------------------------------------
15 | Contributing author: Mark Sears (SNL)
16 |
17 | Modifed from temper.cpp by S FARR (CAMBRIDGE) in 2019
18 | ------------------------------------------------------------------------- */
19 |
20 | #include "hremd_steve.h"
21 | #include
22 | #include
23 | #include "universe.h"
24 | #include "domain.h"
25 | #include "atom.h"
26 | #include "update.h"
27 | #include "integrate.h"
28 | #include "modify.h"
29 | #include "compute.h"
30 | #include "force.h"
31 | #include "fix.h"
32 | #include "random_park.h"
33 | #include "finish.h"
34 | #include "timer.h"
35 | #include "error.h"
36 | #include "utils.h"
37 | #include "pair.h"
38 | #include "pair_ljlambda.h"
39 | #include "neighbor.h"
40 | using namespace LAMMPS_NS;
41 |
42 | //#define TEMPER_DEBUG
43 |
44 | /* ---------------------------------------------------------------------- */
45 |
46 | HremdSteve::HremdSteve(LAMMPS *lmp) : Pointers(lmp) {}
47 |
48 | /* ---------------------------------------------------------------------- */
49 |
50 | HremdSteve::~HremdSteve()
51 | {
52 | MPI_Comm_free(&roots);
53 | if (ranswap) delete ranswap;
54 | delete ranboltz;
55 | delete [] set_temp;
56 | delete [] temp2world;
57 | delete [] world2temp;
58 | delete [] world2root;
59 | }
60 |
61 | /* ----------------------------------------------------------------------
62 | perform tempering with inter-world swaps
63 | ------------------------------------------------------------------------- */
64 |
65 | void HremdSteve::command(int narg, char **arg)
66 | {
67 | if (universe->nworlds == 1)
68 | error->all(FLERR,"Must have more than one processor partition to temper");
69 | if (domain->box_exist == 0)
70 | error->all(FLERR,"HremdSteve command before simulation box is defined");
71 | if (narg != 7 && narg != 8)
72 | error->universe_all(FLERR,"Illegal temper command");
73 |
74 | int nsteps = force->inumeric(FLERR,arg[0]);
75 | nevery = force->inumeric(FLERR,arg[1]);
76 | double temp = force->numeric(FLERR,arg[2]);
77 |
78 | // ignore temper command, if walltime limit was already reached
79 |
80 | if (timer->is_timeout()) return;
81 |
82 | /// remove these bits, dont need any more
83 | // for (whichfix = 0; whichfix < modify->nfix; whichfix++)
84 | // if (strcmp(arg[3],modify->fix[whichfix]->id) == 0) break;
85 | // if (whichfix == modify->nfix)
86 | // error->universe_all(FLERR,"HremdSteveing fix ID is not defined");
87 |
88 | // for (whichfix2 = 0; whichfix2 < modify->nfix; whichfix2++)
89 | // if (strcmp(arg[4],modify->fix[whichfix2]->id) == 0) break;
90 | // if (whichfix2 == modify->nfix)
91 | // error->universe_all(FLERR,"HremdSteveing fix ID is not defined");
92 |
93 |
94 | seed_swap = force->inumeric(FLERR,arg[5]);
95 | seed_boltz = force->inumeric(FLERR,arg[6]);
96 |
97 | my_set_temp = universe->iworld;
98 | if (narg == 8) my_set_temp = force->inumeric(FLERR,arg[7]);
99 | if ((my_set_temp < 0) || (my_set_temp >= universe->nworlds))
100 | error->universe_one(FLERR,"Illegal temperature index");
101 |
102 | // swap frequency must evenly divide total # of timesteps
103 |
104 | if (nevery <= 0)
105 | error->universe_all(FLERR,"Invalid frequency in temper command");
106 | nswaps = nsteps/nevery;
107 | if (nswaps*nevery != nsteps)
108 | error->universe_all(FLERR,"Non integer # of swaps in temper command");
109 |
110 | // fix style must be appropriate for temperature control, i.e. it needs
111 | // to provide a working Fix::reset_target() and must not change the volume.
112 |
113 | // if ((!utils::strmatch(modify->fix[whichfix]->style,"^nvt")) &&
114 | // (!utils::strmatch(modify->fix[whichfix]->style,"^langevin")) &&
115 | // (!utils::strmatch(modify->fix[whichfix]->style,"^gl[de]$")) &&
116 | // (!utils::strmatch(modify->fix[whichfix]->style,"^rigid/nvt")) &&
117 | // (!utils::strmatch(modify->fix[whichfix]->style,"^temp/")))
118 | // error->universe_all(FLERR,"HremdSteveing temperature fix is not supported");
119 |
120 | // setup for long tempering run
121 |
122 | update->whichflag = 1;
123 | timer->init_timeout();
124 |
125 | update->nsteps = nsteps;
126 | update->beginstep = update->firststep = update->ntimestep;
127 | update->endstep = update->laststep = update->firststep + nsteps;
128 | if (update->laststep < 0)
129 | error->all(FLERR,"Too many timesteps");
130 |
131 | lmp->init();
132 |
133 | // local storage
134 |
135 | me_universe = universe->me;
136 | MPI_Comm_rank(world,&me);
137 | nworlds = universe->nworlds;
138 | iworld = universe->iworld;
139 | boltz = force->boltz;
140 |
141 | // pe_compute = ptr to thermo_pe compute
142 | // notify compute it will be called at first swap
143 |
144 | int id = modify->find_compute("thermo_pe");
145 | if (id < 0) error->all(FLERR,"HremdSteveing could not find thermo_pe compute");
146 | Compute *pe_compute = modify->compute[id];
147 | pe_compute->addstep(update->ntimestep + nevery);
148 |
149 | // create MPI communicator for root proc from each world
150 |
151 | int color;
152 | if (me == 0) color = 0;
153 | else color = 1;
154 | MPI_Comm_split(universe->uworld,color,0,&roots);
155 |
156 | // RNGs for swaps and Boltzmann test
157 | // warm up Boltzmann RNG
158 |
159 | if (seed_swap) ranswap = new RanPark(lmp,seed_swap);
160 | else ranswap = NULL;
161 | ranboltz = new RanPark(lmp,seed_boltz + me_universe);
162 | for (int i = 0; i < 100; i++) ranboltz->uniform();
163 |
164 | // world2root[i] = global proc that is root proc of world i
165 |
166 | world2root = new int[nworlds];
167 | if (me == 0)
168 | MPI_Allgather(&me_universe,1,MPI_INT,world2root,1,MPI_INT,roots);
169 | MPI_Bcast(world2root,nworlds,MPI_INT,0,world);
170 |
171 | // create static list of set temperatures
172 | // allgather tempering arg "temp" across root procs
173 | // bcast from each root to other procs in world
174 |
175 | set_temp = new double[nworlds];
176 | if (me == 0) MPI_Allgather(&temp,1,MPI_DOUBLE,set_temp,1,MPI_DOUBLE,roots);
177 | MPI_Bcast(set_temp,nworlds,MPI_DOUBLE,0,world);
178 |
179 | // create world2temp only on root procs from my_set_temp
180 | // create temp2world on root procs from world2temp,
181 | // then bcast to all procs within world
182 |
183 | world2temp = new int[nworlds];
184 | temp2world = new int[nworlds];
185 | if (me == 0) {
186 | MPI_Allgather(&my_set_temp,1,MPI_INT,world2temp,1,MPI_INT,roots);
187 | for (int i = 0; i < nworlds; i++) temp2world[world2temp[i]] = i;
188 | }
189 | MPI_Bcast(temp2world,nworlds,MPI_INT,0,world);
190 |
191 |
192 |
193 | // setup tempering runs
194 |
195 |
196 | int i,which,partner,swap,partner_set_temp,partner_world;
197 | double pe,pe_partner,boltz_factor,new_temp;
198 |
199 | if (me_universe == 0 && universe->uscreen)
200 | fprintf(universe->uscreen,"Setting up tempering ...\n");
201 |
202 | printf("kappa on %d is %f\n",me_universe,set_temp[my_set_temp]);
203 |
204 | update->integrate->setup(1);
205 |
206 | if (me_universe == 0) {
207 | if (universe->uscreen) {
208 | fprintf(universe->uscreen,"Step");
209 | for (int i = 0; i < nworlds; i++)
210 | fprintf(universe->uscreen," T%d",i);
211 | fprintf(universe->uscreen,"\n");
212 | }
213 | if (universe->ulogfile) {
214 | fprintf(universe->ulogfile,"Step");
215 | for (int i = 0; i < nworlds; i++)
216 | fprintf(universe->ulogfile," T%d",i);
217 | fprintf(universe->ulogfile,"\n");
218 | }
219 | print_status();
220 | }
221 |
222 | PairLJLambda * mypair = dynamic_cast(force->pair);
223 | // if restarting tempering, reset temp target of Fix to current my_set_temp
224 | //if (narg == 7) {
225 | // double new_temp = set_temp[my_set_temp];
226 | // modify->fix[whichfix]->reset_target(new_temp);
227 | //}
228 | //
229 | // setup if we are restarting
230 | if (narg == 8){
231 | double new_temp = set_temp[my_set_temp];
232 | mypair->change_kappa(new_temp);
233 | lmp->neighbor->hremd_modify_cutoff(3.5/new_temp);
234 | lmp->neighbor->force_rebuild_hremd=true;
235 | }
236 |
237 | timer->init();
238 | timer->barrier_start();
239 |
240 | //bool did_i_swap = false;
241 | //mypair->change_kappa(set_temp[my_set_temp]);
242 | for (int iswap = 0; iswap < nswaps; iswap++) {
243 |
244 | // run for nevery timesteps
245 |
246 | timer->init_timeout();
247 |
248 |
249 |
250 | update->integrate->run(nevery);
251 |
252 |
253 | // check for timeout across all procs
254 |
255 | int my_timeout=0;
256 | int any_timeout=0;
257 | if (timer->is_timeout()) my_timeout=1;
258 | MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
259 | if (any_timeout) {
260 | timer->force_timeout();
261 | break;
262 | }
263 |
264 |
265 | // which = which of 2 kinds of swaps to do (0,1)
266 |
267 | if (!ranswap) which = iswap % 2;
268 | else if (ranswap->uniform() < 0.5) which = 0;
269 | else which = 1;
270 |
271 | // partner_set_temp = which set temp I am partnering with for this swap
272 |
273 | if (which == 0) {
274 | if (my_set_temp % 2 == 0) partner_set_temp = my_set_temp + 1;
275 | else partner_set_temp = my_set_temp - 1;
276 | } else {
277 | if (my_set_temp % 2 == 1) partner_set_temp = my_set_temp + 1;
278 | else partner_set_temp = my_set_temp - 1;
279 | }
280 |
281 | // partner = proc ID to swap with
282 | // if partner = -1, then I am not a proc that swaps
283 |
284 | partner = -1;
285 | if (me == 0 && partner_set_temp >= 0 && partner_set_temp < nworlds) {
286 | partner_world = temp2world[partner_set_temp];
287 | partner = world2root[partner_world];
288 | }
289 |
290 | // swap with a partner, only root procs in each world participate
291 | // hi proc sends PE to low proc
292 | // lo proc make Boltzmann decision on whether to swap
293 | // lo proc communicates decision back to hi proc
294 | /*
295 | double old_pe = pe_compute->compute_scalar();
296 |
297 | // change H
298 | PairLJLambda * mypair = dynamic_cast(force->pair);
299 | double og_kappa;
300 | update->integrate->cleanup();
301 | if (partner != -1){
302 | og_kappa = mypair->change_kappa(set_temp[partner_set_temp]);
303 | }
304 |
305 | // run for 0
306 | update->integrate->setup(1);
307 | update->integrate->run(0);
308 |
309 | // compute PE
310 | // notify compute it will be called at next swap
311 |
312 | pe = pe_compute->compute_scalar();
313 | pe_compute->addstep(update->ntimestep + nevery);
314 |
315 | double deltaPe = pe - old_pe;
316 | if (partner!=-1){
317 | printf("delta pe = %f\n",deltaPe);
318 | }
319 | pe=deltaPe;
320 |
321 | */
322 | // compute Es
323 | double my_old_e_coul=0.0;
324 | double my_new_e_coul=0.0;
325 |
326 | mypair->compute_ecoul_steve(&my_old_e_coul,&my_new_e_coul,set_temp[my_set_temp],set_temp[partner_set_temp]);
327 |
328 | double old_e_coul=0.0;
329 | double new_e_coul=0.0;
330 |
331 | MPI_Allreduce(&my_old_e_coul,&old_e_coul,1,MPI_DOUBLE,MPI_SUM,world);
332 | MPI_Allreduce(&my_new_e_coul,&new_e_coul,1,MPI_DOUBLE,MPI_SUM,world);
333 |
334 |
335 | #ifdef TEMPER_DEBUG
336 | printf("my E = %f\n",old_e_coul);
337 | #endif
338 | pe=new_e_coul-old_e_coul;
339 |
340 |
341 | // TODO: try and swap
342 | swap = 0;
343 | if (partner != -1) {
344 | if (me_universe > partner)
345 | MPI_Send(&pe,1,MPI_DOUBLE,partner,0,universe->uworld);
346 | else
347 | MPI_Recv(&pe_partner,1,MPI_DOUBLE,partner,0,universe->uworld,MPI_STATUS_IGNORE);
348 |
349 | if (me_universe < partner) {
350 | // boltz_factor = (pe - pe_partner) *
351 | //(1.0/(boltz*set_temp[my_set_temp]) -
352 | // 1.0/(boltz*set_temp[partner_set_temp]));
353 | boltz_factor = -(pe+pe_partner)/(boltz*300.0);
354 | if (boltz_factor >= 0.0) swap = 1;
355 | else if (ranboltz->uniform() < exp(boltz_factor)) swap = 1;
356 | //printf("prob = %f\n", exp(boltz_factor));
357 | }
358 |
359 | if (me_universe < partner)
360 | MPI_Send(&swap,1,MPI_INT,partner,0,universe->uworld);
361 | else
362 | MPI_Recv(&swap,1,MPI_INT,partner,0,universe->uworld,MPI_STATUS_IGNORE);
363 |
364 | #ifdef TEMPER_DEBUG
365 | if (me_universe < partner)
366 | printf("SWAP %d & %d: yes = %d,Ts = %d %d, PEs = %g %g, Bz = %g %g\n",
367 | me_universe,partner,swap,my_set_temp,partner_set_temp,
368 | pe,pe_partner,boltz_factor,exp(boltz_factor));
369 | #endif
370 |
371 | }
372 |
373 | // bcast swap result to other procs in my world
374 |
375 | MPI_Bcast(&swap,1,MPI_INT,0,world);
376 |
377 |
378 | //update->integrate->cleanup();
379 | //if (!swap && partner != -1){
380 | // mypair->change_kappa(og_kappa);
381 | //}
382 | //update->integrate->setup(1);
383 |
384 | // rescale kinetic energy via velocities if move is accepted
385 |
386 | //if (swap) scale_velocities(partner_set_temp,my_set_temp);
387 |
388 | // if my world swapped, all procs in world reset temp target of Fix
389 |
390 | if (swap) {
391 | new_temp = set_temp[partner_set_temp];
392 | //modify->fix[whichfix]->reset_target(new_temp);
393 | mypair->change_kappa(new_temp);
394 | lmp->neighbor->hremd_modify_cutoff(3.5/new_temp);
395 | lmp->neighbor->force_rebuild_hremd=true;
396 | //reset_velocities(300.0);
397 | //did_i_swap = true;
398 | }
399 |
400 | // update my_set_temp and temp2world on every proc
401 | // root procs update their value if swap took place
402 | // allgather across root procs
403 | // bcast within my world
404 |
405 | if (swap) my_set_temp = partner_set_temp;
406 | if (me == 0) {
407 | MPI_Allgather(&my_set_temp,1,MPI_INT,world2temp,1,MPI_INT,roots);
408 | for (i = 0; i < nworlds; i++) temp2world[world2temp[i]] = i;
409 | }
410 | MPI_Bcast(temp2world,nworlds,MPI_INT,0,world);
411 |
412 | // print out current swap status
413 |
414 | //printf("kappa on %d is %f\n",me_universe,set_temp[my_set_temp]);
415 | if (me_universe == 0) print_status();
416 |
417 | #ifdef TEMPER_DEBUG
418 | if(me==0) printf("world %d, cutnmax = %f\n",me_universe, lmp->neighbor->cutneighmax);
419 | #endif
420 | }
421 |
422 | timer->barrier_stop();
423 |
424 | update->integrate->cleanup();
425 |
426 | Finish finish(lmp);
427 | finish.end(1);
428 |
429 | update->whichflag = 0;
430 | update->firststep = update->laststep = 0;
431 | update->beginstep = update->endstep = 0;
432 | }
433 |
434 | /* ----------------------------------------------------------------------
435 | scale kinetic energy via velocities a la Sugita
436 | ------------------------------------------------------------------------- */
437 |
438 | void HremdSteve::scale_velocities(int t_partner, int t_me)
439 | {
440 | double sfactor = sqrt(set_temp[t_partner]/set_temp[t_me]);
441 |
442 | double **v = atom->v;
443 | int nlocal = atom->nlocal;
444 |
445 | for (int i = 0; i < nlocal; i++) {
446 | v[i][0] = v[i][0]*sfactor;
447 | v[i][1] = v[i][1]*sfactor;
448 | v[i][2] = v[i][2]*sfactor;
449 | }
450 | }
451 |
452 |
453 |
454 | //void HremdSteve::reset_velocities(double T)
455 | //{
456 | //
457 | // double **v = atom->v;
458 | // double *m = atom->mass;
459 | // int nlocal = atom->nlocal;
460 | //
461 | // for (int i = 0; i < nlocal; i++) {
462 | // v[i][0] = sqrt(boltz*T/m[i]) * ranboltz->gaussian();
463 | // v[i][1] = sqrt(boltz*T/m[i]) * ranboltz->gaussian();
464 | // v[i][2] = sqrt(boltz*T/m[i]) * ranboltz->gaussian();
465 | // }
466 | //}
467 | //
468 |
469 |
470 |
471 |
472 | /* ----------------------------------------------------------------------
473 | proc 0 prints current tempering status
474 | ------------------------------------------------------------------------- */
475 |
476 | void HremdSteve::print_status()
477 | {
478 | if (universe->uscreen) {
479 | fprintf(universe->uscreen,BIGINT_FORMAT,update->ntimestep);
480 | for (int i = 0; i < nworlds; i++)
481 | fprintf(universe->uscreen," %d",world2temp[i]);
482 | fprintf(universe->uscreen,"\n");
483 | }
484 | if (universe->ulogfile) {
485 | fprintf(universe->ulogfile,BIGINT_FORMAT,update->ntimestep);
486 | for (int i = 0; i < nworlds; i++)
487 | fprintf(universe->ulogfile," %d",world2temp[i]);
488 | fprintf(universe->ulogfile,"\n");
489 | fflush(universe->ulogfile);
490 | }
491 | }
492 |
--------------------------------------------------------------------------------
/lammps_custom_src/hremd_steve.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | #ifdef COMMAND_CLASS
15 |
16 | CommandStyle(hremd_steve,HremdSteve)
17 |
18 | #else
19 |
20 | #ifndef LMP_HREMD_STEVE_H
21 | #define LMP_HREMD_STEVE_H
22 |
23 | #include "pointers.h"
24 |
25 | namespace LAMMPS_NS {
26 |
27 | class HremdSteve : protected Pointers {
28 | public:
29 | HremdSteve(class LAMMPS *);
30 | ~HremdSteve();
31 | void command(int, char **);
32 |
33 | private:
34 | int me,me_universe; // my proc ID in world and universe
35 | int iworld,nworlds; // world info
36 | double boltz; // copy from output->boltz
37 | MPI_Comm roots; // MPI comm with 1 root proc from each world
38 | class RanPark *ranswap,*ranboltz; // RNGs for swapping and Boltz factor
39 | int nevery; // # of timesteps between swaps
40 | int nswaps; // # of tempering swaps to perform
41 | int seed_swap; // 0 = toggle swaps, n = RNG for swap direction
42 | int seed_boltz; // seed for Boltz factor comparison
43 | // int whichfix; // index of temperature fix to use
44 | // int whichfix2; // index of temperature fix to use
45 | int fixstyle; // what kind of temperature fix is used
46 |
47 | // use kappas in places of temp, TODO: change variable names to kappa, added by Steve
48 | int my_set_temp; // which set temp I am simulating
49 | double *set_temp; // static list of replica set temperatures
50 | int *temp2world; // temp2world[i] = world simulating set temp i
51 | int *world2temp; // world2temp[i] = temp simulated by world i
52 | int *world2root; // world2root[i] = root proc of world i
53 |
54 | void scale_velocities(int, int);
55 | void print_status();
56 | void reset_velocities(double);
57 | };
58 |
59 | }
60 |
61 | #endif
62 | #endif
63 |
64 | /* ERROR/WARNING messages:
65 |
66 | E: Must have more than one processor partition to temper
67 |
68 | Cannot use the temper command with only one processor partition. Use
69 | the -partition command-line option.
70 |
71 | E: HremdSteve command before simulation box is defined
72 |
73 | The temper command cannot be used before a read_data, read_restart, or
74 | create_box command.
75 |
76 | E: Illegal ... command
77 |
78 | Self-explanatory. Check the input script syntax and compare to the
79 | documentation for the command. You can use -echo screen as a
80 | command-line option when running LAMMPS to see the offending line.
81 |
82 | E: HremdSteveing fix ID is not defined
83 |
84 | The fix ID specified by the temper command does not exist.
85 |
86 | E: Illegal temperature index
87 |
88 | UNDOCUMENTED
89 |
90 | E: Invalid frequency in temper command
91 |
92 | Nevery must be > 0.
93 |
94 | E: Non integer # of swaps in temper command
95 |
96 | Swap frequency in temper command must evenly divide the total # of
97 | timesteps.
98 |
99 | E: HremdSteveing temperature fix is not supported
100 |
101 | UNDOCUMENTED
102 |
103 | E: Too many timesteps
104 |
105 | The cumulative timesteps must fit in a 64-bit integer.
106 |
107 | E: HremdSteveing could not find thermo_pe compute
108 |
109 | This compute is created by the thermo command. It must have been
110 | explicitly deleted by a uncompute command.
111 |
112 | U: HremdSteveing temperature fix is not valid
113 |
114 | The fix specified by the temper command is not one that controls
115 | temperature (nvt or langevin).
116 |
117 | */
118 |
--------------------------------------------------------------------------------
/lammps_custom_src/neighbor.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | #ifndef LMP_NEIGHBOR_H
15 | #define LMP_NEIGHBOR_H
16 |
17 | #include "pointers.h"
18 |
19 | namespace LAMMPS_NS {
20 |
21 | class Neighbor : protected Pointers {
22 | public:
23 | enum{NSQ,BIN,MULTI};
24 | int style; // 0,1,2 = nsq, bin, multi
25 | int every; // build every this many steps
26 | int delay; // delay build for this many steps
27 | int dist_check; // 0 = always build, 1 = only if 1/2 dist
28 | int ago; // how many steps ago neighboring occurred
29 | int pgsize; // size of neighbor page
30 | int oneatom; // max # of neighbors for one atom
31 | int includegroup; // only build pairwise lists for this group
32 | int build_once; // 1 if only build lists once per run
33 |
34 | double skin; // skin distance
35 | double cutneighmin; // min neighbor cutoff for all type pairs
36 | double cutneighmax; // max neighbor cutoff for all type pairs
37 | double cutneighmaxsq; // cutneighmax squared
38 | double **cutneighsq; // neighbor cutneigh sq for each type pair
39 | double **cutneighghostsq; // cutneigh sq for each ghost type pair
40 | double *cuttype; // for each type, max neigh cut w/ others
41 | double *cuttypesq; // cuttype squared
42 | double cut_inner_sq; // outer cutoff for inner neighbor list
43 | double cut_middle_sq; // outer cutoff for middle neighbor list
44 | double cut_middle_inside_sq; // inner cutoff for middle neighbor list
45 |
46 | int binsizeflag; // user-chosen bin size
47 | double binsize_user; // set externally by some accelerator pkgs
48 |
49 | bigint ncalls; // # of times build has been called
50 | bigint ndanger; // # of dangerous builds
51 | bigint lastcall; // timestep of last neighbor::build() call
52 |
53 | // geometry and static info, used by other Neigh classes
54 |
55 | double *bboxlo,*bboxhi; // ptrs to full domain bounding box
56 | // different for orthog vs triclinic
57 |
58 | // exclusion info, used by NeighPair
59 |
60 | int exclude; // 0 if no type/group exclusions, 1 if yes
61 |
62 | int nex_type; // # of entries in type exclusion list
63 | int *ex1_type,*ex2_type; // pairs of types to exclude
64 | int **ex_type; // 2d array of excluded type pairs
65 |
66 | int nex_group; // # of entries in group exclusion list
67 | int *ex1_group,*ex2_group; // pairs of group #'s to exclude
68 | int *ex1_bit,*ex2_bit; // pairs of group bits to exclude
69 |
70 | int nex_mol; // # of entries in molecule exclusion list
71 | int *ex_mol_group; // molecule group #'s to exclude
72 | int *ex_mol_bit; // molecule group bits to exclude
73 | int *ex_mol_intra; // 0 = exclude if in 2 molecules (inter)
74 | // 1 = exclude if in same molecule (intra)
75 |
76 | // special info, used by NeighPair
77 |
78 | int special_flag[4]; // flags for 1-2, 1-3, 1-4 neighbors
79 |
80 | // cluster setting, used by NeighTopo
81 |
82 | int cluster_check; // 1 if check bond/angle/etc satisfies minimg
83 |
84 | // pairwise neighbor lists and corresponding requests
85 |
86 | int nlist; // # of pairwise neighbor lists
87 | int nrequest; // # of requests, same as nlist
88 | int old_nrequest; // # of requests for previous run
89 |
90 | class NeighList **lists;
91 | class NeighRequest **requests; // from Pair,Fix,Compute,Command classes
92 | class NeighRequest **old_requests; // copy of requests to compare to
93 |
94 | // data from topology neighbor lists
95 |
96 | int nbondlist; // list of bonds to compute
97 | int **bondlist;
98 | int nanglelist; // list of angles to compute
99 | int **anglelist;
100 | int ndihedrallist; // list of dihedrals to compute
101 | int **dihedrallist;
102 | int nimproperlist; // list of impropers to compute
103 | int **improperlist;
104 |
105 | // public methods
106 |
107 | Neighbor(class LAMMPS *);
108 | virtual ~Neighbor();
109 | virtual void init();
110 | int request(void *, int instance=0);
111 | int decide(); // decide whether to build or not
112 | virtual int check_distance(); // check max distance moved since last build
113 | void setup_bins(); // setup bins based on box and cutoff
114 | virtual void build(int); // build all perpetual neighbor lists
115 | virtual void build_topology(); // pairwise topology neighbor lists
116 | void build_one(class NeighList *list, int preflag=0);
117 | // create a one-time pairwise neigh list
118 | void set(int, char **); // set neighbor style and skin distance
119 | void reset_timestep(bigint); // reset of timestep counter
120 | void modify_params(int, char**); // modify params that control builds
121 |
122 | void exclusion_group_group_delete(int, int); // rm a group-group exclusion
123 | int exclude_setting(); // return exclude value to accelerator pkg
124 | class NeighRequest *find_request(void *); // find a neighbor request
125 |
126 | bigint memory_usage();
127 |
128 | bigint last_setup_bins; // step of last neighbor::setup_bins() call
129 |
130 | // added by steve
131 | void hremd_modify_cutoff(double);
132 | bool force_rebuild_hremd;
133 |
134 | protected:
135 | int me,nprocs;
136 | int firsttime; // flag for calling init_styles() only once
137 |
138 | int dimension; // 2/3 for 2d/3d
139 | int triclinic; // 0 if domain is orthog, 1 if triclinic
140 | int newton_pair; // 0 if newton off for pairwise, 1 if on
141 |
142 | int must_check; // 1 if must check other classes to reneigh
143 | int restart_check; // 1 if restart enabled, 0 if no
144 | int fix_check; // # of fixes that induce reneigh
145 | int *fixchecklist; // which fixes to check
146 |
147 | double triggersq; // trigger = build when atom moves this dist
148 |
149 | double **xhold; // atom coords at last neighbor build
150 | int maxhold; // size of xhold array
151 |
152 | int boxcheck; // 1 if need to store box size
153 | double boxlo_hold[3],boxhi_hold[3]; // box size at last neighbor build
154 | double corners_hold[8][3]; // box corners at last neighbor build
155 | double (*corners)[3]; // ptr to 8 corners of triclinic box
156 |
157 | double inner[2],middle[2]; // rRESPA cutoffs for extra lists
158 |
159 | int old_style,old_triclinic; // previous run info
160 | int old_pgsize,old_oneatom; // used to avoid re-creating neigh lists
161 |
162 | int nstencil_perpetual; // # of perpetual NeighStencil classes
163 | int npair_perpetual; // #x of perpetual NeighPair classes
164 | int *slist; // indices of them in neigh_stencil
165 | int *plist; // indices of them in neigh_pair
166 |
167 | int maxex_type; // max # in exclusion type list
168 | int maxex_group; // max # in exclusion group list
169 | int maxex_mol; // max # in exclusion molecule list
170 |
171 | int maxatom; // max size of atom-based NeighList arrays
172 | int maxrequest; // max size of NeighRequest list
173 | int maxwt; // max weighting factor applied + 1
174 |
175 | // info for other Neigh classes: NBin,NStencil,NPair,NTopo
176 |
177 | int nbin,nstencil;
178 | int nbclass,nsclass,npclass;
179 | int bondwhich,anglewhich,dihedralwhich,improperwhich;
180 |
181 | typedef class NBin *(*BinCreator)(class LAMMPS *);
182 | BinCreator *binclass;
183 | char **binnames;
184 | int *binmasks;
185 | class NBin **neigh_bin;
186 |
187 | typedef class NStencil *(*StencilCreator)(class LAMMPS *);
188 | StencilCreator *stencilclass;
189 | char **stencilnames;
190 | int *stencilmasks;
191 | class NStencil **neigh_stencil;
192 |
193 | typedef class NPair *(*PairCreator)(class LAMMPS *);
194 | PairCreator *pairclass;
195 | char **pairnames;
196 | int *pairmasks;
197 | class NPair **neigh_pair;
198 |
199 | class NTopo *neigh_bond;
200 | class NTopo *neigh_angle;
201 | class NTopo *neigh_dihedral;
202 | class NTopo *neigh_improper;
203 |
204 | // internal methods
205 | // including creator methods for Nbin,Nstencil,Npair instances
206 |
207 | void init_styles();
208 | int init_pair();
209 | virtual void init_topology();
210 |
211 | void morph_unique();
212 | void morph_skip();
213 | void morph_granular();
214 | void morph_halffull();
215 | void morph_copy();
216 |
217 | void print_pairwise_info();
218 | void requests_new2old();
219 |
220 | int choose_bin(class NeighRequest *);
221 | int choose_stencil(class NeighRequest *);
222 | int choose_pair(class NeighRequest *);
223 |
224 | template static NBin *bin_creator(class LAMMPS *);
225 | template static NStencil *stencil_creator(class LAMMPS *);
226 | template static NPair *pair_creator(class LAMMPS *);
227 |
228 | // dummy functions provided by NeighborKokkos, called in init()
229 | // otherwise NeighborKokkos would have to overwrite init()
230 |
231 | int copymode;
232 |
233 | virtual void init_cutneighsq_kokkos(int) {}
234 | virtual void create_kokkos_list(int) {}
235 | virtual void init_ex_type_kokkos(int) {}
236 | virtual void init_ex_bit_kokkos() {}
237 | virtual void init_ex_mol_bit_kokkos() {}
238 | virtual void grow_ex_mol_intra_kokkos() {}
239 | virtual void set_binsize_kokkos() {}
240 | };
241 |
242 | namespace NeighConst {
243 | static const int NB_INTEL = 1<<0;
244 | static const int NB_KOKKOS_DEVICE = 1<<1;
245 | static const int NB_KOKKOS_HOST = 1<<2;
246 | static const int NB_SSA = 1<<3;
247 |
248 | static const int NS_BIN = 1<<0;
249 | static const int NS_MULTI = 1<<1;
250 | static const int NS_HALF = 1<<2;
251 | static const int NS_FULL = 1<<3;
252 | static const int NS_2D = 1<<4;
253 | static const int NS_3D = 1<<5;
254 | static const int NS_NEWTON = 1<<6;
255 | static const int NS_NEWTOFF = 1<<7;
256 | static const int NS_ORTHO = 1<<8;
257 | static const int NS_TRI = 1<<9;
258 | static const int NS_GHOST = 1<<10;
259 | static const int NS_SSA = 1<<11;
260 |
261 | static const int NP_NSQ = 1<<0;
262 | static const int NP_BIN = 1<<1;
263 | static const int NP_MULTI = 1<<2;
264 | static const int NP_HALF = 1<<3;
265 | static const int NP_FULL = 1<<4;
266 | static const int NP_ORTHO = 1<<5;
267 | static const int NP_TRI = 1<<6;
268 | static const int NP_ATOMONLY = 1<<7;
269 | static const int NP_MOLONLY = 1<<8;
270 | static const int NP_NEWTON = 1<<9;
271 | static const int NP_NEWTOFF = 1<<10;
272 | static const int NP_GHOST = 1<<11;
273 | static const int NP_SIZE = 1<<12;
274 | static const int NP_ONESIDE = 1<<13;
275 | static const int NP_RESPA = 1<<14;
276 | static const int NP_BOND = 1<<15;
277 | static const int NP_OMP = 1<<16;
278 | static const int NP_INTEL = 1<<17;
279 | static const int NP_KOKKOS_DEVICE = 1<<18;
280 | static const int NP_KOKKOS_HOST = 1<<19;
281 | static const int NP_SSA = 1<<20;
282 | static const int NP_COPY = 1<<21;
283 | static const int NP_SKIP = 1<<22;
284 | static const int NP_HALF_FULL = 1<<23;
285 | static const int NP_OFF2ON = 1<<24;
286 | }
287 |
288 | }
289 |
290 | #endif
291 |
292 | /* ERROR/WARNING messages:
293 |
294 | E: Neighbor delay must be 0 or multiple of every setting
295 |
296 | The delay and every parameters set via the neigh_modify command are
297 | inconsistent. If the delay setting is non-zero, then it must be a
298 | multiple of the every setting.
299 |
300 | E: Neighbor page size must be >= 10x the one atom setting
301 |
302 | This is required to prevent wasting too much memory.
303 |
304 | E: Invalid atom type in neighbor exclusion list
305 |
306 | Atom types must range from 1 to Ntypes inclusive.
307 |
308 | W: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies
309 |
310 | This is because excluding specific pair interactions also excludes
311 | them from long-range interactions which may not be the desired effect.
312 | The special_bonds command handles this consistently by insuring
313 | excluded (or weighted) 1-2, 1-3, 1-4 interactions are treated
314 | consistently by both the short-range pair style and the long-range
315 | solver. This is not done for exclusions of charged atom pairs via the
316 | neigh_modify exclude command.
317 |
318 | E: Cannot request an occasional binned neighbor list with ghost info
319 |
320 | UNDOCUMENTED
321 |
322 | E: Requested neighbor bin option does not exist
323 |
324 | UNDOCUMENTED
325 |
326 | E: Requested neighbor stencil method does not exist
327 |
328 | UNDOCUMENTED
329 |
330 | E: Requested neighbor pair method does not exist
331 |
332 | UNDOCUMENTED
333 |
334 | E: Could not assign bin method to neighbor stencil
335 |
336 | UNDOCUMENTED
337 |
338 | E: Could not assign bin method to neighbor pair
339 |
340 | UNDOCUMENTED
341 |
342 | E: Could not assign stencil method to neighbor pair
343 |
344 | UNDOCUMENTED
345 |
346 | E: Neighbor include group not allowed with ghost neighbors
347 |
348 | This is a current restriction within LAMMPS.
349 |
350 | E: Too many local+ghost atoms for neighbor list
351 |
352 | The number of nlocal + nghost atoms on a processor
353 | is limited by the size of a 32-bit integer with 2 bits
354 | removed for masking 1-2, 1-3, 1-4 neighbors.
355 |
356 | E: Trying to build an occasional neighbor list before initialization completed
357 |
358 | This is not allowed. Source code caller needs to be modified.
359 |
360 | E: Neighbor build one invoked on perpetual list
361 |
362 | UNDOCUMENTED
363 |
364 | E: Illegal ... command
365 |
366 | Self-explanatory. Check the input script syntax and compare to the
367 | documentation for the command. You can use -echo screen as a
368 | command-line option when running LAMMPS to see the offending line.
369 |
370 | E: Invalid group ID in neigh_modify command
371 |
372 | A group ID used in the neigh_modify command does not exist.
373 |
374 | E: Neigh_modify include group != atom_modify first group
375 |
376 | Self-explanatory.
377 |
378 | E: Neigh_modify exclude molecule requires atom attribute molecule
379 |
380 | Self-explanatory.
381 |
382 | E: Unable to find group-group exclusion
383 |
384 | UNDOCUMENTED
385 |
386 | U: Neighbor multi not yet enabled for ghost neighbors
387 |
388 | This is a current restriction within LAMMPS.
389 |
390 | U: Neighbor multi not yet enabled for granular
391 |
392 | Self-explanatory.
393 |
394 | U: Neighbor multi not yet enabled for rRESPA
395 |
396 | Self-explanatory.
397 |
398 | U: Domain too large for neighbor bins
399 |
400 | The domain has become extremely large so that neighbor bins cannot be
401 | used. Most likely, one or more atoms have been blown out of the
402 | simulation box to a great distance.
403 |
404 | U: Cannot use neighbor bins - box size << cutoff
405 |
406 | Too many neighbor bins will be created. This typically happens when
407 | the simulation box is very small in some dimension, compared to the
408 | neighbor cutoff. Use the "nsq" style instead of "bin" style.
409 |
410 | U: Too many neighbor bins
411 |
412 | This is likely due to an immense simulation box that has blown up
413 | to a large size.
414 |
415 | */
416 |
--------------------------------------------------------------------------------
/lammps_custom_src/pair_aniso.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | #ifdef PAIR_CLASS
15 |
16 | PairStyle(aniso,PairAniso)
17 |
18 | #else
19 |
20 | #ifndef LMP_PAIR_ANISO_H
21 | #define LMP_PAIR_ANSIO_H
22 |
23 | #include "pair.h"
24 |
25 | namespace LAMMPS_NS {
26 |
27 | class PairAniso : public Pair {
28 | public:
29 | PairAniso(LAMMPS *lmp);
30 | virtual ~PairAniso();
31 | virtual void compute(int, int);
32 | virtual void settings(int, char **);
33 | void coeff(int, char **);
34 | virtual void init_style();
35 | double init_one(int, int);
36 | void write_restart(FILE *);
37 | void read_restart(FILE *);
38 | void write_restart_settings(FILE *);
39 | void read_restart_settings(FILE *);
40 | void write_data(FILE *);
41 | void write_data_all(FILE *);
42 |
43 | protected:
44 | enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE};
45 |
46 | double cut_global;
47 | double **cut;
48 |
49 | double gamma,upsilon,mu; // Gay-Berne parameters
50 | double **shape1; // per-type radii in x, y and z
51 | double **shape2; // per-type radii in x, y and z SQUARED
52 | double *lshape; // precalculation based on the shape
53 | double **well; // well depth scaling along each axis ^ -1.0/mu
54 | double **epsilon,**sigma; // epsilon and sigma values for atom-type pairs
55 | double **mycut;
56 |
57 | int **form;
58 | double **lj1,**lj2,**lj3,**lj4;
59 | double **offset;
60 | int *setwell;
61 | class AtomVecEllipsoid *avec;
62 |
63 | void allocate();
64 | double gayberne_analytic(const int i, const int j, double a1[3][3],
65 | double a2[3][3], double b1[3][3], double b2[3][3],
66 | double g1[3][3], double g2[3][3], double *r12,
67 | const double rsq, double *fforce, double *ttor,
68 | double *rtor);
69 | double gayberne_lj(const int i, const int j, double a1[3][3],
70 | double b1[3][3],double g1[3][3],double *r12,
71 | const double rsq, double *fforce, double *ttor);
72 | void compute_eta_torque(double m[3][3], double m2[3][3],
73 | double *s, double ans[3][3]);
74 |
75 | double cosine_sq_E(const double r, const double E, const double sigma, const double rcut);
76 | double dcosine_sq_dr(const double r, const double E, const double sigma, const double rcut);
77 | };
78 |
79 | }
80 | #endif
81 | #endif
82 |
83 | /* ERROR/WARNING messages:
84 |
85 | E: Illegal ... command
86 |
87 | Self-explanatory. Check the input script syntax and compare to the
88 | documentation for the command. You can use -echo screen as a
89 | command-line option when running LAMMPS to see the offending line.
90 |
91 | E: Incorrect args for pair coefficients
92 |
93 | Self-explanatory. Check the input script or data file.
94 |
95 | E: Pair gayberne requires atom style ellipsoid
96 |
97 | Self-explanatory.
98 |
99 | E: Pair gayberne requires atoms with same type have same shape
100 |
101 | Self-explanatory.
102 |
103 | E: Pair gayberne epsilon a,b,c coeffs are not all set
104 |
105 | Each atom type involved in pair_style gayberne must
106 | have these 3 coefficients set at least once.
107 |
108 | E: Bad matrix inversion in mldivide3
109 |
110 | This error should not occur unless the matrix is badly formed.
111 |
112 | */
113 |
--------------------------------------------------------------------------------
/lammps_custom_src/pair_ljlambda.cpp:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | ------------------------------------------------------------------------- */
13 |
14 | #include "math.h"
15 | #include "stdio.h"
16 | #include "stdlib.h"
17 | #include "string.h"
18 | #include "pair_ljlambda.h"
19 | #include "atom.h"
20 | #include "comm.h"
21 | #include "force.h"
22 | #include "neighbor.h"
23 | #include "neigh_list.h"
24 | #include "math_const.h"
25 | #include "memory.h"
26 | #include "error.h"
27 |
28 | using namespace LAMMPS_NS;
29 | using namespace MathConst;
30 |
31 | /* ---------------------------------------------------------------------- */
32 |
33 | PairLJLambda::PairLJLambda(LAMMPS *lmp) : Pair(lmp)
34 | {
35 | writedata = 1;
36 | }
37 |
38 | /* ---------------------------------------------------------------------- */
39 |
40 | PairLJLambda::~PairLJLambda()
41 | {
42 | if (allocated) {
43 | memory->destroy(setflag);
44 | memory->destroy(cutsq);
45 |
46 | memory->destroy(cut_lj);
47 | memory->destroy(cut_ljsq);
48 | memory->destroy(cut_coul);
49 | memory->destroy(cut_coulsq);
50 | memory->destroy(epsilon);
51 | memory->destroy(sigma);
52 | memory->destroy(lj1);
53 | memory->destroy(lj2);
54 | memory->destroy(lj3);
55 | memory->destroy(lj4);
56 | memory->destroy(offset);
57 | memory->destroy(lambda); //JM
58 | }
59 | }
60 |
61 | /* ---------------------------------------------------------------------- */
62 |
63 | void PairLJLambda::compute(int eflag, int vflag)
64 | {
65 | int i,j,ii,jj,inum,jnum,itype,jtype;
66 | double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
67 | double rsq,r2inv,r6inv,forcecoul,forcelj,factor_coul,factor_lj;
68 | int *ilist,*jlist,*numneigh,**firstneigh;
69 | double r, rinv, screening;
70 |
71 | double TWO_1_3 = pow(2.0,(1.0/3.0)); //JM
72 |
73 | evdwl = ecoul = 0.0;
74 | if (eflag || vflag) ev_setup(eflag,vflag);
75 | else evflag = vflag_fdotr = 0;
76 |
77 | double **x = atom->x;
78 | double **f = atom->f;
79 | double *q = atom->q;
80 | int *type = atom->type;
81 | int nlocal = atom->nlocal;
82 | double *special_coul = force->special_coul;
83 | double *special_lj = force->special_lj;
84 | int newton_pair = force->newton_pair;
85 | double qqrd2e = force->qqrd2e;
86 |
87 | inum = list->inum;
88 | ilist = list->ilist;
89 | numneigh = list->numneigh;
90 | firstneigh = list->firstneigh;
91 |
92 | // loop over neighbors of my atoms
93 |
94 | for (ii = 0; ii < inum; ii++) {
95 | i = ilist[ii];
96 | qtmp = q[i];
97 | xtmp = x[i][0];
98 | ytmp = x[i][1];
99 | ztmp = x[i][2];
100 | itype = type[i];
101 | jlist = firstneigh[i];
102 | jnum = numneigh[i];
103 |
104 | for (jj = 0; jj < jnum; jj++) {
105 | j = jlist[jj];
106 | factor_lj = special_lj[sbmask(j)];
107 | factor_coul = special_coul[sbmask(j)];
108 | j &= NEIGHMASK;
109 |
110 | delx = xtmp - x[j][0];
111 | dely = ytmp - x[j][1];
112 | delz = ztmp - x[j][2];
113 | rsq = delx*delx + dely*dely + delz*delz;
114 | jtype = type[j];
115 |
116 | if (rsq < cutsq[itype][jtype]) {
117 | r2inv = 1.0/rsq;
118 | //JM
119 | if (rsq < cut_coulsq[itype][jtype]) {
120 | r = sqrt(rsq);
121 | rinv = 1.0/r;
122 | screening = exp(-kappa*r);
123 | forcecoul = qqrd2e * qtmp*q[j] * screening * (kappa + rinv);
124 | } else forcecoul = 0.0; //JM
125 | // forcecoul = qqrd2e * qtmp*q[j]*sqrt(r2inv);
126 | // else forcecoul = 0.0;
127 |
128 | if (rsq < cut_ljsq[itype][jtype]) {
129 | r6inv = r2inv*r2inv*r2inv;
130 | //JM
131 | if (rsq <= TWO_1_3*sigma[itype][jtype]*sigma[itype][jtype])
132 | forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
133 | else
134 | forcelj = lambda[itype][jtype] * r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); //JM
135 | } else forcelj = 0.0;
136 |
137 | fpair = (factor_coul*forcecoul + factor_lj*forcelj) * r2inv;
138 |
139 | f[i][0] += delx*fpair;
140 | f[i][1] += dely*fpair;
141 | f[i][2] += delz*fpair;
142 | if (newton_pair || j < nlocal) {
143 | f[j][0] -= delx*fpair;
144 | f[j][1] -= dely*fpair;
145 | f[j][2] -= delz*fpair;
146 | }
147 |
148 | if (eflag) {
149 | if (rsq < cut_coulsq[itype][jtype])
150 | ecoul = factor_coul * qqrd2e * qtmp*q[j] * rinv * screening; //ecoul = factor_coul * qqrd2e * qtmp*q[j]*sqrt(r2inv);
151 | else ecoul = 0.0;
152 | if (rsq < cut_ljsq[itype][jtype]) {
153 | //JM
154 | if (rsq <= TWO_1_3*sigma[itype][jtype]*sigma[itype][jtype])
155 | evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) + (1-lambda[itype][jtype])*epsilon[itype][jtype];
156 | else
157 | evdwl = lambda[itype][jtype]*r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) - offset[itype][jtype];
158 | //JM
159 | evdwl *= factor_lj;
160 | } else evdwl = 0.0;
161 | }
162 |
163 | if (evflag) ev_tally(i,j,nlocal,newton_pair,
164 | evdwl,ecoul,fpair,delx,dely,delz);
165 | }
166 | }
167 | }
168 |
169 | if (vflag_fdotr) virial_fdotr_compute();
170 | }
171 |
172 | /* ----------------------------------------------------------------------
173 | allocate all arrays
174 | ------------------------------------------------------------------------- */
175 |
176 | void PairLJLambda::allocate()
177 | {
178 | allocated = 1;
179 | int n = atom->ntypes;
180 |
181 | memory->create(setflag,n+1,n+1,"pair:setflag");
182 | for (int i = 1; i <= n; i++)
183 | for (int j = i; j <= n; j++)
184 | setflag[i][j] = 0;
185 |
186 | memory->create(cutsq,n+1,n+1,"pair:cutsq");
187 |
188 | memory->create(cut_lj,n+1,n+1,"pair:cut_lj");
189 | memory->create(cut_ljsq,n+1,n+1,"pair:cut_ljsq");
190 | memory->create(cut_coul,n+1,n+1,"pair:cut_coul");
191 | memory->create(cut_coulsq,n+1,n+1,"pair:cut_coulsq");
192 | memory->create(epsilon,n+1,n+1,"pair:epsilon");
193 | memory->create(sigma,n+1,n+1,"pair:sigma");
194 | memory->create(lj1,n+1,n+1,"pair:lj1");
195 | memory->create(lj2,n+1,n+1,"pair:lj2");
196 | memory->create(lj3,n+1,n+1,"pair:lj3");
197 | memory->create(lj4,n+1,n+1,"pair:lj4");
198 | memory->create(offset,n+1,n+1,"pair:offset");
199 | memory->create(lambda,n+1,n+1,"pair:lambda"); //JM
200 | }
201 |
202 | /* ----------------------------------------------------------------------
203 | global settings
204 | ------------------------------------------------------------------------- */
205 |
206 | void PairLJLambda::settings(int narg, char **arg)
207 | {
208 | if (narg < 2 || narg > 3) error->all(FLERR,"Illegal pair_style command");
209 |
210 | kappa = force->numeric(FLERR,arg[0]);
211 | cut_lj_global = force->numeric(FLERR,arg[1]);
212 | if (narg == 1) cut_coul_global = cut_lj_global;
213 | else cut_coul_global = force->numeric(FLERR,arg[2]);
214 |
215 | // reset cutoffs that have been explicitly set
216 |
217 | if (allocated) {
218 | int i,j;
219 | for (i = 1; i <= atom->ntypes; i++)
220 | for (j = i+1; j <= atom->ntypes; j++)
221 | if (setflag[i][j]) {
222 | cut_lj[i][j] = cut_lj_global;
223 | cut_coul[i][j] = cut_coul_global;
224 | }
225 | }
226 | }
227 |
228 | /* ----------------------------------------------------------------------
229 | set coeffs for one or more type pairs
230 | ------------------------------------------------------------------------- */
231 |
232 | void PairLJLambda::coeff(int narg, char **arg)
233 | {
234 | if (narg < 5 || narg > 7)
235 | error->all(FLERR,"Incorrect args for pair coefficients");
236 | if (!allocated) allocate();
237 |
238 | int ilo,ihi,jlo,jhi;
239 | force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
240 | force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
241 |
242 | double epsilon_one = force->numeric(FLERR,arg[2]);
243 | double sigma_one = force->numeric(FLERR,arg[3]);
244 | double lambda_one = force->numeric(FLERR,arg[4]); //JM
245 |
246 | double cut_lj_one = cut_lj_global;
247 | double cut_coul_one = cut_coul_global;
248 | if (narg >= 6) cut_coul_one = cut_lj_one = force->numeric(FLERR,arg[5]);
249 | if (narg == 7) cut_coul_one = force->numeric(FLERR,arg[6]);
250 |
251 | int count = 0;
252 | for (int i = ilo; i <= ihi; i++) {
253 | for (int j = MAX(jlo,i); j <= jhi; j++) {
254 | epsilon[i][j] = epsilon_one;
255 | sigma[i][j] = sigma_one;
256 | lambda[i][j] = lambda_one; //JM
257 | cut_lj[i][j] = cut_lj_one;
258 | cut_coul[i][j] = cut_coul_one;
259 | setflag[i][j] = 1;
260 | count++;
261 | }
262 | }
263 |
264 | if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
265 | }
266 |
267 | /* ----------------------------------------------------------------------
268 | init specific to this pair style
269 | ------------------------------------------------------------------------- */
270 |
271 | void PairLJLambda::init_style()
272 | {
273 | if (!atom->q_flag)
274 | error->all(FLERR,"Pair style ljlambda requires atom attribute q");
275 |
276 | neighbor->request(this,instance_me);
277 | }
278 |
279 | /* ----------------------------------------------------------------------
280 | init for one type pair i,j and corresponding j,i
281 | ------------------------------------------------------------------------- */
282 |
283 | double PairLJLambda::init_one(int i, int j)
284 | {
285 | if (setflag[i][j] == 0) {
286 | epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j],
287 | sigma[i][i],sigma[j][j]);
288 | sigma[i][j] = mix_distance(sigma[i][i],sigma[j][j]);
289 | cut_lj[i][j] = mix_distance(cut_lj[i][i],cut_lj[j][j]);
290 | cut_coul[i][j] = mix_distance(cut_coul[i][i],cut_coul[j][j]);
291 | }
292 |
293 | double cut = MAX(cut_lj[i][j],cut_coul[i][j]);
294 | cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j];
295 | cut_coulsq[i][j] = cut_coul[i][j] * cut_coul[i][j];
296 |
297 | lj1[i][j] = 48.0 * epsilon[i][j] * pow(sigma[i][j],12.0);
298 | lj2[i][j] = 24.0 * epsilon[i][j] * pow(sigma[i][j],6.0);
299 | lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0);
300 | lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0);
301 |
302 | if (offset_flag) {
303 | double ratio = sigma[i][j] / cut_lj[i][j];
304 | offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0));
305 | } else offset[i][j] = 0.0;
306 |
307 | cut_ljsq[j][i] = cut_ljsq[i][j];
308 | cut_coulsq[j][i] = cut_coulsq[i][j];
309 | lj1[j][i] = lj1[i][j];
310 | lj2[j][i] = lj2[i][j];
311 | lj3[j][i] = lj3[i][j];
312 | lj4[j][i] = lj4[i][j];
313 | lambda[j][i] = lambda[i][j]; //JM
314 | sigma[j][i] = sigma[i][j]; //JM
315 | epsilon[j][i] = epsilon[i][j]; //JM
316 | offset[j][i] = offset[i][j];
317 |
318 | // compute I,J contribution to long-range tail correction
319 | // count total # of atoms of type I and J via Allreduce
320 |
321 | if (tail_flag) {
322 | int *type = atom->type;
323 | int nlocal = atom->nlocal;
324 |
325 | double count[2],all[2];
326 | count[0] = count[1] = 0.0;
327 | for (int k = 0; k < nlocal; k++) {
328 | if (type[k] == i) count[0] += 1.0;
329 | if (type[k] == j) count[1] += 1.0;
330 | }
331 | MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world);
332 |
333 | double sig2 = sigma[i][j]*sigma[i][j];
334 | double sig6 = sig2*sig2*sig2;
335 | double rc3 = cut_lj[i][j]*cut_lj[i][j]*cut_lj[i][j];
336 | double rc6 = rc3*rc3;
337 | double rc9 = rc3*rc6;
338 | etail_ij = 8.0*MY_PI*all[0]*all[1]*epsilon[i][j] *
339 | sig6 * (sig6 - 3.0*rc6) / (9.0*rc9);
340 | ptail_ij = 16.0*MY_PI*all[0]*all[1]*epsilon[i][j] *
341 | sig6 * (2.0*sig6 - 3.0*rc6) / (9.0*rc9);
342 | }
343 |
344 | return cut;
345 | }
346 |
347 | /* ----------------------------------------------------------------------
348 | proc 0 writes to restart file
349 | ------------------------------------------------------------------------- */
350 |
351 | void PairLJLambda::write_restart(FILE *fp)
352 | {
353 | write_restart_settings(fp);
354 |
355 | int i,j;
356 | for (i = 1; i <= atom->ntypes; i++)
357 | for (j = i; j <= atom->ntypes; j++) {
358 | fwrite(&setflag[i][j],sizeof(int),1,fp);
359 | if (setflag[i][j]) {
360 | fwrite(&epsilon[i][j],sizeof(double),1,fp);
361 | fwrite(&sigma[i][j],sizeof(double),1,fp);
362 | fwrite(&lambda[i][j],sizeof(double),1,fp);
363 | fwrite(&cut_lj[i][j],sizeof(double),1,fp);
364 | fwrite(&cut_coul[i][j],sizeof(double),1,fp);
365 | }
366 | }
367 | }
368 |
369 | /* ----------------------------------------------------------------------
370 | proc 0 reads from restart file, bcasts
371 | ------------------------------------------------------------------------- */
372 |
373 | void PairLJLambda::read_restart(FILE *fp)
374 | {
375 | read_restart_settings(fp);
376 | allocate();
377 |
378 | int i,j;
379 | int me = comm->me;
380 | for (i = 1; i <= atom->ntypes; i++)
381 | for (j = i; j <= atom->ntypes; j++) {
382 | if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
383 | MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
384 | if (setflag[i][j]) {
385 | if (me == 0) {
386 | fread(&epsilon[i][j],sizeof(double),1,fp);
387 | fread(&sigma[i][j],sizeof(double),1,fp);
388 | fread(&lambda[i][j],sizeof(double),1,fp);
389 | fread(&cut_lj[i][j],sizeof(double),1,fp);
390 | fread(&cut_coul[i][j],sizeof(double),1,fp);
391 | }
392 | MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
393 | MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
394 | MPI_Bcast(&lambda[i][j],1,MPI_DOUBLE,0,world);
395 | MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world);
396 | MPI_Bcast(&cut_coul[i][j],1,MPI_DOUBLE,0,world);
397 | }
398 | }
399 | }
400 |
401 | /* ----------------------------------------------------------------------
402 | proc 0 writes to restart file
403 | ------------------------------------------------------------------------- */
404 |
405 | void PairLJLambda::write_restart_settings(FILE *fp)
406 | {
407 | fwrite(&cut_lj_global,sizeof(double),1,fp);
408 | fwrite(&cut_coul_global,sizeof(double),1,fp);
409 | fwrite(&kappa,sizeof(double),1,fp);
410 | fwrite(&offset_flag,sizeof(int),1,fp);
411 | fwrite(&mix_flag,sizeof(int),1,fp);
412 | fwrite(&tail_flag,sizeof(int),1,fp);
413 | }
414 |
415 | /* ----------------------------------------------------------------------
416 | proc 0 reads from restart file, bcasts
417 | ------------------------------------------------------------------------- */
418 |
419 | void PairLJLambda::read_restart_settings(FILE *fp)
420 | {
421 | if (comm->me == 0) {
422 | fread(&cut_lj_global,sizeof(double),1,fp);
423 | fread(&cut_coul_global,sizeof(double),1,fp);
424 | fread(&kappa,sizeof(double),1,fp);
425 | fread(&offset_flag,sizeof(int),1,fp);
426 | fread(&mix_flag,sizeof(int),1,fp);
427 | fread(&tail_flag,sizeof(int),1,fp);
428 | }
429 | MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
430 | MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world);
431 | MPI_Bcast(&kappa,1,MPI_DOUBLE,0,world);
432 | MPI_Bcast(&offset_flag,1,MPI_INT,0,world);
433 | MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
434 | MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
435 | }
436 |
437 | /* ----------------------------------------------------------------------
438 | proc 0 writes to data file
439 | ------------------------------------------------------------------------- */
440 |
441 | void PairLJLambda::write_data(FILE *fp)
442 | {
443 | for (int i = 1; i <= atom->ntypes; i++)
444 | fprintf(fp,"%d %g %g \n",i,epsilon[i][i],sigma[i][i]);
445 | }
446 |
447 | /* ----------------------------------------------------------------------
448 | proc 0 writes all pairs to data file
449 | ------------------------------------------------------------------------- */
450 |
451 | void PairLJLambda::write_data_all(FILE *fp)
452 | {
453 | for (int i = 1; i <= atom->ntypes; i++)
454 | for (int j = i; j <= atom->ntypes; j++)
455 | fprintf(fp,"%d %d %g %g %g \n",i,j,epsilon[i][j],sigma[i][j],cut_lj[i][j]);
456 | }
457 |
458 | /* ---------------------------------------------------------------------- */
459 |
460 | double PairLJLambda::single(int i, int j, int itype, int jtype,
461 | double rsq,
462 | double factor_coul, double factor_lj,
463 | double &fforce)
464 | {
465 | double r2inv,r6inv,forcecoul,forcelj,phicoul,philj;
466 | double r,rinv,screening;
467 |
468 | double TWO_1_3 = pow(2.0,(1.0/3.0));
469 |
470 | r2inv = 1.0/rsq;
471 | if (rsq < cut_coulsq[itype][jtype]) {
472 | r = sqrt(rsq);
473 | rinv = 1.0/r;
474 | screening = exp(-kappa*r);
475 | forcecoul = force->qqrd2e * atom->q[i]*atom->q[j] * screening * (kappa + rinv);
476 | } else forcecoul = 0.0;
477 | // forcecoul = force->qqrd2e * atom->q[i]*atom->q[j]*sqrt(r2inv);
478 | // else forcecoul = 0.0;
479 | if (rsq < cut_ljsq[itype][jtype]) {
480 | r6inv = r2inv*r2inv*r2inv;
481 | if (rsq <= TWO_1_3*sigma[itype][jtype]*sigma[itype][jtype])
482 | forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
483 | else
484 | forcelj = lambda[itype][jtype] * r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
485 | }
486 | //forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
487 | //} else forcelj = 0.0;
488 |
489 | fforce = (factor_coul*forcecoul + factor_lj*forcelj) * r2inv;
490 |
491 | double eng = 0.0;
492 | if (rsq < cut_coulsq[itype][jtype]) {
493 | phicoul = force->qqrd2e * atom->q[i]*atom->q[j] * rinv * screening; //phicoul = force->qqrd2e * atom->q[i]*atom->q[j]*sqrt(r2inv);
494 | eng += factor_coul*phicoul;
495 | }
496 | if (rsq < cut_ljsq[itype][jtype]) {
497 | if (rsq <= TWO_1_3*sigma[itype][jtype]*sigma[itype][jtype])
498 | philj = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) + (1-lambda[itype][jtype])*epsilon[itype][jtype];
499 | else
500 | philj = lambda[itype][jtype]*r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) - offset[itype][jtype];
501 | // philj = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) -
502 | // offset[itype][jtype];
503 | eng += factor_lj*philj;
504 | }
505 |
506 | return eng;
507 | }
508 |
509 |
510 | void *PairLJLambda::extract(const char *str, int &dim)
511 | {
512 | dim = 0;
513 | if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;
514 | dim = 2;
515 | if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
516 | if (strcmp(str,"sigma") == 0) return (void *) sigma;
517 | if (strcmp(str,"lambda") == 0) return (void *) lambda;
518 | return NULL;
519 | }
520 |
521 | /* ----------------------------------------------------------------------
522 | changes kappa and cutoffs for HREMD, added by Steve
523 | ------------------------------------------------------------------------- */
524 | double PairLJLambda::change_kappa(double new_kappa)
525 | {
526 | //printf("here, k = %f, setting new k to %f\n",kappa, new_kappa);
527 | double old_kappa = kappa;
528 | kappa = new_kappa;
529 | double new_hremd_cutoff = 3.5/new_kappa;
530 |
531 | //// call init_one() for each I,J
532 | //// set cutsq for each I,J, used to neighbor
533 | //// cutforce = max of all I,J cutoffs
534 | cut_coul_global = new_hremd_cutoff;
535 | cutforce = new_hremd_cutoff;
536 | double cut;
537 |
538 | for (int i = 1; i <= atom->ntypes; i++){
539 | for (int j = i; j <= atom->ntypes; j++) {
540 |
541 | if (cut_coul[i][j]>0.0000001){ // floating point zero
542 | cut_coul[i][j] = cut_coul[j][i] = new_hremd_cutoff;
543 |
544 | cut = init_one(i,j);
545 | cutsq[i][j] = cutsq[j][i] = cut*cut;
546 | }
547 | }
548 | }
549 |
550 | return old_kappa;
551 | }
552 |
553 | void PairLJLambda::compute_ecoul_steve(double * old_E_tot, double * new_E_tot, double old_kappa, double new_kappa){
554 |
555 | int i,j,ii,jj,inum,jnum,itype,jtype;
556 | double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
557 | double rsq,r2inv,r6inv,forcecoul,forcelj,factor_coul,factor_lj;
558 | int *ilist,*jlist,*numneigh,**firstneigh;
559 | double r, rinv, old_screening, new_screening;
560 |
561 | double TWO_1_3 = pow(2.0,(1.0/3.0)); //JM
562 |
563 | double old_ecoul = 0.0;
564 | double new_ecoul = 0.0;
565 | double old_hremd_cutoff = 3.5/old_kappa;
566 | double new_hremd_cutoff = 3.5/new_kappa;
567 |
568 | double **x = atom->x;
569 | double *q = atom->q;
570 | int *type = atom->type;
571 | int nlocal = atom->nlocal;
572 | double *special_coul = force->special_coul;
573 | double *special_lj = force->special_lj;
574 | int newton_pair = force->newton_pair;
575 | double qqrd2e = force->qqrd2e;
576 |
577 | inum = list->inum;
578 | ilist = list->ilist;
579 | numneigh = list->numneigh;
580 | firstneigh = list->firstneigh;
581 |
582 | // loop over neighbors of my atoms
583 |
584 | for (ii = 0; ii < inum; ii++) {
585 | i = ilist[ii];
586 | qtmp = q[i];
587 | xtmp = x[i][0];
588 | ytmp = x[i][1];
589 | ztmp = x[i][2];
590 | itype = type[i];
591 | jlist = firstneigh[i];
592 | jnum = numneigh[i];
593 |
594 | for (jj = 0; jj < jnum; jj++) {
595 | j = jlist[jj];
596 | factor_lj = special_lj[sbmask(j)];
597 | factor_coul = special_coul[sbmask(j)];
598 | j &= NEIGHMASK;
599 |
600 | delx = xtmp - x[j][0];
601 | dely = ytmp - x[j][1];
602 | delz = ztmp - x[j][2];
603 | rsq = delx*delx + dely*dely + delz*delz;
604 | jtype = type[j];
605 |
606 | // if charged
607 | double qq = qtmp*q[j];
608 | if (fabs(qq)>0.0000001){ // floating point zero
609 |
610 | //if (rsq < cutsq[itype][jtype]) {
611 | // r2inv = 1.0/rsq;
612 | //JM
613 | //if (rsq < cut_coulsq[itype][jtype]) {
614 | r = sqrt(rsq);
615 | rinv = 1.0/r;
616 |
617 | if( r < old_hremd_cutoff){
618 | old_screening = exp(-old_kappa*r);
619 | old_ecoul += factor_coul * qqrd2e * qq * rinv * old_screening; //ecoul = factor_coul * qqrd2e * qtmp*q[j]*sqrt(r2inv);
620 | }
621 | if( r < new_hremd_cutoff){
622 | new_screening = exp(-new_kappa*r);
623 | new_ecoul += factor_coul * qqrd2e * qq * rinv * new_screening; //ecoul = factor_coul * qqrd2e * qtmp*q[j]*sqrt(r2inv);
624 | }
625 | }
626 | }
627 | }
628 | *old_E_tot = old_ecoul;
629 | *new_E_tot = new_ecoul;
630 | }
631 |
--------------------------------------------------------------------------------
/lammps_custom_src/pair_ljlambda.h:
--------------------------------------------------------------------------------
1 | /* -*- c++ -*- ----------------------------------------------------------
2 | LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3 | http://lammps.sandia.gov, Sandia National Laboratories
4 | Steve Plimpton, sjplimp@sandia.gov
5 |
6 | Copyright (2003) Sandia Corporation. Under the terms of Contract
7 | DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8 | certain rights in this software. This software is distributed under
9 | the GNU General Public License.
10 |
11 | See the README file in the top-level LAMMPS directory.
12 | JM(LU): Based on lj_cut_coul_cut.h
13 | ------------------------------------------------------------------------- */
14 |
15 | #ifdef PAIR_CLASS
16 |
17 | PairStyle(ljlambda,PairLJLambda)
18 |
19 | #else
20 |
21 | #ifndef LMP_PAIR_LJLAMBDA_H
22 | #define LMP_PAIR_LJLAMBDA_H
23 |
24 | #include "pair.h"
25 |
26 | namespace LAMMPS_NS {
27 |
28 | class PairLJLambda : public Pair {
29 | public:
30 | PairLJLambda(class LAMMPS *);
31 | virtual ~PairLJLambda();
32 | virtual void compute(int, int);
33 | virtual void settings(int, char **);
34 | void coeff(int, char **);
35 | void init_style();
36 | double init_one(int, int);
37 | void write_restart(FILE *);
38 | void read_restart(FILE *);
39 | virtual void write_restart_settings(FILE *);
40 | virtual void read_restart_settings(FILE *);
41 | void write_data(FILE *);
42 | void write_data_all(FILE *);
43 | virtual double single(int, int, int, int, double, double, double, double &);
44 | void *extract(const char *, int &);
45 | double change_kappa(double);
46 | void compute_ecoul_steve(double *, double *,double,double);
47 |
48 | protected:
49 | double cut_lj_global,cut_coul_global;
50 | double **cut_lj,**cut_ljsq;
51 | double **cut_coul,**cut_coulsq;
52 | double **epsilon,**sigma;
53 | double **lj1,**lj2,**lj3,**lj4,**offset;
54 | double **lambda; //JM
55 | double kappa; //JM
56 |
57 | void allocate();
58 | };
59 |
60 | }
61 |
62 | #endif
63 | #endif
64 |
65 | /* ERROR/WARNING messages:
66 |
67 | E: Illegal ... command
68 |
69 | Self-explanatory. Check the input script syntax and compare to the
70 | documentation for the command. You can use -echo screen as a
71 | command-line option when running LAMMPS to see the offending line.
72 |
73 | E: Incorrect args for pair coefficients
74 |
75 | Self-explanatory. Check the input script or data file.
76 |
77 | E: Pair style ljlambda requires atom attribute q
78 |
79 | The atom style defined does not have this attribute.
80 |
81 | */
82 |
--------------------------------------------------------------------------------
/main_simulations/input_scripts/chemically_specific_12N_165NRL_HREMD/DNA_sequence.txt:
--------------------------------------------------------------------------------
1 | # 1980
2 | 11689 CG
3 | 11692 TA
4 | 11695 TA
5 | 11698 AT
6 | 11701 CG
7 | 11704 AT
8 | 11707 TA
9 | 11710 GC
10 | 11713 CG
11 | 11716 AT
12 | 11719 CG
13 | 11722 AT
14 | 11725 GC
15 | 11728 GC
16 | 11731 AT
17 | 11734 TA
18 | 11737 GC
19 | 11740 TA
20 | 11743 AT
21 | 11746 AT
22 | 11749 CG
23 | 11752 CG
24 | 11755 TA
25 | 11758 GC
26 | 11761 CG
27 | 11764 AT
28 | 11767 GC
29 | 11770 AT
30 | 11773 TA
31 | 11776 AT
32 | 11779 CG
33 | 11782 TA
34 | 11785 AT
35 | 11788 CG
36 | 11791 CG
37 | 11794 AT
38 | 11797 AT
39 | 11800 AT
40 | 11803 AT
41 | 11806 GC
42 | 11809 TA
43 | 11812 GC
44 | 11815 TA
45 | 11818 AT
46 | 11821 TA
47 | 11824 TA
48 | 11827 TA
49 | 11830 GC
50 | 11833 GC
51 | 11836 AT
52 | 11839 AT
53 | 11842 AT
54 | 11845 CG
55 | 11848 TA
56 | 11851 GC
57 | 11854 CG
58 | 11857 TA
59 | 11860 CG
60 | 11863 CG
61 | 11866 AT
62 | 11869 TA
63 | 11872 CG
64 | 11875 AT
65 | 11878 AT
66 | 11881 AT
67 | 11884 AT
68 | 11887 GC
69 | 11890 GC
70 | 11893 CG
71 | 11896 AT
72 | 11899 TA
73 | 11902 GC
74 | 11905 TA
75 | 11908 TA
76 | 11911 CG
77 | 11914 AT
78 | 11917 GC
79 | 11920 CG
80 | 11923 TA
81 | 11926 GC
82 | 11929 GC
83 | 11932 AT
84 | 11935 TA
85 | 11938 TA
86 | 11941 CG
87 | 11944 CG
88 | 11947 AT
89 | 11950 GC
90 | 11953 CG
91 | 11956 TA
92 | 11959 GC
93 | 11962 AT
94 | 11965 AT
95 | 11968 CG
96 | 11971 AT
97 | 11974 TA
98 | 11977 GC
99 | 11980 CG
100 | 11983 CG
101 | 11986 TA
102 | 11989 TA
103 | 11992 TA
104 | 11995 TA
105 | 11998 GC
106 | 12001 AT
107 | 12004 TA
108 | 12007 GC
109 | 12010 GC
110 | 12013 AT
111 | 12016 GC
112 | 12019 CG
113 | 12022 AT
114 | 12025 GC
115 | 12028 TA
116 | 12031 TA
117 | 12034 TA
118 | 12037 CG
119 | 12040 CG
120 | 12043 AT
121 | 12046 AT
122 | 12049 AT
123 | 12052 TA
124 | 12055 AT
125 | 12058 CG
126 | 12061 AT
127 | 12064 CG
128 | 12067 TA
129 | 12070 TA
130 | 12073 TA
131 | 12076 TA
132 | 12079 GC
133 | 12082 GC
134 | 12085 TA
135 | 12088 AT
136 | 12091 GC
137 | 12094 TA
138 | 12097 AT
139 | 12100 TA
140 | 12103 CG
141 | 12106 TA
142 | 12109 GC
143 | 12112 CG
144 | 12115 AT
145 | 12118 GC
146 | 12121 GC
147 | 12124 TA
148 | 12127 GC
149 | 12130 AT
150 | 12133 TA
151 | 12136 TA
152 | 12139 CG
153 | 12142 TA
154 | 12145 CG
155 | 12148 CG
156 | 12151 AT
157 | 12154 GC
158 | 12157 GC
159 | 12160 GC
160 | 12163 CG
161 | 12166 GC
162 | 12169 GC
163 | 12172 CG
164 | 12175 CG
165 | 12178 AT
166 | 12181 GC
167 | 12184 CG
168 | 12187 TA
169 | 12190 TA
170 | 12193 AT
171 | 12196 CG
172 | 12199 AT
173 | 12202 TA
174 | 12205 GC
175 | 12208 CG
176 | 12211 AT
177 | 12214 CG
178 | 12217 AT
179 | 12220 GC
180 | 12223 GC
181 | 12226 AT
182 | 12229 TA
183 | 12232 GC
184 | 12235 TA
185 | 12238 AT
186 | 12241 AT
187 | 12244 CG
188 | 12247 CG
189 | 12250 TA
190 | 12253 GC
191 | 12256 CG
192 | 12259 AT
193 | 12262 GC
194 | 12265 AT
195 | 12268 TA
196 | 12271 AT
197 | 12274 CG
198 | 12277 TA
199 | 12280 AT
200 | 12283 CG
201 | 12286 CG
202 | 12289 AT
203 | 12292 AT
204 | 12295 AT
205 | 12298 AT
206 | 12301 GC
207 | 12304 TA
208 | 12307 GC
209 | 12310 TA
210 | 12313 AT
211 | 12316 TA
212 | 12319 TA
213 | 12322 TA
214 | 12325 GC
215 | 12328 GC
216 | 12331 AT
217 | 12334 AT
218 | 12337 AT
219 | 12340 CG
220 | 12343 TA
221 | 12346 GC
222 | 12349 CG
223 | 12352 TA
224 | 12355 CG
225 | 12358 CG
226 | 12361 AT
227 | 12364 TA
228 | 12367 CG
229 | 12370 AT
230 | 12373 AT
231 | 12376 AT
232 | 12379 AT
233 | 12382 GC
234 | 12385 GC
235 | 12388 CG
236 | 12391 AT
237 | 12394 TA
238 | 12397 GC
239 | 12400 TA
240 | 12403 TA
241 | 12406 CG
242 | 12409 AT
243 | 12412 GC
244 | 12415 CG
245 | 12418 TA
246 | 12421 GC
247 | 12424 GC
248 | 12427 AT
249 | 12430 TA
250 | 12433 TA
251 | 12436 CG
252 | 12439 CG
253 | 12442 AT
254 | 12445 GC
255 | 12448 CG
256 | 12451 TA
257 | 12454 GC
258 | 12457 AT
259 | 12460 AT
260 | 12463 CG
261 | 12466 AT
262 | 12469 TA
263 | 12472 GC
264 | 12475 CG
265 | 12478 CG
266 | 12481 TA
267 | 12484 TA
268 | 12487 TA
269 | 12490 TA
270 | 12493 GC
271 | 12496 AT
272 | 12499 TA
273 | 12502 GC
274 | 12505 GC
275 | 12508 AT
276 | 12511 GC
277 | 12514 CG
278 | 12517 AT
279 | 12520 GC
280 | 12523 TA
281 | 12526 TA
282 | 12529 TA
283 | 12532 CG
284 | 12535 CG
285 | 12538 AT
286 | 12541 AT
287 | 12544 AT
288 | 12547 TA
289 | 12550 AT
290 | 12553 CG
291 | 12556 AT
292 | 12559 CG
293 | 12562 TA
294 | 12565 TA
295 | 12568 TA
296 | 12571 TA
297 | 12574 GC
298 | 12577 GC
299 | 12580 TA
300 | 12583 AT
301 | 12586 GC
302 | 12589 TA
303 | 12592 AT
304 | 12595 TA
305 | 12598 CG
306 | 12601 TA
307 | 12604 GC
308 | 12607 CG
309 | 12610 AT
310 | 12613 GC
311 | 12616 GC
312 | 12619 TA
313 | 12622 GC
314 | 12625 AT
315 | 12628 TA
316 | 12631 TA
317 | 12634 CG
318 | 12637 TA
319 | 12640 CG
320 | 12643 CG
321 | 12646 AT
322 | 12649 GC
323 | 12652 GC
324 | 12655 GC
325 | 12658 CG
326 | 12661 GC
327 | 12664 GC
328 | 12667 CG
329 | 12670 CG
330 | 12673 AT
331 | 12676 GC
332 | 12679 CG
333 | 12682 TA
334 | 12685 TA
335 | 12688 AT
336 | 12691 CG
337 | 12694 AT
338 | 12697 TA
339 | 12700 GC
340 | 12703 CG
341 | 12706 AT
342 | 12709 CG
343 | 12712 AT
344 | 12715 GC
345 | 12718 GC
346 | 12721 AT
347 | 12724 TA
348 | 12727 GC
349 | 12730 TA
350 | 12733 AT
351 | 12736 AT
352 | 12739 CG
353 | 12742 CG
354 | 12745 TA
355 | 12748 GC
356 | 12751 CG
357 | 12754 AT
358 | 12757 GC
359 | 12760 AT
360 | 12763 TA
361 | 12766 AT
362 | 12769 CG
363 | 12772 TA
364 | 12775 AT
365 | 12778 CG
366 | 12781 CG
367 | 12784 AT
368 | 12787 AT
369 | 12790 AT
370 | 12793 AT
371 | 12796 GC
372 | 12799 TA
373 | 12802 GC
374 | 12805 TA
375 | 12808 AT
376 | 12811 TA
377 | 12814 TA
378 | 12817 TA
379 | 12820 GC
380 | 12823 GC
381 | 12826 AT
382 | 12829 AT
383 | 12832 AT
384 | 12835 CG
385 | 12838 TA
386 | 12841 GC
387 | 12844 CG
388 | 12847 TA
389 | 12850 CG
390 | 12853 CG
391 | 12856 AT
392 | 12859 TA
393 | 12862 CG
394 | 12865 AT
395 | 12868 AT
396 | 12871 AT
397 | 12874 AT
398 | 12877 GC
399 | 12880 GC
400 | 12883 CG
401 | 12886 AT
402 | 12889 TA
403 | 12892 GC
404 | 12895 TA
405 | 12898 TA
406 | 12901 CG
407 | 12904 AT
408 | 12907 GC
409 | 12910 CG
410 | 12913 TA
411 | 12916 GC
412 | 12919 GC
413 | 12922 AT
414 | 12925 TA
415 | 12928 TA
416 | 12931 CG
417 | 12934 CG
418 | 12937 AT
419 | 12940 GC
420 | 12943 CG
421 | 12946 TA
422 | 12949 GC
423 | 12952 AT
424 | 12955 AT
425 | 12958 CG
426 | 12961 AT
427 | 12964 TA
428 | 12967 GC
429 | 12970 CG
430 | 12973 CG
431 | 12976 TA
432 | 12979 TA
433 | 12982 TA
434 | 12985 TA
435 | 12988 GC
436 | 12991 AT
437 | 12994 TA
438 | 12997 GC
439 | 13000 GC
440 | 13003 AT
441 | 13006 GC
442 | 13009 CG
443 | 13012 AT
444 | 13015 GC
445 | 13018 TA
446 | 13021 TA
447 | 13024 TA
448 | 13027 CG
449 | 13030 CG
450 | 13033 AT
451 | 13036 AT
452 | 13039 AT
453 | 13042 TA
454 | 13045 AT
455 | 13048 CG
456 | 13051 AT
457 | 13054 CG
458 | 13057 TA
459 | 13060 TA
460 | 13063 TA
461 | 13066 TA
462 | 13069 GC
463 | 13072 GC
464 | 13075 TA
465 | 13078 AT
466 | 13081 GC
467 | 13084 TA
468 | 13087 AT
469 | 13090 TA
470 | 13093 CG
471 | 13096 TA
472 | 13099 GC
473 | 13102 CG
474 | 13105 AT
475 | 13108 GC
476 | 13111 GC
477 | 13114 TA
478 | 13117 GC
479 | 13120 AT
480 | 13123 TA
481 | 13126 TA
482 | 13129 CG
483 | 13132 TA
484 | 13135 CG
485 | 13138 CG
486 | 13141 AT
487 | 13144 GC
488 | 13147 GC
489 | 13150 GC
490 | 13153 CG
491 | 13156 GC
492 | 13159 GC
493 | 13162 CG
494 | 13165 CG
495 | 13168 AT
496 | 13171 GC
497 | 13174 CG
498 | 13177 TA
499 | 13180 TA
500 | 13183 AT
501 | 13186 CG
502 | 13189 AT
503 | 13192 TA
504 | 13195 GC
505 | 13198 CG
506 | 13201 AT
507 | 13204 CG
508 | 13207 AT
509 | 13210 GC
510 | 13213 GC
511 | 13216 AT
512 | 13219 TA
513 | 13222 GC
514 | 13225 TA
515 | 13228 AT
516 | 13231 AT
517 | 13234 CG
518 | 13237 CG
519 | 13240 TA
520 | 13243 GC
521 | 13246 CG
522 | 13249 AT
523 | 13252 GC
524 | 13255 AT
525 | 13258 TA
526 | 13261 AT
527 | 13264 CG
528 | 13267 TA
529 | 13270 AT
530 | 13273 CG
531 | 13276 CG
532 | 13279 AT
533 | 13282 AT
534 | 13285 AT
535 | 13288 AT
536 | 13291 GC
537 | 13294 TA
538 | 13297 GC
539 | 13300 TA
540 | 13303 AT
541 | 13306 TA
542 | 13309 TA
543 | 13312 TA
544 | 13315 GC
545 | 13318 GC
546 | 13321 AT
547 | 13324 AT
548 | 13327 AT
549 | 13330 CG
550 | 13333 TA
551 | 13336 GC
552 | 13339 CG
553 | 13342 TA
554 | 13345 CG
555 | 13348 CG
556 | 13351 AT
557 | 13354 TA
558 | 13357 CG
559 | 13360 AT
560 | 13363 AT
561 | 13366 AT
562 | 13369 AT
563 | 13372 GC
564 | 13375 GC
565 | 13378 CG
566 | 13381 AT
567 | 13384 TA
568 | 13387 GC
569 | 13390 TA
570 | 13393 TA
571 | 13396 CG
572 | 13399 AT
573 | 13402 GC
574 | 13405 CG
575 | 13408 TA
576 | 13411 GC
577 | 13414 GC
578 | 13417 AT
579 | 13420 TA
580 | 13423 TA
581 | 13426 CG
582 | 13429 CG
583 | 13432 AT
584 | 13435 GC
585 | 13438 CG
586 | 13441 TA
587 | 13444 GC
588 | 13447 AT
589 | 13450 AT
590 | 13453 CG
591 | 13456 AT
592 | 13459 TA
593 | 13462 GC
594 | 13465 CG
595 | 13468 CG
596 | 13471 TA
597 | 13474 TA
598 | 13477 TA
599 | 13480 TA
600 | 13483 GC
601 | 13486 AT
602 | 13489 TA
603 | 13492 GC
604 | 13495 GC
605 | 13498 AT
606 | 13501 GC
607 | 13504 CG
608 | 13507 AT
609 | 13510 GC
610 | 13513 TA
611 | 13516 TA
612 | 13519 TA
613 | 13522 CG
614 | 13525 CG
615 | 13528 AT
616 | 13531 AT
617 | 13534 AT
618 | 13537 TA
619 | 13540 AT
620 | 13543 CG
621 | 13546 AT
622 | 13549 CG
623 | 13552 TA
624 | 13555 TA
625 | 13558 TA
626 | 13561 TA
627 | 13564 GC
628 | 13567 GC
629 | 13570 TA
630 | 13573 AT
631 | 13576 GC
632 | 13579 TA
633 | 13582 AT
634 | 13585 TA
635 | 13588 CG
636 | 13591 TA
637 | 13594 GC
638 | 13597 CG
639 | 13600 AT
640 | 13603 GC
641 | 13606 GC
642 | 13609 TA
643 | 13612 GC
644 | 13615 AT
645 | 13618 TA
646 | 13621 TA
647 | 13624 CG
648 | 13627 TA
649 | 13630 CG
650 | 13633 CG
651 | 13636 AT
652 | 13639 GC
653 | 13642 GC
654 | 13645 GC
655 | 13648 CG
656 | 13651 GC
657 | 13654 GC
658 | 13657 CG
659 | 13660 CG
660 | 13663 AT
661 | 13666 GC
662 | 13669 CG
663 | 13672 TA
664 | 13675 TA
665 | 13678 AT
666 | 13681 CG
667 | 13684 AT
668 | 13687 TA
669 | 13690 GC
670 | 13693 CG
671 | 13696 AT
672 | 13699 CG
673 | 13702 AT
674 | 13705 GC
675 | 13708 GC
676 | 13711 AT
677 | 13714 TA
678 | 13717 GC
679 | 13720 TA
680 | 13723 AT
681 | 13726 AT
682 | 13729 CG
683 | 13732 CG
684 | 13735 TA
685 | 13738 GC
686 | 13741 CG
687 | 13744 AT
688 | 13747 GC
689 | 13750 AT
690 | 13753 TA
691 | 13756 AT
692 | 13759 CG
693 | 13762 TA
694 | 13765 AT
695 | 13768 CG
696 | 13771 CG
697 | 13774 AT
698 | 13777 AT
699 | 13780 AT
700 | 13783 AT
701 | 13786 GC
702 | 13789 TA
703 | 13792 GC
704 | 13795 TA
705 | 13798 AT
706 | 13801 TA
707 | 13804 TA
708 | 13807 TA
709 | 13810 GC
710 | 13813 GC
711 | 13816 AT
712 | 13819 AT
713 | 13822 AT
714 | 13825 CG
715 | 13828 TA
716 | 13831 GC
717 | 13834 CG
718 | 13837 TA
719 | 13840 CG
720 | 13843 CG
721 | 13846 AT
722 | 13849 TA
723 | 13852 CG
724 | 13855 AT
725 | 13858 AT
726 | 13861 AT
727 | 13864 AT
728 | 13867 GC
729 | 13870 GC
730 | 13873 CG
731 | 13876 AT
732 | 13879 TA
733 | 13882 GC
734 | 13885 TA
735 | 13888 TA
736 | 13891 CG
737 | 13894 AT
738 | 13897 GC
739 | 13900 CG
740 | 13903 TA
741 | 13906 GC
742 | 13909 GC
743 | 13912 AT
744 | 13915 TA
745 | 13918 TA
746 | 13921 CG
747 | 13924 CG
748 | 13927 AT
749 | 13930 GC
750 | 13933 CG
751 | 13936 TA
752 | 13939 GC
753 | 13942 AT
754 | 13945 AT
755 | 13948 CG
756 | 13951 AT
757 | 13954 TA
758 | 13957 GC
759 | 13960 CG
760 | 13963 CG
761 | 13966 TA
762 | 13969 TA
763 | 13972 TA
764 | 13975 TA
765 | 13978 GC
766 | 13981 AT
767 | 13984 TA
768 | 13987 GC
769 | 13990 GC
770 | 13993 AT
771 | 13996 GC
772 | 13999 CG
773 | 14002 AT
774 | 14005 GC
775 | 14008 TA
776 | 14011 TA
777 | 14014 TA
778 | 14017 CG
779 | 14020 CG
780 | 14023 AT
781 | 14026 AT
782 | 14029 AT
783 | 14032 TA
784 | 14035 AT
785 | 14038 CG
786 | 14041 AT
787 | 14044 CG
788 | 14047 TA
789 | 14050 TA
790 | 14053 TA
791 | 14056 TA
792 | 14059 GC
793 | 14062 GC
794 | 14065 TA
795 | 14068 AT
796 | 14071 GC
797 | 14074 TA
798 | 14077 AT
799 | 14080 TA
800 | 14083 CG
801 | 14086 TA
802 | 14089 GC
803 | 14092 CG
804 | 14095 AT
805 | 14098 GC
806 | 14101 GC
807 | 14104 TA
808 | 14107 GC
809 | 14110 AT
810 | 14113 TA
811 | 14116 TA
812 | 14119 CG
813 | 14122 TA
814 | 14125 CG
815 | 14128 CG
816 | 14131 AT
817 | 14134 GC
818 | 14137 GC
819 | 14140 GC
820 | 14143 CG
821 | 14146 GC
822 | 14149 GC
823 | 14152 CG
824 | 14155 CG
825 | 14158 AT
826 | 14161 GC
827 | 14164 CG
828 | 14167 TA
829 | 14170 TA
830 | 14173 AT
831 | 14176 CG
832 | 14179 AT
833 | 14182 TA
834 | 14185 GC
835 | 14188 CG
836 | 14191 AT
837 | 14194 CG
838 | 14197 AT
839 | 14200 GC
840 | 14203 GC
841 | 14206 AT
842 | 14209 TA
843 | 14212 GC
844 | 14215 TA
845 | 14218 AT
846 | 14221 AT
847 | 14224 CG
848 | 14227 CG
849 | 14230 TA
850 | 14233 GC
851 | 14236 CG
852 | 14239 AT
853 | 14242 GC
854 | 14245 AT
855 | 14248 TA
856 | 14251 AT
857 | 14254 CG
858 | 14257 TA
859 | 14260 AT
860 | 14263 CG
861 | 14266 CG
862 | 14269 AT
863 | 14272 AT
864 | 14275 AT
865 | 14278 AT
866 | 14281 GC
867 | 14284 TA
868 | 14287 GC
869 | 14290 TA
870 | 14293 AT
871 | 14296 TA
872 | 14299 TA
873 | 14302 TA
874 | 14305 GC
875 | 14308 GC
876 | 14311 AT
877 | 14314 AT
878 | 14317 AT
879 | 14320 CG
880 | 14323 TA
881 | 14326 GC
882 | 14329 CG
883 | 14332 TA
884 | 14335 CG
885 | 14338 CG
886 | 14341 AT
887 | 14344 TA
888 | 14347 CG
889 | 14350 AT
890 | 14353 AT
891 | 14356 AT
892 | 14359 AT
893 | 14362 GC
894 | 14365 GC
895 | 14368 CG
896 | 14371 AT
897 | 14374 TA
898 | 14377 GC
899 | 14380 TA
900 | 14383 TA
901 | 14386 CG
902 | 14389 AT
903 | 14392 GC
904 | 14395 CG
905 | 14398 TA
906 | 14401 GC
907 | 14404 GC
908 | 14407 AT
909 | 14410 TA
910 | 14413 TA
911 | 14416 CG
912 | 14419 CG
913 | 14422 AT
914 | 14425 GC
915 | 14428 CG
916 | 14431 TA
917 | 14434 GC
918 | 14437 AT
919 | 14440 AT
920 | 14443 CG
921 | 14446 AT
922 | 14449 TA
923 | 14452 GC
924 | 14455 CG
925 | 14458 CG
926 | 14461 TA
927 | 14464 TA
928 | 14467 TA
929 | 14470 TA
930 | 14473 GC
931 | 14476 AT
932 | 14479 TA
933 | 14482 GC
934 | 14485 GC
935 | 14488 AT
936 | 14491 GC
937 | 14494 CG
938 | 14497 AT
939 | 14500 GC
940 | 14503 TA
941 | 14506 TA
942 | 14509 TA
943 | 14512 CG
944 | 14515 CG
945 | 14518 AT
946 | 14521 AT
947 | 14524 AT
948 | 14527 TA
949 | 14530 AT
950 | 14533 CG
951 | 14536 AT
952 | 14539 CG
953 | 14542 TA
954 | 14545 TA
955 | 14548 TA
956 | 14551 TA
957 | 14554 GC
958 | 14557 GC
959 | 14560 TA
960 | 14563 AT
961 | 14566 GC
962 | 14569 TA
963 | 14572 AT
964 | 14575 TA
965 | 14578 CG
966 | 14581 TA
967 | 14584 GC
968 | 14587 CG
969 | 14590 AT
970 | 14593 GC
971 | 14596 GC
972 | 14599 TA
973 | 14602 GC
974 | 14605 AT
975 | 14608 TA
976 | 14611 TA
977 | 14614 CG
978 | 14617 TA
979 | 14620 CG
980 | 14623 CG
981 | 14626 AT
982 | 14629 GC
983 | 14632 GC
984 | 14635 GC
985 | 14638 CG
986 | 14641 GC
987 | 14644 GC
988 | 14647 CG
989 | 14650 CG
990 | 14653 AT
991 | 14656 GC
992 | 14659 CG
993 | 14662 TA
994 | 14665 TA
995 | 14668 AT
996 | 14671 CG
997 | 14674 AT
998 | 14677 TA
999 | 14680 GC
1000 | 14683 CG
1001 | 14686 AT
1002 | 14689 CG
1003 | 14692 AT
1004 | 14695 GC
1005 | 14698 GC
1006 | 14701 AT
1007 | 14704 TA
1008 | 14707 GC
1009 | 14710 TA
1010 | 14713 AT
1011 | 14716 AT
1012 | 14719 CG
1013 | 14722 CG
1014 | 14725 TA
1015 | 14728 GC
1016 | 14731 CG
1017 | 14734 AT
1018 | 14737 GC
1019 | 14740 AT
1020 | 14743 TA
1021 | 14746 AT
1022 | 14749 CG
1023 | 14752 TA
1024 | 14755 AT
1025 | 14758 CG
1026 | 14761 CG
1027 | 14764 AT
1028 | 14767 AT
1029 | 14770 AT
1030 | 14773 AT
1031 | 14776 GC
1032 | 14779 TA
1033 | 14782 GC
1034 | 14785 TA
1035 | 14788 AT
1036 | 14791 TA
1037 | 14794 TA
1038 | 14797 TA
1039 | 14800 GC
1040 | 14803 GC
1041 | 14806 AT
1042 | 14809 AT
1043 | 14812 AT
1044 | 14815 CG
1045 | 14818 TA
1046 | 14821 GC
1047 | 14824 CG
1048 | 14827 TA
1049 | 14830 CG
1050 | 14833 CG
1051 | 14836 AT
1052 | 14839 TA
1053 | 14842 CG
1054 | 14845 AT
1055 | 14848 AT
1056 | 14851 AT
1057 | 14854 AT
1058 | 14857 GC
1059 | 14860 GC
1060 | 14863 CG
1061 | 14866 AT
1062 | 14869 TA
1063 | 14872 GC
1064 | 14875 TA
1065 | 14878 TA
1066 | 14881 CG
1067 | 14884 AT
1068 | 14887 GC
1069 | 14890 CG
1070 | 14893 TA
1071 | 14896 GC
1072 | 14899 GC
1073 | 14902 AT
1074 | 14905 TA
1075 | 14908 TA
1076 | 14911 CG
1077 | 14914 CG
1078 | 14917 AT
1079 | 14920 GC
1080 | 14923 CG
1081 | 14926 TA
1082 | 14929 GC
1083 | 14932 AT
1084 | 14935 AT
1085 | 14938 CG
1086 | 14941 AT
1087 | 14944 TA
1088 | 14947 GC
1089 | 14950 CG
1090 | 14953 CG
1091 | 14956 TA
1092 | 14959 TA
1093 | 14962 TA
1094 | 14965 TA
1095 | 14968 GC
1096 | 14971 AT
1097 | 14974 TA
1098 | 14977 GC
1099 | 14980 GC
1100 | 14983 AT
1101 | 14986 GC
1102 | 14989 CG
1103 | 14992 AT
1104 | 14995 GC
1105 | 14998 TA
1106 | 15001 TA
1107 | 15004 TA
1108 | 15007 CG
1109 | 15010 CG
1110 | 15013 AT
1111 | 15016 AT
1112 | 15019 AT
1113 | 15022 TA
1114 | 15025 AT
1115 | 15028 CG
1116 | 15031 AT
1117 | 15034 CG
1118 | 15037 TA
1119 | 15040 TA
1120 | 15043 TA
1121 | 15046 TA
1122 | 15049 GC
1123 | 15052 GC
1124 | 15055 TA
1125 | 15058 AT
1126 | 15061 GC
1127 | 15064 TA
1128 | 15067 AT
1129 | 15070 TA
1130 | 15073 CG
1131 | 15076 TA
1132 | 15079 GC
1133 | 15082 CG
1134 | 15085 AT
1135 | 15088 GC
1136 | 15091 GC
1137 | 15094 TA
1138 | 15097 GC
1139 | 15100 AT
1140 | 15103 TA
1141 | 15106 TA
1142 | 15109 CG
1143 | 15112 TA
1144 | 15115 CG
1145 | 15118 CG
1146 | 15121 AT
1147 | 15124 GC
1148 | 15127 GC
1149 | 15130 GC
1150 | 15133 CG
1151 | 15136 GC
1152 | 15139 GC
1153 | 15142 CG
1154 | 15145 CG
1155 | 15148 AT
1156 | 15151 GC
1157 | 15154 CG
1158 | 15157 TA
1159 | 15160 TA
1160 | 15163 AT
1161 | 15166 CG
1162 | 15169 AT
1163 | 15172 TA
1164 | 15175 GC
1165 | 15178 CG
1166 | 15181 AT
1167 | 15184 CG
1168 | 15187 AT
1169 | 15190 GC
1170 | 15193 GC
1171 | 15196 AT
1172 | 15199 TA
1173 | 15202 GC
1174 | 15205 TA
1175 | 15208 AT
1176 | 15211 AT
1177 | 15214 CG
1178 | 15217 CG
1179 | 15220 TA
1180 | 15223 GC
1181 | 15226 CG
1182 | 15229 AT
1183 | 15232 GC
1184 | 15235 AT
1185 | 15238 TA
1186 | 15241 AT
1187 | 15244 CG
1188 | 15247 TA
1189 | 15250 AT
1190 | 15253 CG
1191 | 15256 CG
1192 | 15259 AT
1193 | 15262 AT
1194 | 15265 AT
1195 | 15268 AT
1196 | 15271 GC
1197 | 15274 TA
1198 | 15277 GC
1199 | 15280 TA
1200 | 15283 AT
1201 | 15286 TA
1202 | 15289 TA
1203 | 15292 TA
1204 | 15295 GC
1205 | 15298 GC
1206 | 15301 AT
1207 | 15304 AT
1208 | 15307 AT
1209 | 15310 CG
1210 | 15313 TA
1211 | 15316 GC
1212 | 15319 CG
1213 | 15322 TA
1214 | 15325 CG
1215 | 15328 CG
1216 | 15331 AT
1217 | 15334 TA
1218 | 15337 CG
1219 | 15340 AT
1220 | 15343 AT
1221 | 15346 AT
1222 | 15349 AT
1223 | 15352 GC
1224 | 15355 GC
1225 | 15358 CG
1226 | 15361 AT
1227 | 15364 TA
1228 | 15367 GC
1229 | 15370 TA
1230 | 15373 TA
1231 | 15376 CG
1232 | 15379 AT
1233 | 15382 GC
1234 | 15385 CG
1235 | 15388 TA
1236 | 15391 GC
1237 | 15394 GC
1238 | 15397 AT
1239 | 15400 TA
1240 | 15403 TA
1241 | 15406 CG
1242 | 15409 CG
1243 | 15412 AT
1244 | 15415 GC
1245 | 15418 CG
1246 | 15421 TA
1247 | 15424 GC
1248 | 15427 AT
1249 | 15430 AT
1250 | 15433 CG
1251 | 15436 AT
1252 | 15439 TA
1253 | 15442 GC
1254 | 15445 CG
1255 | 15448 CG
1256 | 15451 TA
1257 | 15454 TA
1258 | 15457 TA
1259 | 15460 TA
1260 | 15463 GC
1261 | 15466 AT
1262 | 15469 TA
1263 | 15472 GC
1264 | 15475 GC
1265 | 15478 AT
1266 | 15481 GC
1267 | 15484 CG
1268 | 15487 AT
1269 | 15490 GC
1270 | 15493 TA
1271 | 15496 TA
1272 | 15499 TA
1273 | 15502 CG
1274 | 15505 CG
1275 | 15508 AT
1276 | 15511 AT
1277 | 15514 AT
1278 | 15517 TA
1279 | 15520 AT
1280 | 15523 CG
1281 | 15526 AT
1282 | 15529 CG
1283 | 15532 TA
1284 | 15535 TA
1285 | 15538 TA
1286 | 15541 TA
1287 | 15544 GC
1288 | 15547 GC
1289 | 15550 TA
1290 | 15553 AT
1291 | 15556 GC
1292 | 15559 TA
1293 | 15562 AT
1294 | 15565 TA
1295 | 15568 CG
1296 | 15571 TA
1297 | 15574 GC
1298 | 15577 CG
1299 | 15580 AT
1300 | 15583 GC
1301 | 15586 GC
1302 | 15589 TA
1303 | 15592 GC
1304 | 15595 AT
1305 | 15598 TA
1306 | 15601 TA
1307 | 15604 CG
1308 | 15607 TA
1309 | 15610 CG
1310 | 15613 CG
1311 | 15616 AT
1312 | 15619 GC
1313 | 15622 GC
1314 | 15625 GC
1315 | 15628 CG
1316 | 15631 GC
1317 | 15634 GC
1318 | 15637 CG
1319 | 15640 CG
1320 | 15643 AT
1321 | 15646 GC
1322 | 15649 CG
1323 | 15652 TA
1324 | 15655 TA
1325 | 15658 AT
1326 | 15661 CG
1327 | 15664 AT
1328 | 15667 TA
1329 | 15670 GC
1330 | 15673 CG
1331 | 15676 AT
1332 | 15679 CG
1333 | 15682 AT
1334 | 15685 GC
1335 | 15688 GC
1336 | 15691 AT
1337 | 15694 TA
1338 | 15697 GC
1339 | 15700 TA
1340 | 15703 AT
1341 | 15706 AT
1342 | 15709 CG
1343 | 15712 CG
1344 | 15715 TA
1345 | 15718 GC
1346 | 15721 CG
1347 | 15724 AT
1348 | 15727 GC
1349 | 15730 AT
1350 | 15733 TA
1351 | 15736 AT
1352 | 15739 CG
1353 | 15742 TA
1354 | 15745 AT
1355 | 15748 CG
1356 | 15751 CG
1357 | 15754 AT
1358 | 15757 AT
1359 | 15760 AT
1360 | 15763 AT
1361 | 15766 GC
1362 | 15769 TA
1363 | 15772 GC
1364 | 15775 TA
1365 | 15778 AT
1366 | 15781 TA
1367 | 15784 TA
1368 | 15787 TA
1369 | 15790 GC
1370 | 15793 GC
1371 | 15796 AT
1372 | 15799 AT
1373 | 15802 AT
1374 | 15805 CG
1375 | 15808 TA
1376 | 15811 GC
1377 | 15814 CG
1378 | 15817 TA
1379 | 15820 CG
1380 | 15823 CG
1381 | 15826 AT
1382 | 15829 TA
1383 | 15832 CG
1384 | 15835 AT
1385 | 15838 AT
1386 | 15841 AT
1387 | 15844 AT
1388 | 15847 GC
1389 | 15850 GC
1390 | 15853 CG
1391 | 15856 AT
1392 | 15859 TA
1393 | 15862 GC
1394 | 15865 TA
1395 | 15868 TA
1396 | 15871 CG
1397 | 15874 AT
1398 | 15877 GC
1399 | 15880 CG
1400 | 15883 TA
1401 | 15886 GC
1402 | 15889 GC
1403 | 15892 AT
1404 | 15895 TA
1405 | 15898 TA
1406 | 15901 CG
1407 | 15904 CG
1408 | 15907 AT
1409 | 15910 GC
1410 | 15913 CG
1411 | 15916 TA
1412 | 15919 GC
1413 | 15922 AT
1414 | 15925 AT
1415 | 15928 CG
1416 | 15931 AT
1417 | 15934 TA
1418 | 15937 GC
1419 | 15940 CG
1420 | 15943 CG
1421 | 15946 TA
1422 | 15949 TA
1423 | 15952 TA
1424 | 15955 TA
1425 | 15958 GC
1426 | 15961 AT
1427 | 15964 TA
1428 | 15967 GC
1429 | 15970 GC
1430 | 15973 AT
1431 | 15976 GC
1432 | 15979 CG
1433 | 15982 AT
1434 | 15985 GC
1435 | 15988 TA
1436 | 15991 TA
1437 | 15994 TA
1438 | 15997 CG
1439 | 16000 CG
1440 | 16003 AT
1441 | 16006 AT
1442 | 16009 AT
1443 | 16012 TA
1444 | 16015 AT
1445 | 16018 CG
1446 | 16021 AT
1447 | 16024 CG
1448 | 16027 TA
1449 | 16030 TA
1450 | 16033 TA
1451 | 16036 TA
1452 | 16039 GC
1453 | 16042 GC
1454 | 16045 TA
1455 | 16048 AT
1456 | 16051 GC
1457 | 16054 TA
1458 | 16057 AT
1459 | 16060 TA
1460 | 16063 CG
1461 | 16066 TA
1462 | 16069 GC
1463 | 16072 CG
1464 | 16075 AT
1465 | 16078 GC
1466 | 16081 GC
1467 | 16084 TA
1468 | 16087 GC
1469 | 16090 AT
1470 | 16093 TA
1471 | 16096 TA
1472 | 16099 CG
1473 | 16102 TA
1474 | 16105 CG
1475 | 16108 CG
1476 | 16111 AT
1477 | 16114 GC
1478 | 16117 GC
1479 | 16120 GC
1480 | 16123 CG
1481 | 16126 GC
1482 | 16129 GC
1483 | 16132 CG
1484 | 16135 CG
1485 | 16138 AT
1486 | 16141 GC
1487 | 16144 CG
1488 | 16147 TA
1489 | 16150 TA
1490 | 16153 AT
1491 | 16156 CG
1492 | 16159 AT
1493 | 16162 TA
1494 | 16165 GC
1495 | 16168 CG
1496 | 16171 AT
1497 | 16174 CG
1498 | 16177 AT
1499 | 16180 GC
1500 | 16183 GC
1501 | 16186 AT
1502 | 16189 TA
1503 | 16192 GC
1504 | 16195 TA
1505 | 16198 AT
1506 | 16201 AT
1507 | 16204 CG
1508 | 16207 CG
1509 | 16210 TA
1510 | 16213 GC
1511 | 16216 CG
1512 | 16219 AT
1513 | 16222 GC
1514 | 16225 AT
1515 | 16228 TA
1516 | 16231 AT
1517 | 16234 CG
1518 | 16237 TA
1519 | 16240 AT
1520 | 16243 CG
1521 | 16246 CG
1522 | 16249 AT
1523 | 16252 AT
1524 | 16255 AT
1525 | 16258 AT
1526 | 16261 GC
1527 | 16264 TA
1528 | 16267 GC
1529 | 16270 TA
1530 | 16273 AT
1531 | 16276 TA
1532 | 16279 TA
1533 | 16282 TA
1534 | 16285 GC
1535 | 16288 GC
1536 | 16291 AT
1537 | 16294 AT
1538 | 16297 AT
1539 | 16300 CG
1540 | 16303 TA
1541 | 16306 GC
1542 | 16309 CG
1543 | 16312 TA
1544 | 16315 CG
1545 | 16318 CG
1546 | 16321 AT
1547 | 16324 TA
1548 | 16327 CG
1549 | 16330 AT
1550 | 16333 AT
1551 | 16336 AT
1552 | 16339 AT
1553 | 16342 GC
1554 | 16345 GC
1555 | 16348 CG
1556 | 16351 AT
1557 | 16354 TA
1558 | 16357 GC
1559 | 16360 TA
1560 | 16363 TA
1561 | 16366 CG
1562 | 16369 AT
1563 | 16372 GC
1564 | 16375 CG
1565 | 16378 TA
1566 | 16381 GC
1567 | 16384 GC
1568 | 16387 AT
1569 | 16390 TA
1570 | 16393 TA
1571 | 16396 CG
1572 | 16399 CG
1573 | 16402 AT
1574 | 16405 GC
1575 | 16408 CG
1576 | 16411 TA
1577 | 16414 GC
1578 | 16417 AT
1579 | 16420 AT
1580 | 16423 CG
1581 | 16426 AT
1582 | 16429 TA
1583 | 16432 GC
1584 | 16435 CG
1585 | 16438 CG
1586 | 16441 TA
1587 | 16444 TA
1588 | 16447 TA
1589 | 16450 TA
1590 | 16453 GC
1591 | 16456 AT
1592 | 16459 TA
1593 | 16462 GC
1594 | 16465 GC
1595 | 16468 AT
1596 | 16471 GC
1597 | 16474 CG
1598 | 16477 AT
1599 | 16480 GC
1600 | 16483 TA
1601 | 16486 TA
1602 | 16489 TA
1603 | 16492 CG
1604 | 16495 CG
1605 | 16498 AT
1606 | 16501 AT
1607 | 16504 AT
1608 | 16507 TA
1609 | 16510 AT
1610 | 16513 CG
1611 | 16516 AT
1612 | 16519 CG
1613 | 16522 TA
1614 | 16525 TA
1615 | 16528 TA
1616 | 16531 TA
1617 | 16534 GC
1618 | 16537 GC
1619 | 16540 TA
1620 | 16543 AT
1621 | 16546 GC
1622 | 16549 TA
1623 | 16552 AT
1624 | 16555 TA
1625 | 16558 CG
1626 | 16561 TA
1627 | 16564 GC
1628 | 16567 CG
1629 | 16570 AT
1630 | 16573 GC
1631 | 16576 GC
1632 | 16579 TA
1633 | 16582 GC
1634 | 16585 AT
1635 | 16588 TA
1636 | 16591 TA
1637 | 16594 CG
1638 | 16597 TA
1639 | 16600 CG
1640 | 16603 CG
1641 | 16606 AT
1642 | 16609 GC
1643 | 16612 GC
1644 | 16615 GC
1645 | 16618 CG
1646 | 16621 GC
1647 | 16624 GC
1648 | 16627 CG
1649 | 16630 CG
1650 | 16633 AT
1651 | 16636 GC
1652 | 16639 CG
1653 | 16642 TA
1654 | 16645 TA
1655 | 16648 AT
1656 | 16651 CG
1657 | 16654 AT
1658 | 16657 TA
1659 | 16660 GC
1660 | 16663 CG
1661 | 16666 AT
1662 | 16669 CG
1663 | 16672 AT
1664 | 16675 GC
1665 | 16678 GC
1666 | 16681 AT
1667 | 16684 TA
1668 | 16687 GC
1669 | 16690 TA
1670 | 16693 AT
1671 | 16696 AT
1672 | 16699 CG
1673 | 16702 CG
1674 | 16705 TA
1675 | 16708 GC
1676 | 16711 CG
1677 | 16714 AT
1678 | 16717 GC
1679 | 16720 AT
1680 | 16723 TA
1681 | 16726 AT
1682 | 16729 CG
1683 | 16732 TA
1684 | 16735 AT
1685 | 16738 CG
1686 | 16741 CG
1687 | 16744 AT
1688 | 16747 AT
1689 | 16750 AT
1690 | 16753 AT
1691 | 16756 GC
1692 | 16759 TA
1693 | 16762 GC
1694 | 16765 TA
1695 | 16768 AT
1696 | 16771 TA
1697 | 16774 TA
1698 | 16777 TA
1699 | 16780 GC
1700 | 16783 GC
1701 | 16786 AT
1702 | 16789 AT
1703 | 16792 AT
1704 | 16795 CG
1705 | 16798 TA
1706 | 16801 GC
1707 | 16804 CG
1708 | 16807 TA
1709 | 16810 CG
1710 | 16813 CG
1711 | 16816 AT
1712 | 16819 TA
1713 | 16822 CG
1714 | 16825 AT
1715 | 16828 AT
1716 | 16831 AT
1717 | 16834 AT
1718 | 16837 GC
1719 | 16840 GC
1720 | 16843 CG
1721 | 16846 AT
1722 | 16849 TA
1723 | 16852 GC
1724 | 16855 TA
1725 | 16858 TA
1726 | 16861 CG
1727 | 16864 AT
1728 | 16867 GC
1729 | 16870 CG
1730 | 16873 TA
1731 | 16876 GC
1732 | 16879 GC
1733 | 16882 AT
1734 | 16885 TA
1735 | 16888 TA
1736 | 16891 CG
1737 | 16894 CG
1738 | 16897 AT
1739 | 16900 GC
1740 | 16903 CG
1741 | 16906 TA
1742 | 16909 GC
1743 | 16912 AT
1744 | 16915 AT
1745 | 16918 CG
1746 | 16921 AT
1747 | 16924 TA
1748 | 16927 GC
1749 | 16930 CG
1750 | 16933 CG
1751 | 16936 TA
1752 | 16939 TA
1753 | 16942 TA
1754 | 16945 TA
1755 | 16948 GC
1756 | 16951 AT
1757 | 16954 TA
1758 | 16957 GC
1759 | 16960 GC
1760 | 16963 AT
1761 | 16966 GC
1762 | 16969 CG
1763 | 16972 AT
1764 | 16975 GC
1765 | 16978 TA
1766 | 16981 TA
1767 | 16984 TA
1768 | 16987 CG
1769 | 16990 CG
1770 | 16993 AT
1771 | 16996 AT
1772 | 16999 AT
1773 | 17002 TA
1774 | 17005 AT
1775 | 17008 CG
1776 | 17011 AT
1777 | 17014 CG
1778 | 17017 TA
1779 | 17020 TA
1780 | 17023 TA
1781 | 17026 TA
1782 | 17029 GC
1783 | 17032 GC
1784 | 17035 TA
1785 | 17038 AT
1786 | 17041 GC
1787 | 17044 TA
1788 | 17047 AT
1789 | 17050 TA
1790 | 17053 CG
1791 | 17056 TA
1792 | 17059 GC
1793 | 17062 CG
1794 | 17065 AT
1795 | 17068 GC
1796 | 17071 GC
1797 | 17074 TA
1798 | 17077 GC
1799 | 17080 AT
1800 | 17083 TA
1801 | 17086 TA
1802 | 17089 CG
1803 | 17092 TA
1804 | 17095 CG
1805 | 17098 CG
1806 | 17101 AT
1807 | 17104 GC
1808 | 17107 GC
1809 | 17110 GC
1810 | 17113 CG
1811 | 17116 GC
1812 | 17119 GC
1813 | 17122 CG
1814 | 17125 CG
1815 | 17128 AT
1816 | 17131 GC
1817 | 17134 CG
1818 | 17137 TA
1819 | 17140 TA
1820 | 17143 AT
1821 | 17146 CG
1822 | 17149 AT
1823 | 17152 TA
1824 | 17155 GC
1825 | 17158 CG
1826 | 17161 AT
1827 | 17164 CG
1828 | 17167 AT
1829 | 17170 GC
1830 | 17173 GC
1831 | 17176 AT
1832 | 17179 TA
1833 | 17182 GC
1834 | 17185 TA
1835 | 17188 AT
1836 | 17191 AT
1837 | 17194 CG
1838 | 17197 CG
1839 | 17200 TA
1840 | 17203 GC
1841 | 17206 CG
1842 | 17209 AT
1843 | 17212 GC
1844 | 17215 AT
1845 | 17218 TA
1846 | 17221 AT
1847 | 17224 CG
1848 | 17227 TA
1849 | 17230 AT
1850 | 17233 CG
1851 | 17236 CG
1852 | 17239 AT
1853 | 17242 AT
1854 | 17245 AT
1855 | 17248 AT
1856 | 17251 GC
1857 | 17254 TA
1858 | 17257 GC
1859 | 17260 TA
1860 | 17263 AT
1861 | 17266 TA
1862 | 17269 TA
1863 | 17272 TA
1864 | 17275 GC
1865 | 17278 GC
1866 | 17281 AT
1867 | 17284 AT
1868 | 17287 AT
1869 | 17290 CG
1870 | 17293 TA
1871 | 17296 GC
1872 | 17299 CG
1873 | 17302 TA
1874 | 17305 CG
1875 | 17308 CG
1876 | 17311 AT
1877 | 17314 TA
1878 | 17317 CG
1879 | 17320 AT
1880 | 17323 AT
1881 | 17326 AT
1882 | 17329 AT
1883 | 17332 GC
1884 | 17335 GC
1885 | 17338 CG
1886 | 17341 AT
1887 | 17344 TA
1888 | 17347 GC
1889 | 17350 TA
1890 | 17353 TA
1891 | 17356 CG
1892 | 17359 AT
1893 | 17362 GC
1894 | 17365 CG
1895 | 17368 TA
1896 | 17371 GC
1897 | 17374 GC
1898 | 17377 AT
1899 | 17380 TA
1900 | 17383 TA
1901 | 17386 CG
1902 | 17389 CG
1903 | 17392 AT
1904 | 17395 GC
1905 | 17398 CG
1906 | 17401 TA
1907 | 17404 GC
1908 | 17407 AT
1909 | 17410 AT
1910 | 17413 CG
1911 | 17416 AT
1912 | 17419 TA
1913 | 17422 GC
1914 | 17425 CG
1915 | 17428 CG
1916 | 17431 TA
1917 | 17434 TA
1918 | 17437 TA
1919 | 17440 TA
1920 | 17443 GC
1921 | 17446 AT
1922 | 17449 TA
1923 | 17452 GC
1924 | 17455 GC
1925 | 17458 AT
1926 | 17461 GC
1927 | 17464 CG
1928 | 17467 AT
1929 | 17470 GC
1930 | 17473 TA
1931 | 17476 TA
1932 | 17479 TA
1933 | 17482 CG
1934 | 17485 CG
1935 | 17488 AT
1936 | 17491 AT
1937 | 17494 AT
1938 | 17497 TA
1939 | 17500 AT
1940 | 17503 CG
1941 | 17506 AT
1942 | 17509 CG
1943 | 17512 TA
1944 | 17515 TA
1945 | 17518 TA
1946 | 17521 TA
1947 | 17524 GC
1948 | 17527 GC
1949 | 17530 TA
1950 | 17533 AT
1951 | 17536 GC
1952 | 17539 TA
1953 | 17542 AT
1954 | 17545 TA
1955 | 17548 CG
1956 | 17551 TA
1957 | 17554 GC
1958 | 17557 CG
1959 | 17560 AT
1960 | 17563 GC
1961 | 17566 GC
1962 | 17569 TA
1963 | 17572 GC
1964 | 17575 AT
1965 | 17578 TA
1966 | 17581 TA
1967 | 17584 CG
1968 | 17587 TA
1969 | 17590 CG
1970 | 17593 CG
1971 | 17596 AT
1972 | 17599 GC
1973 | 17602 GC
1974 | 17605 GC
1975 | 17608 CG
1976 | 17611 GC
1977 | 17614 GC
1978 | 17617 CG
1979 | 17620 CG
1980 | 17623 AT
1981 | 17626 GC
1982 |
--------------------------------------------------------------------------------
/main_simulations/input_scripts/chemically_specific_12N_165NRL_HREMD/NAFlex_params.txt:
--------------------------------------------------------------------------------
1 | Step Shift Slide Rise Tilt Roll Twist
2 |
3 | AA_TT
4 | -0.3 -0.3 3.3 -2.6 0.3 35.4
5 |
6 | 1.72017 0.19796 0.32533 -0.01249 0.00576 0.05913
7 | 0.19797 2.12618 0.75074 -0.00581 -0.05309 -0.10162
8 | 0.32534 0.75074 7.64359 -0.18348 -0.04547 -0.1485
9 | -0.01249 -0.00581 -0.18349 0.03738 0.00211 0.00597
10 | 0.00576 -0.05309 -0.04547 0.00211 0.01961 0.00742
11 | 0.05913 -0.10162 -0.1485 0.00597 0.00742 0.02761
12 |
13 | AC_GT
14 | 0.1 -0.6 3.3 -0.7 -0.6 32
15 |
16 | 1.28288 0.13127 0.29502 -0.0278 0.00302 0.03646
17 | 0.13127 2.97699 2.10518 -0.0228 0.03038 -0.10881
18 | 0.29502 2.10518 8.83137 0.04907 0.10478 -0.14741
19 | -0.0278 -0.0228 0.04907 0.03776 0.00378 0.00418
20 | 0.00302 0.03038 0.10479 0.00378 0.02306 0.00708
21 | 0.03646 -0.10881 -0.14742 0.00418 0.00708 0.03551
22 |
23 | AG_CT
24 | -0.4 -0.6 3.4 -2.5 3.1 33.5
25 |
26 | 1.3999 0.27887 0.27572 -0.03917 0.0208 0.07408
27 | 0.27887 1.78493 0.99427 -0.00395 -0.01181 -0.06894
28 | 0.27572 0.99427 7.0413 -0.15259 -0.02113 -0.14069
29 | -0.03917 -0.00395 -0.15259 0.03699 0.0041 0.0063
30 | 0.0208 -0.01181 -0.02113 0.0041 0.01912 0.005
31 | 0.07408 -0.06894 -0.14069 0.0063 0.005 0.02797
32 |
33 | AT_AT
34 | 0 -0.8 3.3 0 -0.5 30.4
35 |
36 | 1.04661 0 0 0.03066 0 0
37 | 0 3.76524 2.16877 0 -0.03029 -0.04352
38 | 0 2.16877 9.33735 0 0.06011 -0.09916
39 | 0.03066 0 0 0.03494 0 0
40 | 0 -0.03029 0.06011 0 0.02157 0.00877
41 | 0 -0.04352 -0.09916 0 0.00877 0.03122
42 |
43 | CA_TG
44 | -0.2 -0.2 3.1 0.2 10.3 29.6
45 |
46 | 1.05328 0.07552 0.23196 -0.03375 0.00158 -0.01277
47 | 0.07552 1.79677 0.52999 -0.00472 0.02114 -0.03759
48 | 0.23197 0.53 6.30474 0.01221 -0.07708 -0.144
49 | -0.03375 -0.00472 0.01221 0.02498 -0.00127 0.00137
50 | 0.00158 0.02114 -0.07708 -0.00127 0.01647 0.00541
51 | -0.01277 -0.03759 -0.14399 0.00137 0.00541 0.01534
52 |
53 | CC_GG
54 | 0.2 -0.7 3.5 0 4.9 32.7
55 |
56 | 1.43205 -0.29768 -0.35747 -0.08468 -0.01448 -0.03982
57 | -0.29768 1.5731 1.18241 -0.00677 0.01068 -0.09303
58 | -0.35748 1.18243 7.85985 0.25771 0.00156 -0.11971
59 | -0.08468 -0.00677 0.25771 0.04202 0.00134 0.00022
60 | -0.01448 0.01068 0.00156 0.00134 0.02012 0.00493
61 | -0.03982 -0.09303 -0.1197 0.00022 0.00493 0.02602
62 |
63 | CG_CG
64 | 0 0 3.1 0 9.3 29.8
65 |
66 | 1.05459 0 0 -0.07841 0 0
67 | 0 1.91048 0.56341 0 0.02388 -0.05037
68 | 0 0.56342 6.11191 0 -0.04625 -0.14832
69 | -0.07841 0 0 0.02587 0 0
70 | 0 0.02388 -0.04625 0 0.01562 0.00319
71 | 0 -0.05037 -0.14832 0 0.00319 0.014
72 |
73 | CT_AG
74 | 0.4 -0.6 3.4 2.5 3.1 33.5
75 |
76 | 1.3999 -0.27887 -0.27572 -0.03917 -0.0208 -0.07408
77 | -0.27887 1.78493 0.99427 0.00395 -0.01181 -0.06894
78 | -0.27572 0.99427 7.0413 0.15259 -0.02113 -0.14069
79 | -0.03917 0.00395 0.15259 0.03699 -0.0041 -0.0063
80 | -0.0208 -0.01181 -0.02113 -0.0041 0.01912 0.005
81 | -0.07408 -0.06894 -0.14069 -0.0063 0.005 0.02797
82 |
83 | GA_TC
84 | -0.4 -0.3 3.4 -1.6 1.6 36.6
85 |
86 | 1.31766 0.29517 0.40655 -0.04665 0.00977 0.01782
87 | 0.29517 1.87898 1.00952 0.00116 -0.01328 -0.09736
88 | 0.40656 1.00952 8.48201 -0.25663 -0.01013 -0.12376
89 | -0.04665 0.00116 -0.25663 0.03758 -0.00252 0.00117
90 | 0.00977 -0.01328 -0.01012 -0.00252 0.02025 0.00861
91 | 0.01782 -0.09736 -0.12376 0.00117 0.00861 0.02441
92 |
93 | GC_GC
94 | 0 -0.4 3.5 0 -1.3 35.7
95 |
96 | 1.179 0 0 -0.08357 0 0
97 | 0 2.58821 2.05067 0 0.08753 -0.07364
98 | 0 2.05063 9.46559 0 0.1572 -0.18431
99 | -0.08357 0 0 0.03618 0 0
100 | 0 0.08753 0.1572 0 0.02569 0.00442
101 | 0 -0.07364 -0.18431 0 0.00442 0.02238
102 |
103 | GG_CC
104 | -0.2 -0.7 3.5 0 4.9 32.7
105 |
106 | 1.43205 0.29768 0.35747 -0.08468 0.01448 0.03982
107 | 0.29768 1.5731 1.18241 0.00677 0.01068 -0.09303
108 | 0.35748 1.18243 7.85985 -0.25771 0.00156 -0.11971
109 | -0.08468 0.00677 -0.25771 0.04202 -0.00134 -0.00022
110 | 0.01448 0.01068 0.00156 -0.00134 0.02012 0.00493
111 | 0.03982 -0.09303 -0.1197 -0.00022 0.00493 0.02602
112 |
113 | GT_AC
114 | -0.1 -0.6 3.3 0.7 -0.6 32
115 |
116 | 1.28288 -0.13127 -0.29502 -0.0278 -0.00302 -0.03646
117 | -0.13127 2.97699 2.10518 0.0228 0.03038 -0.10881
118 | -0.29502 2.10518 8.83137 -0.04907 0.10478 -0.14741
119 | -0.0278 0.0228 -0.04907 0.03776 -0.00378 -0.00418
120 | -0.00302 0.03038 0.10479 -0.00378 0.02306 0.00708
121 | -0.03646 -0.10881 -0.14742 -0.00418 0.00708 0.03551
122 |
123 | TA_TA
124 | 0 -0.2 3.2 0 10 28.9
125 |
126 | 0.64315 0 0 -0.01544 0 0
127 | 0 1.24864 0.53653 0 0.02038 -0.04224
128 | 0 0.53653 6.07971 0 -0.07916 -0.14834
129 | -0.01544 0 0 0.019 0 0
130 | 0 0.02038 -0.07916 0 0.01464 0.00831
131 | 0 -0.04224 -0.14835 0 0.00831 0.01759
132 |
133 | TC_GA
134 | 0.4 -0.3 3.4 1.6 1.6 36.6
135 |
136 | 1.31766 -0.29517 -0.40655 -0.04665 -0.00977 -0.01782
137 | -0.29517 1.87898 1.00952 -0.00116 -0.01328 -0.09736
138 | -0.40656 1.00952 8.48201 0.25663 -0.01013 -0.12376
139 | -0.04665 -0.00116 0.25663 0.03758 0.00252 -0.00117
140 | -0.00977 -0.01328 -0.01012 0.00252 0.02025 0.00861
141 | -0.01782 -0.09736 -0.12376 -0.00117 0.00861 0.02441
142 |
143 | TG_CA
144 | 0.2 -0.2 3.1 -0.2 10.3 29.6
145 |
146 | 1.05328 -0.07552 -0.23196 -0.03375 -0.00158 0.01277
147 | -0.07552 1.79677 0.52999 0.00472 0.02114 -0.03759
148 | -0.23197 0.53 6.30474 -0.01221 -0.07708 -0.144
149 | -0.03375 0.00472 -0.01221 0.02498 0.00127 -0.00137
150 | -0.00158 0.02114 -0.07708 0.00127 0.01647 0.00541
151 | 0.01277 -0.03759 -0.14399 -0.00137 0.00541 0.01534
152 |
153 | TT_AA
154 | 0.3 -0.3 3.3 2.6 0.3 35.4
155 |
156 | 1.72017 -0.19796 -0.32533 -0.01249 -0.00576 -0.05913
157 | -0.19797 2.12618 0.75074 0.00581 -0.05309 -0.10162
158 | -0.32534 0.75074 7.64359 0.18348 -0.04547 -0.1485
159 | -0.01249 0.00581 0.18349 0.03738 -0.00211 -0.00597
160 | -0.00576 -0.05309 -0.04547 -0.00211 0.01961 0.00742
161 | -0.05913 -0.10162 -0.1485 -0.00597 0.00742 0.02761
162 |
--------------------------------------------------------------------------------
/main_simulations/input_scripts/minimal_coexistence/NAFlex_params.txt:
--------------------------------------------------------------------------------
1 | Step Shift Slide Rise Tilt Roll Twist
2 |
3 | XX_XX
4 | 0.0 0.0 16.402750610816632 0.0 0.0 0.0
5 |
6 | 0.19773228062313528 0.0 0.0 0.0 0.0 0.0
7 | 0.0 0.19773228062313528 0.0 0.0 0.0 0.0
8 | 0.0 0.0 1.1483831142489693 0.0 0.0 0.0
9 | 0.0 0.0 0.0 0.004479288938038622 0.0 0.0
10 | 0.0 0.0 0.0 0.0 0.004479288938038622 0.0
11 | 0.0 0.0 0.0 0.0 0.0 0.002748918044015074
12 |
--------------------------------------------------------------------------------
/main_simulations/input_scripts/minimal_coexistence/in.run:
--------------------------------------------------------------------------------
1 | # VARIABLES
2 | variable fname index data_nonb.txt
3 | variable simname index dna
4 | variable DT equal 500
5 | variable T equal 300.0
6 | variable E1 equal 0.3208333333333333
7 | variable E2 equal 6.0
8 | variable RC equal 5.0
9 | variable A equal 25.583333333333336
10 | variable B equal 40
11 |
12 | variable AC equal "1.122*v_A"
13 | variable BC equal "3*v_B"
14 |
15 |
16 | # Initialization
17 | units real
18 | atom_style hybrid ellipsoid angle charge
19 |
20 |
21 | boundary p p p
22 |
23 |
24 | log log.dna.txt
25 | read_data ${fname}
26 |
27 | #scale masses in nucls to 5% so similar to dna
28 |
29 | #set type 1 mass 100000
30 | set type 1 mass 10000
31 | set type 2 mass 3250
32 | set type 3 mass 325
33 | #set type 4 mass 1
34 |
35 | set type 1 shape 56 56 40
36 | set type 2 shape 24 24 24
37 | set type 3 shape 24 24 24
38 |
39 |
40 |
41 | #**** pair params go here****
42 | #
43 |
44 | pair_style hybrid/overlay lj/cut ${BC} aniso 1 1 1 60
45 | pair_coeff * * none
46 | pair_coeff 1 1 lj/cut 0.1 55 61.71
47 | pair_coeff 1 2 lj/cut ${E1} ${B} ${BC}
48 | pair_coeff 1 3 lj/cut ${E1} ${B} ${BC}
49 | pair_coeff 2 2 lj/cut 0.1 ${A} ${AC}
50 | pair_coeff 2 3 lj/cut 0.1 ${A} ${AC}
51 | pair_coeff 3 3 lj/cut 0.1 ${A} ${AC}
52 | pair_coeff 1 2 aniso ${E2} 0.0 1 1 0.0001 1 1 1 ${RC} 60
53 | pair_coeff 1 3 aniso ${E2} 0.0 1 1 0.0001 1 1 1 ${RC} 60
54 |
55 | pair_modify shift yes
56 | neighbor 50 bin
57 | neigh_modify every 1 delay 0
58 |
59 | special_bonds fene
60 |
61 | bond_style hybrid harmonic/DNA zero
62 | bond_coeff 1 harmonic/DNA 0.0 0.0
63 | bond_coeff 2 zero
64 |
65 | group cores type 1
66 | group linker_dna type 2
67 | group nucl_dna type 3
68 | group nucl molecule > 0
69 |
70 | # remove interaction within rigid body
71 | neigh_modify exclude molecule/intra nucl
72 |
73 |
74 | # delete bonds that will be fixed rigid
75 | #variable NN equal $(count(cores))
76 | #variable n loop ${NN}
77 | #label nloop
78 | #
79 | #group thisnucl molecule ${n}
80 | #
81 | #delete_bonds thisnucl bond 1 remove special
82 | #
83 | #next n
84 | #jump SELF nloop
85 |
86 |
87 | ## type 2 are left over from previous version, not needed here
88 | #delete_bonds all bond 2 remove special
89 |
90 |
91 | compute q all property/atom quatw quati quatj quatk
92 | compute shape all property/atom shapex shapey shapez
93 | compute rg all gyration
94 |
95 | # computes to calculate temperature of rigid bodies:
96 |
97 | compute erot_ldna linker_dna erotate/asphere
98 | compute etrans_ldna linker_dna ke
99 |
100 | compute erot_nucl nucl erotate/rigid 1
101 | compute etrans_nucl nucl ke/rigid 1
102 |
103 | variable ldna_temp equal "2.0*(c_erot_ldna+c_etrans_ldna)/(0.0019872041*6*count(linker_dna))"
104 | variable nucl_temp equal "2.0*(c_erot_nucl+c_etrans_nucl)/(0.0019872041*6*count(cores))"
105 | timer timeout 35:50:00
106 |
107 | restart 10000 restart.1 restart.2
108 |
109 |
110 | dump 1 all custom 200000 dna.dump &
111 | id xu yu zu c_q[1] c_q[2] c_q[3] c_q[4] &
112 | c_shape[1] c_shape[2] c_shape[3] mol q type fx fy fz
113 |
114 | dump_modify 1 sort id
115 |
116 |
117 | group markers id 1 409 817 1225 1633 2041 2449 2857 3265 3673 4081 4489 4897 5305 5713 6121 6529 6937 7345 7753 8161 8569 8977 9385 9793 10201 10609 11017 11425 11833 12241 12649 13057 13465 13873 14281 14689 15097 15505 15913 16321 16729 17137 17545 17953 18361 18769 19177 19585 19993 20401 20809 21217 21625 22033 22441 22849 23257 23665 24073 24481 24889 25297 25705 26113 26521 26929 27337 27745 28153 28561 28969 29377 29785 30193 30601 31009 31417 31825 32233 32641 33049 33457 33865 34273 34681 35089 35497 35905 36313 36721 37129 37537 37945 38353 38761 39169 39577 39985 40393
118 |
119 | compute newmsd markers msd
120 |
121 | dump 2 markers xyz 10000 prots.xyz
122 | #dump_modify 2 append yes
123 |
124 |
125 | dump 3 all custom 20000 coords.dump id xu yu zu type
126 | #dump_modify 3 sort id append yes
127 |
128 |
129 | comm_style tiled
130 | fix bl all balance 1000 1.0 rcb
131 | fix 1 nucl rigid/nve/small molecule
132 | fix 2 linker_dna nve/asphere
133 | fix 3 linker_dna langevin 1.0 1.0 0.1 123 angmom 3.0
134 | fix 4 nucl langevin 1.0 1.0 0.1 123
135 |
136 | thermo_style custom step temp v_ldna_temp v_nucl_temp pe ebond epair ke etotal spcpu c_newmsd[4] lx ly lz press vol
137 |
138 | thermo 1000
139 |
140 | compute thermo all temp/asphere
141 | thermo_modify temp thermo
142 |
143 | timestep 0.00001
144 | run 1000
145 |
146 |
147 | timestep 0.0001
148 | run 1000
149 |
150 |
151 | fix 3 linker_dna langevin 1.0 1.0 1 123 angmom 3.0
152 | fix 4 nucl langevin 1.0 1.0 1 123
153 | timestep 0.001
154 | run 1000
155 |
156 | timestep 0.01
157 | run 1000
158 |
159 | timestep 0.1
160 | run 1000
161 |
162 |
163 |
164 | timestep 10
165 |
166 | fix 3 linker_dna langevin ${T} ${T} 1000 123 angmom 3.0
167 | fix 4 nucl langevin ${T} ${T} 1000 123
168 | run 1000
169 |
170 | timestep 10
171 |
172 | fix 3 linker_dna langevin ${T} ${T} 10000 123 angmom 3.0
173 | fix 4 nucl langevin ${T} ${T} 10000 123
174 | run 1000
175 |
176 | timestep 100
177 | fix 3 linker_dna langevin ${T} ${T} 500000 123 angmom 3.0
178 | fix 4 nucl langevin ${T} ${T} 500000 123
179 | run 3000
180 | timestep ${DT}
181 |
182 | fix 3 linker_dna langevin ${T} ${T} 500000 123 angmom 3.0
183 | fix 4 nucl langevin ${T} ${T} 500000 123
184 |
185 | run 10000
186 |
187 | fix 3 linker_dna langevin ${T} ${T} 5000000 123 angmom 3.0
188 | fix 4 nucl langevin ${T} ${T} 5000000 123
189 |
190 | run 100000
191 |
192 |
193 | run 100000000
194 |
--------------------------------------------------------------------------------