Periodic boundary conditions in 2D
Use successive passes of this blur to create your sequence of ever smoother DEMs. (The weights are computed as exp(-d^2/(2r)) where d is the distance (in cells if you like) and r is the effective radius (also in cells). They have to be computed within a circle extending out to at least 3r. In this exercise, you will smooth a surface using the Natural Neighbor Interpolation (NNI) method. This exercise continues from Exercise 3: Adding a Hide Boundary. Open Surface-4D.dwg, which is located in the tutorials drawings folder. In Toolspace, on the Prospector tab, expand the XGND surface Definition collection and right-click Edits.
Periodic boundary conditions (PBCs) are a set of boundary conditions which are often chosen for approximating a large (infinite) system by using a small part called a unit cell. PBCs are often used in computer simulations and mathematical models. The topology of two-dimensional PBC is equal to that of a world map of some video games; the geometry of the unit cell satisfies perfect two-dimensional tiling, and when an object passes through one side of the unit cell, it re-appears on the opposite side with the same velocity. In topological terms, the space made by two-dimensional PBCs can be thought of as being mapped onto a torus (compactification). The large systems approximated by PBCs consist of an infinite number of unit cells. In computer simulations, one of these is the original simulation box, and others are copies called images. During the simulation, only the properties of the original simulation box need to be recorded and propagated. The minimum-image convention is a common form of PBC particle bookkeeping in which each individual particle in the simulation interacts with the closest image of the remaining particles in the system.
One example of periodic boundary conditions can be defined according to smooth real functions by
for all m = 0, 1, 2, ... and for constants and .
In molecular dynamics simulation, PBC are usually applied to calculate bulk gasses, liquids, crystals or mixtures. A common application uses PBC to simulate solvated macromolecules in a bath of explicit solvent.Born-von Karman boundary conditions are periodic boundary conditions for a special system.
- 2Practical implementation: continuity and the minimum image convention
Requirements and artifacts[edit]
Three-dimensional PBCs are useful for approximating the behavior of macro-scale systems of gases, liquids, and solids. Three-dimensional PBCs can also be used to simulate planar surfaces, in which case two-dimensional PBCs are often more suitable. Two-dimensional PBCs for planar surfaces are also called slab boundary conditions; in this case, PBCs are used for two Cartesian coordinates (e.g., x and y), and the third coordinate (z) extends to infinity.
PBCs can be used in conjunction with Ewald summation methods (e.g., the particle mesh Ewald method) to calculate electrostatic forces in the system. However, PBCs also introduce correlational artifacts that do not respect the translational invariance of the system,[1] and requires constraints on the composition and size of the simulation box.
In simulations of solid systems, the strain field arising from any inhomogeneity in the systemwill be artificially truncated and modified by the periodic boundary. Similarly, the wavelengthof sound or shock waves and phonons in the system is limited by the box size.
In simulations containing ionic (Coulomb) interactions, the net electrostatic charge of the system must be zero to avoid summing to an infinite charge when PBCs are applied. In some applications it is appropriate to obtain neutrality by adding ions such as sodium or chloride (as counterions) in appropriate numbers if the molecules of interest are charged. Sometimes ions are even added to a system in which the molecules of interest are neutral, to approximate the ionic strength of the solution in which the molecules naturally appear. Maintenance of the minimum-image convention also generally requires that a spherical cutoff radius for nonbonded forces be at most half the length of one side of a cubic box. Even in electrostatically neutral systems, a net dipole moment of the unit cell can introduce a spurious bulk-surface energy, equivalent to pyroelectricity in polar crystals.
The size of the simulation box must also be large enough to prevent periodic artifacts from occurring due to the unphysical topology of the simulation. In a box that is too small, a macromolecule may interact with its own image in a neighboring box, which is functionally equivalent to a molecule's 'head' interacting with its own 'tail'. This produces highly unphysical dynamics in most macromolecules, although the magnitude of the consequences and thus the appropriate box size relative to the size of the macromolecules depends on the intended length of the simulation, the desired accuracy, and the anticipated dynamics. For example, simulations of protein folding that begin from the native state may undergo smaller fluctuations, and therefore may not require as large a box, as simulations that begin from a random coil conformation. However, the effects of solvation shells on the observed dynamics – in simulation or in experiment – are not well understood. A common recommendation based on simulations of DNA is to require at least 1 nm of solvent around the molecules of interest in every dimension.[2]
Practical implementation: continuity and the minimum image convention[edit]
An object which has passed through one face of the simulation box should re-enter through the opposite face—or its image should do it. Evidently, a strategic decision must be made: Do we (A) “fold back” particles into the simulation box when they leave it, or do we (B) let them go on (but compute interactions with the nearest images)? The decision has no effect on the course of the simulation, but if the user is interested in mean displacements, diffusion lengths, etc., the second option is preferable.
(A) Restrict particle coordinates to the simulation box[edit]
To implement a PBC algorithm, at least two steps are needed.
Restricting the coordinates is a simple operation which can be described with the following code, where x_size is the length of the box in one direction (assuming an orthogonal unit cell centered on the origin) and x is the position of the particle in the same direction:
Distance and vector between objects should obey the minimum image criterion.This can be implemented according to the following code (in the case of a one-dimensional system where dx is the distance direction vector from object i to object j):
For three-dimensional PBCs, both operations should be repeated in all 3 dimensions.
These operations can be written in a much more compact form for orthorhombic cells if the origin is shifted to a corner of the box. Then we have, in one dimension, for positions and distances respectively:
(B) Do not restrict the particle coordinates[edit]
Assuming an orthorhombic simulation box with the origin at the lower left forward corner, the minimum image convention for the calculation of effective particle distances can be calculated with the “nearest integer“ function as shown above, here as C/C++ code:
The fastest way of carrying out this operation depends on the processor architecture. If the sign of dx is not relevant, the method
was found to be fastest on x86-64 processors in 2013.[3]
For non-orthorhombic cells the situation is more complicated.[4]
In simulations of ionic systems more complicated operationsmay be needed to handle the long-range Coulomb interactions spanning several box images, for instance Ewald summation.
Unit cell geometries[edit]
PBC requires the unit cell to be a shape that will tile perfectly into a three-dimensional crystal. Thus, a spherical or elliptical droplet cannot be used. A cube or rectangular prism is the most intuitive and common choice, but can be computationally expensive due to unnecessary amounts of solvent molecules in the corners, distant from the central macromolecules. A common alternative that requires less volume is the truncated octahedron.
Conserved properties[edit]
Under periodic boundary conditions, the linear momentum of the system is conserved, but Angular momentum is not. Conventional explanation of this fact is based on Noether's theorem, which states that conservation of angular momentum follows from rotational invariance of Lagrangian. However in a paper [5] it is shown that this approach is not consistent. It fails to explain the absence of conservation of angular momentum of a single particle moving in a periodic cell. Lagrangian of the particle is constant and therefore rotationally invariant, while angular momentum of the particle is not conserved. This contradiction is caused by the fact that Noether's theorem is usually formulated for closed systems. The periodic cell exchanges mass momentum, angular momentum, and energy with the neighboring cells.
When applied to the microcanonical ensemble (constant particle number, volume, and energy, abbreviated NVE), using PBC rather than reflecting walls slightly alters the sampling of the simulation due to the conservation of total linear momentum and the position of the center of mass; this ensemble has been termed the 'molecular dynamics ensemble'[6] or the NVEPG ensemble.[7] These additional conserved quantities introduce minor artifacts related to the statistical mechanical definition of temperature, the departure of the velocity distributions from a Boltzmann distribution, and violations of equipartition for systems containing particles with heterogeneous masses. The simplest of these effects is that a system of N particles will behave, in the molecular dynamics ensemble, as a system of N-1 particles. These artifacts have quantifiable consequences for small toy systems containing only perfectly hard particles; they have not been studied in depth for standard biomolecular simulations, but given the size of such systems, the effects will be largely negligible.[7]
See also[edit]
Notes[edit]
- ^Cheatham TE, Miller JH, Fox T, Darden PA, Kollman PA. (1995).Molecular Dynamics Simulations on Solvated Biomolecular Systems: The Particle Mesh Ewald Method Leads to Stable Trajectories of DNA, RNA, and Proteins. J Am Chem Soc 117:4193.
- ^de Souza ON, Ornstein RL. (1997). Effect of periodic box size on aqueous molecular dynamics simulation of a DNA dodecamer with particle-mesh Ewald method. Biophys J 72(6):2395-7. PMID9168016
- ^Deiters, Ulrich K. (2013). 'Efficient coding of the minimum image convention'. Z. Phys. Chem. 227 (2–3): 345–352. doi:10.1524/zpch.2013.0311.
- ^Minimum image convention in non-cubic simulation cells
- ^Kuzkin V.A. (2014). On angular momentum balance in particle systems with periodic boundary conditions, ZAMM, 2014, DOI: 10.1002/zamm.201400045. https://arxiv.org/pdf/1312.7008.pdf
- ^Erpenbeck JJ, Wood WW. (1977). Statistical Mechanics, Part B: Time-dependent Processes, Modern Theoretical Chemistry Vol 6. ed. Berne BJ. Plenum, New York, USA. See pp1-40.
- ^ abShirts RB, Burt SR, Johnson AM. (2006). Periodic boundary condition induced breakdown of the equipartition principle and other kinetic effects of finite sample size in classical hard-sphere molecular dynamics simulation. J Chem Phys 125(16):164102. PMID17092058
References[edit]
- Schlick T. (2002). Molecular Modeling and Simulation: An Interdisciplinary Guide. Interdisciplinary Applied Mathematics series, vol. 21. Springer: New York, NY, USA. ISBN0-387-95404-X. See esp. pp272–6.
- Rapaport DC. (2004). The Art of Molecular Dynamics Simulation. 2nd ed. Cambridge University Press. ISBN0-521-82568-7. See esp. pp15–20.
- Kuzkin V.A. (2014). On angular momentum balance in particle systems with periodic boundary conditions, ZAMM, 2014, DOI: 10.1002/zamm.201400045.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Periodic_boundary_conditions&oldid=881903821'
Depression can be very difficult — not just for people who experience it first-hand, but also for their loved ones. If you have a friend or family member with depression, you may be able to offer them social support. At the same time, it’s important to set boundaries and address your own needs too.
The Risks of Caregiving
When someone you love is depressed, you may want to help them any way you can. However, it’s also important to take steps to protect your own mental and physical health.
If you attempt to provide care for someone with depression, you’re at risk of experiencing some degree of psychological distress too. One study found that caregivers of people with major depressive disorder and bipolar disorder were more likely to report psychological distress than caregivers who provide assistance to persons with other healthcare needs in the general population. They also reported lower quality of life.
Everyone experiences and reacts to depression differently. Some people with depression become physically or verbally abusive, while others become agitated or act recklessly. Some people react to depression by indulging in drugs or binging on alcohol. Some become so lethargic, they can barely get dressed, feed themselves, or tend to their basic hygiene needs.
When you’re caring for someone with depression, these behaviors may pose a threat to your own wellbeing. You may find it stressful or physically challenging to help them meet their daily care needs. You may even become a target of physical or verbal abuse.
Setting Boundaries
When you’re caring for someone with depression, it’s important to talk about behaviors that are unacceptable or dangerous. For example, consider the following guidelines and strategies.
Stick to the Treatment Plan
Social support is important, but it’s generally not enough to treat depression. If someone you know is coping with depression, encourage them to get professional help. Depression is a medical condition that can be treated with therapy, medication, or a combination of both.
Tell the person you care about them, but you can’t help them alone. Explain why you think they need to seek professional treatment. Insist on them following their mental health practitioners’ advice. For example, they should agree to faithfully attend medical appointments. They should also take prescribed medications as directed.
Stand Up to Abuse
If the person you’re caring for targets you with abusive language, tell them it’s unacceptable and they need to avoid that behavior.
If they’ve engaged in any sort of physical abuse or violence, insist that they stop. If you suspect your physical health is at risk, ask for help from family members or friends. If you live with this person, it may be necessary to involve local law enforcement officials. If you do not live with this person and you are being physically abused/assaulted, you may need to distance yourself until the person gets the help that they need.
Encourage Healthy Habits
Encourage the person you’re caring for to channel their energy into constructive behaviors, such as exercise. Regular exercise lowers the risk of depression. It may also help them recover more quickly.
You should also encourage them to eat a healthy diet. Consider supplementing it with vitamin D and omega-3 fatty acids (commonly found in fish oil). Low levels of these nutrients may raise the risk of depression.
One study found that many participants with depression had low levels of vitamin D. Three months of vitamin D supplementation helped relieve their symptoms of depression.
Another review suggests that low levels of omega-3 fatty acids may play a role in some cases of depression. More research is needed to learn if omega-3 fatty acid supplements can effectively treat depression. The risks of taking omega-3 fatty acid supplements are low.
Keep Time for Yourself
Let the person you’re caring for know that you can’t be present 24 hours a day, seven days a week. You need some time for yourself.
Try to follow a healthy diet, exercise regularly, and get enough sleep. To manage your stress, make time for regular breaks and activities you enjoy.
The Takeaway
When you’re not healthy yourself, it can be hard to care for someone else. Take steps to prevent burnout, injury, and illness by setting realistic boundaries. Talk to the person you’re caring for about harmful behaviors. Encourage them to follow their recommended treatment plan, practice healthy habits, and respect your mental and physical health needs.
Depression is difficult for everyone involved. Obviously, even patients with mild depression suffer from the debilitating effects of the illness, while severe depression has been described as “dank joylessness...suffocation” and “a life and death struggle” by some who have experienced it.
Caring for the Caregiver
In the face of such despair and pain, it’s easy to lose sight of the fact that depression is also hard on the patient’s close friends and family, especially those tasked with caring for the depressed individual.
While you may want to help the patient in any way you can, it’s not unreasonable to take steps to ensure your own ongoing mental and physical health and safety. Studies show that people who provide care for a loved one with major depression are often at risk of suffering some degree of psychological distress themselves.
One study suggested that caregivers of people with major depressive disorder experienced reduced quality of life compared to similar people who were not caring for a depressed patient. This impact on quality of life is not unique, however. Distress among caregivers is common for a broad range of disabilities. If you find yourself assuming responsibility for the care of a depressed person, it may be wise to establish some ground rules regarding what is, and is not, acceptable behavior by the patient.
Setting Boundaries
Everyone experiences and reacts to depression differently. Some patients may become physically or verbally abusive, while others may become agitated, or act recklessly. Other people react to depression by indulging in drugs, or binging on alcohol. Still others may become so lethargic they can barely get dressed, feed themselves, or tend to basic hygiene. Some can barely generate the will to get out of bed, or dress for the day at all.
Any of the former behaviors may pose a threat to your own safety or wellbeing. In such cases, it’s advisable to establish what is acceptable behavior in light of the patient’s condition, and what is out of bounds.
The following are some guidelines for caregivers’ successful interactions with depressed patients:
Stick to Treatment
Explain to the patient that he or she must seek, and willingly participate in, treatment for the illness. Require that the patient follow their mental health practitioners’ advice. Insist that the patient agree to faithfully take any prescribed medications, as directed. Also make it clear that the patient must agree to attend any medical appointments without fail.
No Abuse
If the patient has engaged in abusive language, explain that you will attempt to be patient and understanding, but insist that the patient make an effort to refrain from engaging in such behavior in the future.
If the patient has engaged in any sort of physical abuse or violence, insist that he or she stop. If you feel physically at risk, ask for help from other family members or friends. If necessary, call law enforcement.
Support Constructive Habits
Suggest that restless or agitated patients may wish to channel their energy into constructive behaviors, such as engaging in exercise. Exercise is significantly associated with a reduced risk of depression, and may help accelerate recovery.
Encourage Healthy Habits
Insist that the patient make an effort to eat a healthy diet. Consider supplementing the diet with vitamin D and fish oil (omega-3 fatty acids). Studies suggest that people with depression are often deficient in these nutrients. Omega-3 fatty acid supplementation is associated with improved outcomes among patients taking antidepressant medications. Studies also show that people with higher levels of vitamin D and omega-3 fatty acids are less likely to become depressed. Some experts suggest taking from 2,000 to 10,000 IU vitamin D daily for the relief of vitamin D insufficiency or deficiency.
Keep Time for Yourself
Ensure that the patient understands that you cannot be present 24 hours a day, seven days a week. You need and deserve time to yourself. Insist that he or she realize that you must also be allowed sufficient time to care for your own needs.