text:
A Plane Wave source is assumed to be infinitely far away so that the constant field surfaces are planar and normal to the direction of propagation. The excitation is useful for computing scattering behavior and radar cross section.

## Create and Edit

Access the plane wave editor by right-clicking on the External Excitations branch of the Project Tree and choosing New Plane Wave, or double-clicking on an existing plane wave within the Project Tree. This opens an editor at the top of the Geometry window that consists of a Location tab and a Properties tab.

Under the Location tab, specify the incident direction of the Plane Wave by entering values for both Incident Theta and Incident Phi. These angles are defined in XF's spherical coordinate system where theta, $\theta$, is referenced from the z-axis and phi, $\phi$, is referenced from the x-axis. Verify the incident direction by viewing the yellow indicator arrow in the Geometry window.

Under the Properties tab, identify the excitation by filling in the Name and select the Waveform. The ETheta Amplitude $E_\theta$, EPhi Amplitude $E_\phi$, and EPhi Phase Offset $\psi$ fields define linearly, circularly, or elliptically polarized plane waves.

• Linear: $E_\theta \neq 0$ and/or $E_\phi \neq 0$ and $\psi = 0^\circ$
• Circular: $E_\theta = E_\phi$ and $\psi = \pm 90^\circ$
• Elliptical: $E_\theta \neq 0$, $E_\phi\neq 0$, $\psi \neq 0^\circ$, and circular polarization criteria are not met.

Users should note that a sinusoidal waveform is required when defining a circular or elliptical polarization.

Consider a time-harmonic plane wave traveling in the negative Z direction, $(\theta,\phi) = (0,0)$ and the following example polarizations, which can be defined through the editor.

Polarization $E(x,y,z)$ ETheta Amplitude EPhi Amplitude EPhi Phase Offset
Linear $E_xe^{j\omega z}$ 1 0 0
Linear $(E_x + E_y)e^{j\omega z}$ 1 1 0
Circular $(E_x + jE_y)e^{j\omega z}$ 1 1 $90^\circ$
Elliptical $(E_x + E_ye^{j\psi})e^{j\omega z}$ 1 1 $\psi$

## Simulate

When multiple plane waves are created in a project, only one can be excited during a simulation. In the Create FDTD Simulation window, specify the Active Excitation under the Choose Source tab and utilize additional settings under the Specify Field Formulation tab.

Users should note that all active Circuit Components and Waveguide Interfaces will be set to passive loads and matched terminations, respectively, when a Plane Wave excitation is selected.


text:
# Question

A solid conducting sphere is surrounded by a thick, spherical conducting shell. Assume that a total charge +Q is placed at the center of the sphere and released.
(a) After equilibrium is reached, the inner surface of the shell will have (1) negative, (2) zero, (3) positive charge.
(b) In terms of Q, how much charge is on the interior of the sphere?
(c) The surface of the sphere?
(d) The inner surface of the shell?
(e) The outer surface of the shell?

Sales0
Views25

format: plain


text:
# SumOfSquares, JuMP; Implementing semidefinite constraint with specified domain

#1

Hello all,

I am using the SumOfSquares package to obtain Lyapunov functions with some particular properties. Given a polynomial vector field defined by \dot{x} = f(x), I wish to obtain Lyapunov functions V(x) such that if f(x) is decomposed as,

f(x) = -\nabla V + f_V(x),

the decomposition defined by V(x) satisfies,

f_V \cdot \nabla V \leq 0.

This constraint on the properties of V can be rewritten as,

\nabla V \cdot f + \nabla V \cdot \nabla V \le 0,

which is nonlinear in V. As I understand it, such a nonlinear constraint cannot be implemented. However, this can be rewritten as a linear matrix inequality as,

M_V = \begin{bmatrix} -\nabla V \cdot f, \, \nabla V \\ \nabla V ^\top, \, I_n \end{bmatrix} \succeq 0

The code at the bottom provides a minimal working example, and is able to implement this requirement and obtain the Lyapunov function for some cases. However, I now need to apply the same method but limited to certain domains, (e.g. x > 0). While I can specify a domain using @polyconstraint, such a domain cannot be included in an @SDconstraint. My questions are therefore:

a. Is it possible to implement a nonlinear polyconstraint in a sum of squares problem, and thereby include a specified domain?
b. Is it possible to implement a SDconstraint that includes a specified domain? It seems that this is not currently implemented in JuMP, but is this mathematically feasible?

Any ideas would be much appreciated, many thanks in advance.
Rowan

using SumOfSquares, JuMP, PolyJuMP, DynamicPolynomials, MultivariatePolynomials, CSDP

@polyvar X[1:2]
F(x::Vector) = [-x[1] + 2.0x[2]^2; -x[1]*x[2] - 2.0x[2]];
f = F(X);

V = Lyapunov(f,X)

function Lyapunov(f, x)

n = length(x);

m = SOSModel(solver=CSDPSolver());
@variable m ϵ
@polyvariable m V monomials(x,2);

# Positive definiteness constraint
@polyconstraint m V ≥ ϵ*sum(x.^2);
@constraint m ϵ ≥ 0

# Apply matrix constraint, ∇U⋅fᵥ ≤ 0.
I = eye(x);
Mv = [-dot(differentiate(V, x),f); differentiate(V,x)];
for ii=1:n; Mv = hcat(Mv, [differentiate(V,x)[ii];I[:,ii]]); end
@SDconstraint m Mv ⪰ 0 # Mv positive definite

status = solve(m);
@show(status)

return getvalue(V)
end

function eye(x)
n = length(x);
v = [1.0+0.0x[1]];
for i = 1:n-1
push!(v,1.0+0.0x[1]);
end
return diagm(v)
end

#2

a. You can have Sum of Squares constraints with quadratic coefficients. This is not part of v0.1.0 but it works on master thanks to this commit: https://github.com/JuliaOpt/SumOfSquares.jl/commit/5ea0312790e9539ff6e71988321564f2c5fb03de. You need a solver supporting quadratic constraints over the cones you use though. There is currently no solver supporting quadratic constraints and SDP cone but if you use DSOS (you can find an example here), you will have quadratic constraints over the LP cone which can be handled by e.g. Ipopt. Solution b. is probably better though.
b. @SDconstraint does not support keywork arguments indeed, I have just opened an issue for this, thanks for reporting it! However @SDconstraint m x >= 0 is equivalent to @constraint m x in PSDCone() so you can do @constraint(m, Mv in PSDCone(), domain = @set x >= 0).

#3

Thanks a lot for this. Solution b implements what I needed.


text:
FRW Cosmology From Five Dimensional Vacuum Brans–Dicke Theory

FRW Cosmology From Five Dimensional Vacuum Brans–Dicke Theory

Abstract

We follow the approach of induced–matter theory for a five–dimensional () vacuum Brans–Dicke theory and introduce induced–matter and induced potential in four dimensional () hypersurfaces, and then employ a generalized FRW type solution. We confine ourselves to the scalar field and scale factors be functions of the cosmic time. This makes the induced potential, by its definition, vanishes, but the model is capable to expose variety of states for the universe. In general situations, in which the scale factor of the fifth dimension and scalar field are not constants, the equations, for any kind of geometry, admit a power–law relation between the scalar field and scale factor of the fifth dimension. Hence, the procedure exhibits that vacuum FRW–like equations are equivalent, in general, to the corresponding vacuum ones with the same spatial scale factor but a new scalar field and a new coupling constant, . We show that the vacuum FRW–like equations, or its equivalent vacuum ones, admit accelerated solutions. For a constant scalar field, the equations reduce to the usual FRW equations with a typical radiation dominated universe. For this situation, we obtain dynamics of scale factors of the ordinary and extra dimensions for any kind of geometry without any priori assumption among them. For non–constant scalar fields and spatially flat geometries, solutions are found to be in the form of power–law and exponential ones. We also employ the weak energy condition for the induced–matter, that gives two constraints with negative or positive pressures. All types of solutions fulfill the weak energy condition in different ranges. The power–law solutions with either negative or positive pressures admit both decelerating and accelerating ones. Some solutions accept a shrinking extra dimension. By considering non–ghost scalar fields and appealing the recent observational measurements, the solutions are more restricted. We illustrate that the accelerating power–law solutions, which satisfy the weak energy condition and have non–ghost scalar fields, are compatible with the recent observations in ranges for the coupling constant and for dependence of the fifth dimension scale factor with the usual scale factor. These ranges also fulfill the condition which prevents ghost scalar fields in the equivalent vacuum Brans–Dicke equations. The results are presented in a few tables and figures.

PACS number:  ;  ;  ;  ;
Keywords: Brans–Dicke Theory; Induced–Matter Theory; FRW Cosmology.

1 Introduction

Attempts to geometrical unification of gravity with other interactions, using higher dimensions other than our conventional space–time, began shortly after invention of the special relativity (SR). Nordstrøm was the first who built a unified theory on the base of extra dimensions [1]. Tight connection between SR and electrodynamics, namely the Lorentz transformation, led Kaluza [2] and Klein [3] to establish versions of general relativity (GR) in which electrodynamics rises from the extra fifth dimension. Since then, considerable amount of works have been focused on this idea either using different mechanism for compactification of extra dimension or generalizing it to non–compact scenarios (see e.g. Ref. [4]) such as Brane–World theories [5], space–time–matter or induced–matter (IM) theories [6] and references therein. The latter theories are based on the Campbell–Magaard theorem which asserts that any analytical –dimensional Riemannian manifold can locally be embedded in an –dimensional Ricci–flat Riemannian manifold [7]. This theorem is of great importance for establishing field equations with matter sources locally to be embedded in field equations without priori introducing matter sources. Indeed, the matter sources of space–times can be viewed as a manifestation of extra dimensions. This is actually the core of IM theory which employs GR as the underlying theory.

On the other hand, Jordan [8] attempted to embed a curved space–time in a flat space–time and introduced a new kind of gravitational theory, known as the scalar–tensor theory. Following his idea, Brans and Dicke [9] invented an attractive version of the scalar–tensor theory, an alternative to GR, in which the weak equivalence principle is saved and a non–minimally scalar field couples to curvature. The advantage of this theory is that it is more Machian than GR, though mismatching with the solar system observations is claimed as its weakness [10]. However, the solar system constraint is a generic difficulty in the context of the scalar–tensor theories [11], and it does not necessarily denote that the evolution of the universe, at all scales, should be close to GR, in which there are some debates on its tests on cosmic scales [12].

Although it is sometimes desirable to have a higher dimensional energy–momentum tensor or a scalar field, for example in compactification of extra curved dimensions [13], but the most preference of higher dimensional theories is to obtain macroscopic matter from pure geometry. In this approach, some features of a vacuum Brans–Dicke (BD) theory based on the idea of IM theory have recently been demonstrated [14], in where the role of GR as fundamental underlying theory has been replaced by the BD theory of gravitation. Actually, it has been shown that vacuum BD equations, when reduced to four dimensions, lead to a modified version of the Brans–Dicke theory which includes an induced potential. Whereas in the literature, in order to obtain accelerating universes, inclusion of such potentials has been considered in priori by hand. A few applications and a –dimensional version of this approach have been performed [15, 16]. Though, in Refs. [15], it has also been claimed that their procedure provides explicit definitions for the effective matter and induced potential. Besides, some misleading statements and equations have been asserted in Ref. [14], and hence we have re–derived the procedure in Section . Actually, the reduction procedure of a analogue of the BD theory, with matter content, on every hypersurface orthogonal to an extra cyclic dimension (recovering a modified BD theory described by a 4–metric coupled to two scalar fields) has previously been performed in the literature [17]. However, the key point of IM theories are based on not introducing matter sources in space–times.

In addition, recent measurements of anisotropies in the microwave background suggest that our ordinary universe should be spatially flat [18], and the observations of Type Ia–supernovas indicate that the universe is in an accelerating expansion phase [19]. Hence, the universe should mainly be filled with a dark energy or a quintessence which makes it to expand with acceleration [20]. Then after an intensive amount of work has been performed in the literature to explain the acceleration of the universe.

In this work, we explore the Friedmann–Robertson–Walker (FRW) type cosmology of a vacuum BD theory and obtain solutions and related conditions. This model has extra terms, such as a scalar field and scale factor of fifth dimension, which make it capable to present accelerated universes beside decelerated ones. In the next section, we give a brief review of the induced modified BD theory from a vacuum space–time to rederive the induced energy–momentum tensor, as has been introduced in Ref. [14], for our purpose to employ the energy density and pressure. In Section , we consider a generalized FRW metric in the space–time and specify FRW cosmological equations and employ the weak energy condition (WEC) to obtain the energy density and pressure conditions. Then, we probe two special cases of a constant scale factor of the fifth dimension and a constant scalar field. In Section , we proceed to exhibit that vacuum BD equations, employing the generalized FRW metric, are equivalent, in general, to the corresponding vacuum ones. This equivalency can be viewed as the main point within this work which distinguishes it from Refs. [14, 15]. In Section , we find exact solutions for flat geometries and proceed to get solutions fulfilling the WEC while being compatible with the recent observational measurements. We also provide a few tables and figures for a better view of acceptable range of parameters. Finally, conclusions are presented in the last section.

2 Modified Brans–Dicke Theory From Five–Dimensional Vacuum

Following the idea of IM theories [6], one can replace GR by the BD theory of gravitation as the underlying theory [14, 15, 17]. For this purpose, the action of Brans–Dicke theory can analogously be written in the Jordan frame as

 \emphS [gAB,ϕ]=∫√|(5)g|(ϕ (5)R−ωϕgABϕ,Aϕ,B+16πLm)d5x, (1)

where , the capital Latin indices run from zero to four, is a positive scalar field that describes gravitational coupling in five dimensions, is Ricci scalar, is the determinant of metric , represents the matter Lagrangian and is a dimensionless coupling constant. The field equations obtained from action (1) are

 (5)GAB=8πϕ (5)TAB+ωϕ2(ϕ,Aϕ,B−12gABϕ,Cϕ,C)+1ϕ(ϕ;AB−gAB (5)□ϕ) (2)

and

 (5)□ϕ=8π4+3ω (5)T, (3)

where , is Einstein tensor , is energy–momentum tensor, . Also, in order to have a non–ghost scalar field in the conformally related Einstein frame, i.e. a field with a positive kinetic energy term in that frame, the BD coupling constant must be  [21, 22].

As explained in the introduction, we propose to consider a vacuum state, i.e. , where equations (2) and (3) read

 (5)GAB=ωϕ2(ϕ,Aϕ,B−12gABϕ,Cϕ,C)+1ϕ(ϕ;AB−gAB (5)□ϕ) (4)

and1

 (5)□ϕ=0. (5)

For cosmological purposes one usually restricts attention to metrics of the form, in local coordinates ,

 dS2=gAB(xC)dxAdxB= (5)gμν(xC)dxμdxν+g44(xC)dy2≡ (5)gμν(xC)dxμdxν+ϵb2(xC)dy2, (6)

where represents the fifth coordinate, the Greek indices run from zero to three and . It should be noted that this ansatz is restrictive, but one limits oneself to it for reasons of simplicity. Assuming the space–time is foliated by a family of hypersurfaces, , defined by fixed values of the fifth coordinate, then the metric intrinsic to every generic hypersurface, e.g. , can be obtained when restricting the line element (6) to displacements confined to it. Thus, the induced metric on the hypersurface can have the form

 ds2= (5)gμν(xα,yo)dxμdxν≡gμνdxμdxν, (7)

in such a way that the usual space–time metric, , can be recovered.

Hence, equation (4) on the hypersurface can be written as

 Gαβ=8πϕT(BD)αβ+ωϕ2(ϕ,αϕ,β−12gαβϕ,σϕ,σ)+1ϕ[ϕ;αβ−gαβ(□ϕ−12V(ϕ))], (8)

where is an induced energy–momentum tensor of the effective modified BD theory, which is defined as

 T(BD)αβ≡T(IM)αβ+T(ϕ)αβ, (9)

with2

 T(IM)αβ≡ϕ8π{b;αβb−□bbgαβ−ϵ2b2[b′bg′αβ−g′′αβ+gμνg′αμg′βν−12gμνg′μνg′αβ −gαβ(b′bgμνg′μν−gμνg′′μν−14gμνgρσg′μνg′ρσ−34g′μνg′μν)]} (10)

and

 T(ϕ)αβ≡−ϵ8πb2{gαβ[ϕ′′+(12gμνg′μν−b′b)ϕ′+ϵbb,μϕ,μ]−12g′αβϕ′}. (11)

Also, the induced potential has been defined in the formal identification as [14]

 (12)

where the prime denotes derivative with respect to the fifth coordinate. Such an identification has been claimed [23] to be valid depending on metric background and considering separable scalar fields. However, this definition is different from what has been used in Ref. [15].

Reduction of equation (5) on the hypersurface gives

 □ϕ=−ϵb2⎡⎣ϕ′′+ϕ′⎛⎝gαβg′αβ2−b′b⎞⎠⎤⎦−b,μbϕ,μ, (13)

which after manipulation resembles the other field equation of a modified BD theory in four dimensions with induced potential. The definition and equation (13) are all we need for our purpose in this work and an interested reader can consult Refs. [14, 15] for further details.

In the next section we assume a generalized FRW metric in a vacuum universe to find its cosmological implications.

3 Generalized FRW Cosmology

For a universe with an extra space–like dimension in addition to the three usual spatially homogenous and isotropic ones, metric (6) can be written as

 dS2=−dt2+a2(t,y)[dr21−kr2+r2(dθ2+sin2θdφ2)]+b2(t,y)dy2, (14)

that can be considered as a generalized FRW solution. The scalar field and the scale factors and , in general, are functions of and . However, for simplicity and physical plausibility, we assume the extra dimension is cyclic, i.e. the hypersurface–orthogonal space–like is a Killing vector field in the underlying space–time [17]. Hence, all fields are functions of the cosmic time only, and definition (12) makes the induced potential vanishes. In this case, we will show that such a universe can have accelerating and decelerating solutions. Note that, the functionality of the scale factor on , either can be eliminated by transforming to a new extra coordinate if is a separable function, and or makes no changes in the following equations if is the only field that depends on . Besides, in the compactified extra dimension scenarios, all fields are Fourier–expanded around , and henceforth one can have terms independent of to be observable, i.e. physics would thus be effectively independent of compactified fifth dimension [4].

Considering metric (14), equations (4) and (5) result in cosmological equations

 H2−ω6F2+HF+ka2=−(HB+13BF), (15)
 2˙H+˙F+3H2+(ω2+1)F2+2HF+ka2=−(˙B+B2+2HB+BF), (16)
 2˙H+4H2+ω3F2+2ka2=23BF (17)

and

 ˙F+F2+3HF=−BF, (18)

which are not independent equations and where , and . By employing relation (9), one can interpret the right hand side of equations (15) and (16) as energy density and pressure of the induced effective perfect fluid, i.e.

 ρBD≡−T(BD)t t=−ϕ8π(3HB+BF) (19)

and

 pBD≡T(BD)i i=ϕ8π(˙B+B2+2HB+BF)=−ϕ8πHB, (20)

where or or without summation on it. The latter equality in (20) comes from equation (31) which will be derived in the next section. Therefor, the equation of state is

 pBD=weffρBDwithweff=1F/H+3. (21)

The usual matter in our universe has a positive energy density, this basically has been demanded by the WEC, in which time–like observers must obtain positive energy densities. Actually, the complete WEC is [24]

 {ρBD≥0ρBD+pBD≥0. (22)

Now, let us consider that the scale factor of the fifth dimension and the scalar field are not constant values, i.e. and . Then, by applying conditions (22) into relations (19) and (20), one gets

 {B>0F≤−4H (23)

or

 {B<0F≥−3H, (24)

where we also have assumed expanding universes, i.e. . Using conditions (23) and (24) in relation (21) gives

 −1≤weff≤0 (25)

or

 weff≥0, (26)

in where the effective dust matter can be achieved when goes to negative or positive infinity, respectively.

In Section , we explore characteristic of the corresponding universes for the above results. Meanwhile, in the following, we consider two special cases of a constant scale factor of the fifth dimension and a constant scalar field.

Constant Scale Factor of Fifth Dimension

When is a constant, equations (15)–(18) reduce to

 H2−ω6F2+HF+ka2=0,2˙H+4H2+ω3F2+2ka2=0and˙F+F2+3HF=0. (27)

These are exactly the ordinary vacuum BD equations in space–time, with , as expected.

Constant Scalar Field

When is a constant, action (1) reduces to a Einstein gravitational theory that has been considered in Ref. [25] in general situation (i.e. the extra dimension is not cyclic). In this case, equations (15)–(18) become

 H2+ka2=−HB,˙H+2H2+ka2=0and˙B+B2+3HB=0. (28)

And, the usual FRW equations are equipped with , which refers to a radiation–like dominated universe for any kind of geometry without a priori assumption that the scale factor of the fifth dimension is proportional to the inverse of the usual scale factor, i.e. . Actually, the radiation–like result is expected. For where there is no dependency on the extra dimension, the usual four dimensional part of metric (14) and the third equation (28) give a wave equation for the scale factor of fifth dimension. Hence, definitions (2) and (11) yield a traceless induced energy–momentum tensor, as mentioned in Ref.[25].

Exact solution of the second equation of (28) is

 a=√−kt2+αt. (29)

Substituting solution (29) into the first or third equation of (28) gives

 (30)

where and are constants of integration, and we have assumed that space–time has originated from a big bang.

For a closed geometry, solution (29) admits and predicts a big crunch at for the usual spatial coordinates while the fifth dimension tends to infinite size and is always real, for the maximum value of the usual scale factor is . But, a flat geometry expands for ever and accepts . An open geometry also expands for ever and admits . In this case, results in and . Time evolution of scale factors correspond to closed, flat and open geometries have been illustrated in Fig.  with constant values of and as an example.

In the next two sections, we again consider a more general situation in which the scale factor of the fifth dimension and the scalar field are not constants.

4 Correspondence Between 5d Equations and 4d Ones

Let us explore an equation (if any) similar to equation (18) – which is an integrable equation – for when the rules of and are replaced. For this purpose, adding equations (15) and (16), then subtracting equations (17) and (18) from it, yields

 ˙B+B2+3HB+BF=0. (31)

Comparing equations (18) and (31) shows that they are equivalent to each other if one replaces by . Indeed, integrating equations (18) and (31) gives

 ˙ϕa3b=m1and˙ba3ϕ=m2, (32)

where and are constants of integration in general situations when and are not constants. Actually, vanishing or gives or to be a constant value, respectively, which have been discussed in the previous section. Dividing equations (32) by each other leads to

 B=m′F, (33)

where . Relation (33) obviously gives

 b=bo(ϕϕo)m′, (34)

where and are initial values.

Now, considering relation (33), equations (15)–(18) lead to three independent equations

 H2−~ω6~F2+H~F+ka2=0,2˙H+4H2+~ω3~F2+2ka2=0and˙~F+~F2+3H~F=0, (35)

with

 ~ϕ≡ϕm′+1and~ω≡ω−2m′(m′+1)2, (36)

where and . Equations (35) are exactly the FRW equations of vacuum BD theory. However, one also needs to check if this new scalar field is a wave function in vacuum as well. For this purpose, it is easy to show that

 □~ϕ=(m′+1)(ϕm′,μϕ,μ+ϕm′□ϕ)=0, (37)

where equations (13) and (14) for a cyclic extra dimension have been employed to get the second equality.

Hence, this procedure exhibits that vacuum FRW–like equations, equations (15)–(18), are equivalent to the corresponding vacuum ones, equations (35), with the same spatial scale factor but a new (or modified) scalar field and a new coupling constant, and , in which to have a non–ghost scalar field one must have  [21, 22].

For the special case of , i.e. when , equations (15)–(18) reduce to

 H2−(ω6+13)F2+ka2=0,2˙H+3H2+(ω2+1)F2+ka2=0and˙F+3HF=0. (38)

From the third equation of (38) one gets

 F=Fo(aoa)3. (39)

Using relation (39) into the first and second equations of (38) yields

 ¨aa5=2Aand(˙a2+k)a4=−A, (40)

for and and where . These equations, or actually their division i.e. , can be solved by non–algebraic procedures, and their solutions include the inverse–elliptic functions, although we do not perform it further. For a static universe, i.e. , equations (38) lead to a flat universe with . On the other hand, if , then equations (38) give and which restrict the geometry either to be flat or open. For , one again gets a static universe with and . In the case , it leads to a uniform expanding universe with , and the evolution of scale factor of the fifth dimension is .

In the next section we continue our investigations for cosmological implications of equations (15)–(18) for a flat universe compatible with the recent observations.

5 Exact Solutions for Flat Universe Compatible with Observations

Measurements of anisotropies in the cosmic microwave background radiation indicate that the universe is spatially flat [18], so we concentrate on solutions with flat –spaces. Therefor, equations (15)–(17) yield

 ˙H+3H2+(B+F)H=0, (41)

that gives

 ˙aa2bϕ=m3, (42)

where is an integration constant. The case of vanishing gives a static universe which is not compatible with observations. In general, relations (32) and (42) lead to

 (43)

for and where and , also for general situations and , we have and .

Indeed, if in priori, one had assumed (or ), then equations (15)–(18) would restrict the geometry to be spatially flat, and automatically would give (or ). Therefor, the power–law relation between the scale factor of the fifth dimension and the scalar field with the usual scale factor is a characteristic of the spatially flat universe.

Substituting solutions (43) into equation (41) gives

 ¨a˙a+(m+n+2)˙aa=0. (44)

For , equation (44) has a power–law solution

 a(t)=ao(tto)swithH=st, (45)

where , and assumption expanding universes makes . Hence, solutions (43) lead to

 b(t)=bo(tto)nswithB=nst (46)

and

 ϕ(t)=ϕo(tto)mswithF=mst. (47)

There is also a constraint relation among the initial values, namely . Incidentally, the effective energy density and pressure, equations (19) and (20) become

 ρBD=−ϕos28πtmson(m+3)tms−2andpBD=−ϕos28πtmsontms−2. (48)

In the case , equations (43) and (44) give exponential solutions

 a(t)=aoeλ(t−to)withH=λ, (49)
 b(t)=boenλ(t−to)withB=nλ (50)

and

 ϕ(t)=ϕoemλ(t−to)withF=mλ, (51)

where is a constant and its positive values give expanding universes, thus we assume . Incidentally, the constraint relation among the initial values is . In this case, the energy density and pressure are

 ρBD=−ϕoλ28πemλton(m+3)emλtandpBD=−ϕoλ28πemλtonemλt. (52)

Note that, for both groups of solutions, the power law and exponential ones, one has . We should emphasis that all solutions of this section have been obtained without a priori ansatz for functionality of the scale factor and the scalar field.

In the next two subsections, we discuss properties of these solutions. We should also remind that our vanishing induced potential case is not consistent with zero potential case of Ref. [15] (where there, it requires only).

5.1 Power–Law Solutions

Solutions are generally confined within some constraints that are originated from mathematical or physical reasons. First of all, due to equations (15)–(17), the parameters and are not independent. Substituting solutions (45)–(47) into either of equations (15)–(17) gives

 m±=n+3±√(n+3)2+6ω(n+1)ω (53)

and hence

 s±=ω(ω+1)(n+3)±√(n+3)2+6ω(n+1). (54)

Besides, our constraints are as follows. We have assumed , , and for power–law solutions. Real solutions of relation (53) dictate that . By substituting solutions (45)–(47) in the WEC (23) or (24), we get

 {n>0m≤−4 (55)

or

 {n<0m≥−3, (56)

respectively. Note that, conditions (55) and (56) are compatible with conditions (25) and (26), as expected.

In the following, we employ these constraints for when they lead to cases of decelerated and especially accelerated universes. Meanwhile, we should also remind that the deceleration parameter, , in our model for the power–law solutions is .

Case Ia: Decelerated Universe

It is supposed that the universe for a long time, when it was in the radiation or dust dominated phases, was in a decelerating regime. In our model, decelerating solutions can be obtained when . Acceptable domains of and for such a range, without considering the WEC, is given in Table  and Fig. . Note that, in Fig. , the part (ii) completely covers the part (i). Also, adapted values of and with the WECs (55) and (56) are shown in Table  with Fig.  and Table  with Fig. .

Case IIa: Accelerated Universe

Recent observations show that the universe is in an accelerating regime at the present epoch [19]. This makes , and acceptable values of and corresponding to this condition, without considering the WEC, are given in Table  and Fig. . In Fig. , the maximum value of for values tends to when , and for values tends to when . Corresponding cases with the WECs (55) and (56) are illustrated in Table  with Fig.  and Table  with Fig. , respectively.

It should be emphasized that though astronomical tests in the solar system requires a positive large value for , but still in the large cosmological scale, one cannot definitely rule out small or even negative values of the BD coupling constant. Indeed, these values of have achieved considerable interests in the literature.

By considering the WEC (55) in relations (48), one gets positive energy densities, as expected, but with negative pressures, where both and decrease with the time. In this case, even though the pressure is negative, but Figs.  and illustrate that one has decelerating and accelerating solutions. On the other hand, using condition (56) into relations (48) gives positive energy densities and pressures. Although, in this situation the pressure is positive, but still Figs.  and indicate that one again has decelerating and accelerating solutions. In this situation, for decreasing energy density and pressure with the time, one has to restrict , which most of the solutions fulfill it.

Yet we have one more condition, namely non–ghost scalar fields with , to be imposed. With this situation, acceptable solutions are as follows.

Case Ib: Decelerated Universe

Acceptable values of and for the range restrict Table  and Fig. , and the results are shown in Table  and Fig. . Hence, this model admits a typical decelerated universe with non–ghost scalar fields, positive induced energy density and pressure, fulfilling the WEC (56), where the scale factor of fifth dimension shrinks with the time. Incidentally, Fig.  illustrates that there is not any decelerated solution with non–ghost scalar fields which complies with the WEC (55).

Case IIb: Accelerated Universe

Table  and Fig. , which are the reductions of Table  and Fig. , illustrate the corresponding domains of and for . Therefore, the model also admits a typical accelerated universe with non–ghost scalar fields, positive induced energy density and negative pressure, fulfilling the WEC (55), where the scale factor of fifth dimension grows with the time. This situation restricts , contrary to the assumption of in Ref. [14]. Also, Fig.  indicates that accelerated solutions do not exist for non–ghost scalar fields which fulfill the WEC (56).


text:
# Generating random non-repeating numbers from a small group

I read this Q&A which gave a clever solution: feed an incrementing index into a block key cipher as a way of producing non-repeating random numbers. The problem is the block size of all the good algorithms is often way too big. What if I just want to iterate through all 16-bit numbers, or all N-bit numbers where N is determined by the problem at hand? Nobody in their right mind would make a 16-bit block cipher, but that's what I would need.

One idea I had to iterate pseudo-randomly through all n-bit numbers was to use a binary field. Randomise the modulus polynomial, $Q$, ensuring it's irreducible. Then take a random starting point, $a$, and multiply repeatedly by a random primitive element, $r$, to generate the pseudorandom series.

$n_i = a r^i \pmod Q$

Something tells me this isn't good enough. Predicting the next elements can be interpreted as a discrete logarithm problem if $i$ is the plaintext which must be found from $n_i$. The discrete logarithm is difficult, but when $n_i$ are all given in order, can the problem of finding $r$ and $Q$ from the sequence still be interpreted as the discrete logarithm problem? Does the problem have a name? How hard is it?

If this method of iteration is no good, I had an idea to make it a lot harder: pad the index $i$ with some random bits before encryption, so if the index is a 16 bit number, encrypt it to 20 bits with four random bits. Would that be enough to ensure an unpredictable pattern? What method of iteration would ensure sufficient difficulty in finding a solution? One downside to this modification is that although the sequence generated is non-repeating, it doesn't cover the entire output domain. Is there a way to cover the entire output domain?

• Did you have a look at Format Preserving Encryption? – SEJPM Apr 18 '16 at 20:11
• Check out feistel networks, they are good for crafting arbitrary sized ciphers. Use a hash function as the round function (: – Alan Wolfe Apr 19 '16 at 19:30
• @SEJPM No, I'll have to check it out. – enigmaticPhysicist Apr 20 '16 at 15:58
• @AlanWolfe sounds like a good idea. You should add this as an answer. – enigmaticPhysicist Apr 20 '16 at 15:59

If you are going to generate ALL the numbers in the output domain, an attacker's job of guessing the next number becomes easier the more numbers you use, once you pass the halfway point. I would suggest with whatever method you choose, to never exceed $N/2$ values used, where $N$ is the total number of elements that can be generated using that method, $N=2^{16}$ in your example.

I actually see no problem with using a finite field, but you would need to make it difficult for the attacker to guess the values used to generate it, even if the method was known.

My solution would be to use the same finite field inversion method as was used to generate the AES S-box, but in $GF(2^{16})$ with the APA method. It is a highly nonlinear sequence, and there are simply too many combinations of generator values and reduction polynomials to brute force every option like there are in $GF(2^{8})$.

Essentially, you perform an affine transformation on the input, then find the inverse in the field, and then perform the affine transformation again, with an irreducible polynomial chosen at random from the list of possible polynomials. There are specific combinations of affine generators and vectors within each finite field that generate high quality results useful for S-boxes, but you would not be constrained by the same conditions, giving you more flexibility. The mathematical description of the algorithm would be very simple.

The format preserving option easily allows you to build a Feistel cipher of whatever block size you want since your domain size is an even power of 2, in your case 16-bit, by using another block cipher or PRF as the F-function. You can drop in AES, use the 8-bit block half plus a round counter as an input, and truncate the output to 8-bits. This would be very easy to code and very quick to generate numbers, at the expense of a complex description of the final algorithm. You can also generate 128-bit subkeys in CTR mode, then use these as independent AES keys for each round, at the expense of additional computation.

• The number of primitive polynomials of degree 16 over $GF(2)$ is $\phi(2^16-1)/16=2048.$ Now, each primitive generator corresponds to one of these polynomials, so you can really range over only the generators or the polynomials but not both. The pre- and post- affine multiplications don't contribute any extra security as far as I can see, just a linear change of basis, effectively. I don't know enough about format-preserving encryption to comment, but that may well be the safer route. – kodlu Apr 19 '16 at 1:55
• @kodlu the polynomial does not have to be primitive, just irreducible, and there are 4080 of those. When I was talking about generators, I was referring to the affine operation, which will not change the nonlinearity, but will change the output of the algorithm – Richie Frame Apr 19 '16 at 2:30

Check out Swap or Not (pdf). Unlike some Feistel-network based solutions, this will provide you with near-ideal security (the adversary would have to query close to the entire space to have non-negligible advantage).

Alternatively, enumerating and shuffling a list of 2^16 16-bit numbers would require only ~128KB of RAM. If you needed to reproduce the ordering, use a key as PRNG seed.

• Sometimes-Recurse Shuffle "will provide you with" much-closer-to-ideal security.   – user991 Apr 19 '16 at 8:11
• For only 16 bits, yeah you can just store a completely random permutation since 2*2**16 = 2**17 = 128KiB, but for bigger spaces like 32-bit this becomes impractical. I hadn't made it clear when I first wrote the question, but this is for N-bit integers. The region of 30 to 63 bits is big enough for storing the complete permutation to be usually impractical but small enough that there are no suitable standard block ciphers. – enigmaticPhysicist Apr 20 '16 at 16:06

As SEJPM mentions, what you are doing is called "format preserving encryption" and there is a lot of information out there on that, in case you want to go deeper than the answers here give you.

The problem of creating a custom sized cipher is a difficult one, especially if you want to be sure it's crypto secure, but one nice way to approach the problem is to use Feistel Networks.

They work this way:

1. Break your data into a left and right half
2. put the right half of your data through some "round function"
3. Take that result and xor the left half by that value
4. The result of that xor is the right half of the output
5. The left half of the output is the unmodified right half from step 1

A feistel network does $N$ rounds of the above, where $N$ is tunable where in general higher values of $N$ means a slower more secure cipher, and smaller values of $N$ means a faster less secure cipher.

To decrypt something encrypted with a feistel network, it's a similar process but done in reverse, using the same number of rounds.

The other tunable portion of the feistel network is what you use for the round function.

The round function is just a function where you pass in data, and it does some operations, most likely based on the data passed in, to ideally output a cryptographically secure random number.

The round function is able to destructive operations even, which might be counter intuitive, since it's overall a reversible operation. Took me a while to think through how that is possible personally.

If you have lower quality and security needs, your round function could be something like a pseudo random number generator (like those you might find in games), where you use the input of the function as the seed for the PRNG.

If you have higher quality and security needs, you could use a hash function as the round function. Note there are both cryptographic and non cryptographic hash functions, so you'd have to make a call there, again based on your needs.

The only other challenge remaining is that if your input set is not a full power of 2, your are not going to be able to get a perfectly sized cipher.

The way to handle this is to round up to the next power of 2 (you might have to round up to the next power of 4 actually, if you want your left and right side of your data to be the same size), and iterate through that full possible range of values.

You will get some output values which are "out of range" (larger than your input set), and for these you just throw them out.

For some deeper details and some simple working C++ code without external dependencies, check out my blog post on the subject: Fast & Lightweight Random “Shuffle” Functionality – FIXED!


text:
# Mathematics for Technology II (Math 2131)

Durham College, Mathematics
Free
• 36 lessons
• 0 quizzes
• 14 week duration
• ##### Solving Systems of Equations

This unit introduces how to systematically solve a system of equations, namely linear equations. Examples of non-linear systems, including systems of 3 unknowns will be of emphasis.

• ##### Graphs of Trigonometric Functions

The unit focuses primarily on how to graph periodic sinusoidal functions, and how to identify features of a waveform to produce an equation by inspection.

• ##### Polar Coordinate Functions

An introduction to the polar coordinate system.

• ##### Complex Numbers

This unit is an extension of what was introduced in Math 1131. To learn how to work with radicals, knowing your exponent laws in crucial. Hence, this unit begins with a thorough review.

• ##### Logarithmic Functions

This chapter introduces you to exponential functions, and how they can be solved using logarithms.

• ##### Trigonometric Identities and Equations
No items in this section
• ##### Analytic Geometry
No items in this section

## Mathematics for Technology II (Math 2131)

### Solving Systems of Equations with 3 Unknowns

There are practically countless methods devised over the past millennia that have enabled mathematicians to solve systems with three unknowns. In this section, we will focus on one method exclusively which is based on the methods that you’ve already learned when you solved systems with two unknowns. Technically, when a third variable first-degree variable is added to an equation, the graph of the equation gains a third dimension, so when graphed on an x, y, z-plane, it’s no longer a straight line, but a three-dimensional sheet (illustrated below).

The strategy here is to reduce a given system of three equations with three unknowns to a system of two equations with two unknowns, which you already know how to solve from previous lessons. This is done by taking any two of the given equations and, by addition-subtraction or substitution, eliminate one variable, obtaining a single equation with two unknowns. You then take another pair of equations (which must include one that’s not yet used, as well as one of those already used), and similarly obtain a second equation containing the same two unknowns as before. This pair of equations can then be solved simultaneously, and the values obtained substituted back to obtain the third unknown variable value. This is demonstrated in the following video:

Depending on the system of three equations you’re given, sometimes you may be given one or more equations where all three variables aren’t present (as shown in the next video). If that’s the case, you may be able to find the unknowns via substitution quicker than you would via elimination.

Important note:

If you happen to come across a system of three equations with three unknowns where the variables are found in the denominator, it’s advised that you reassign each variable with its reciprocal counterpart. For example, if the system contains the equation:

$\frac{3}{x}+\frac{4}{5y}–\frac{1}{z}=6\phantom{\rule{0ex}{0ex}}$

You’d set:

Substituting these values makes each term a first degree, thereby making it easier to solve:

$3a+\frac{4b}{5}–c=6\phantom{\rule{0ex}{0ex}}$

Once a, b, and c are found, don’t forget to reciprocate those numbers at the very end.

Of course, you could also find the lowest common denominator instead (for example, 5xyz), and multiple each term by this factor, but you’re more likely to make arithmetic errors along the way if you do so.


text:
# Acosh¶

Versioned name : Acosh-3

Category : Arithmetic unary

Short description : Acosh performs element-wise hyperbolic inverse cosine (arccosh) operation with given tensor.

Detailed description : Operation takes one input tensor and performs the element-wise hyperbolic inverse cosine operation on a given input tensor, based on the following mathematical formula:

$a_{i} = acosh(a_{i})$

Attributes : Acosh operation has no attributes.

Inputs

• 1 : A tensor of type T and arbitrary shape. Required.

Outputs

• 1 : The result of element-wise Acosh operation. A tensor of type T and the same shape as the input tensor.

Types

• T : any numeric type.

Examples

<layer ... type="Acosh">
<input>
<port id="0">
<dim>256</dim>
<dim>56</dim>
</port>
</input>
<output>
<port id="1">
<dim>256</dim>
<dim>56</dim>
</port>
</output>
</layer>


text:
# Work done and change in the internal energy

1. Jul 3, 2013

### Tanya Sharma

1. The problem statement, all variables and given/known data

A force F is applied on a block of mass M.The block is displaced through a distance "d" in the direction of the force.What is the work done by the force on the block?Does the internal energy change because of this work?

2. Relevant equations

3. The attempt at a solution

The work done by the force =Fd
By Work Kinetic energy theorem ,change in kinetic energy of the CM of the block is =(1/2)mvcm2

The internal energy can change either by supplying heat to the system or by doing work on the system.

Work is being done on the block .The KE of the CM of the block changes.But how does this work affects the internal energy of the block ?

Kindly help me in clearing the doubt.

2. Jul 3, 2013

### barryj

If there is no friction between the block and the surface, then all of the energy due to the applied force will go into kinetic energy. However, if there is fraction, then work in the form of heat will be generated according to Frictional force X distance. The heat will go into the block and the surface.

3. Jul 3, 2013

### Tanya Sharma

Hi barryj

You didnt get my point.I understand that work done will change the kinetic energy.But its the Kinetic energy of the CM.How does a change in the KE of the CM reflect on the internal energy of the system(the block,in this case)

4. Jul 3, 2013

### barryj

I assume CM means center of mass? I don't think I have heard of KE of the CM or internal energy related to the CM. If you push a block, the surface where the block slides along the surface will get hot, if there is friction. This work will go into internal energy of the block as heat. The heat will not initially be distributed enenly and to find out the distribution at a certain time is a difficult boundry value problem.

5. Jul 3, 2013

### Tanya Sharma

Barryj,I agree with you.

I am not trying to relate KE of CM to internal energy.All I am saying is that the work done by the force changes the KE of the CM.On the other hand,internal energy is the measure of the average kinetic energy of the molecules.How do we analyse the change in internal energy from the perspective of the first law of thermodynamics as well as the work kinetic energy theorem?

6. Jul 3, 2013

### ehild

The internal energy is the energy of random motion of the particles. The kinetic energy of the CM does not contribute to the internal energy. On the other hand, internal energy does not mean translational kinetic energy only. Rotating molecules contribute to the internal energy with both their translational and rotational energy. Vibrating molecules also contribute with elastic energy.

ehild

7. Jul 3, 2013

### Tanya Sharma

Hi ehild :)

You are absolutely right.But,where does the work done on the block go ?

Can you give an example of a force(other than friction) which could cause a change in the internal energy of the block .

8. Jul 3, 2013

### barryj

Anything that would heat the block. Put the block in a microwave, the water in the block will heat and therefore the IE will increase

9. Jul 3, 2013

### WannabeNewton

In general $dU = \delta W + \delta Q$. In a quasi-static process $\delta W = -pdV$ where $V$ is the volume of the system and $p$ is the pressure and we can write $dU = \delta Q - pdV$. If you apply pressure to the block then you can change its internal energy (obviously since the atoms making up the block are tightly bound, you will not really increase the volume by much when you apply pressure).

Last edited: Jul 3, 2013
10. Jul 3, 2013

### Staff: Mentor

Into the macroscopic translational KE of the block!

11. Jul 3, 2013

### ehild

You know that the CM of a system of point masses moves as if all external forces acted at the CM.

If an external force does some work on a box of gas molecules, the CM gets some velocity and the whole system gains kinetic energy equal to the work done.

The molecules perform random motion and in case the force does not change the state of the gas, the velocity distribution of the molecules will not change. They have their random velocity vir inside the box, and the box travels with velocity V. So the i-th molecule has got the velocity vi=V+vir with respect to the ground. Assume identical particles, so the mass is m, the same for all of them. The work done is equal to the change of the KE. The total kinetic energy of the system is KE=Ʃ1/2 mvi2=1/2V2Ʃm + mVƩvir+Ʃ1/2mvir2.
The first term on the RHS is the KE of the CM, as if the total mass was concentrated in it. The second term cancels as the molecules performs random motion, the average velocity is zero. The third term is the KE or the random motion - the same as in the box in rest. The work of the external force on the box changed the kE of the CM and left the internal energy unchanged.

ehild

12. Jul 3, 2013

### barryj

As I recall, technically, the CM is a location, not a molecule or any substance. It is the location where the mass would be located if it were in an infinitesimally small dot. How can a CM, a location, have energy?

13. Jul 3, 2013

### WannabeNewton

We think of it as describing a hypothetical particle whose mass is the total mass of the aggregate system and location is at the center of mass of the system.

14. Jul 3, 2013

### HallsofIvy

Strictly speaking, no one has said the CM has any energy. What you have been told is that the kinetic energy of the entire block can be calculated by treating it as if the mass were concentrated at the CM.

15. Jul 3, 2013

### Staff: Mentor

In the usual form of the first law, the change in kinetic energy and potential energy of the system are assumed to be negligible. But, more generally, they should also be included on the same side of the equation as the change in internal energy.

Chet

16. Jul 4, 2013

### Tanya Sharma

Thanks ehild .This is what i was looking for.

17. Jul 4, 2013

### ehild

An example:
If that block is not quite rigid, the force causes deformation when it starts to act. That deformation starts elastic waves in the material, and the elastic energy transforms to heat.

ehild


text:
# Are un-upvotes lowering the rep ceiling?

I have a weird behaviour in SE today, where my daily Rep seems capped at 190, not 200:

It's not clear to me what causes this behaviour, but earlier today, someone unupvoted a vote:

Is that expected to be causing such behaviour? If not, what could be the reason? Or is this a bug?Everything else seems perfectly normal, some upvotes, some downvotes etc.

• Is Duplicated votes are being cleaned up (MSE) related in any way? Jun 27, 2022 at 10:49
• @AncientSwordRage: there was only an unupvote/upvote and an unaccept/accept on that qeustion (leaving it unchanged in the end, I think) all at around the same time (not sure if I can see that in more detail than the 10 hours ago). There were no other upvotes on it today, so not sure if that could cause a doubled upvote? Jun 27, 2022 at 10:54
• I'm thinking reversing a historical doublevote might have lowered the repcap somehow? Jun 27, 2022 at 11:08
• @AncientSwordRage That cleanup will leave a "voting corrected" message, not unupvote. meta.stackexchange.com/questions/379788/…
– Someone_Evil Mod
Jun 27, 2022 at 12:44
• Jun 27, 2022 at 13:09

You can see your actual rep tally on /reputation, which should have shown you as having earned 200 rep today (finding when the unupvote was taken from would require a fair bit of investigation, and is probably not worth your time).


text:
# Isomorphisms

The Clifford algebra can be viewed as a $${\mathbb{Z}_{2}}$$-graded algebra, in that it can be decomposed into a direct sum of two vector subspaces generated by $${k}$$-vectors with $${k}$$ either even or odd. The even subspace, denoted $${C_{0}(r,s)}$$, is also a subalgebra, since the Clifford multiplication of two even $${k}$$-vectors remains even.

By choosing $${\hat{e}_{0}^{2}=-1\in C(r,s)}$$ and considering the algebra generated by the orthonormal basis $${\hat{e}_{0}\hat{e}_{i}\:(i\neq0)}$$, it is not hard to show that

$$\displaystyle C_{0}(r,s)\cong C(r,s-1)$$.

Then the relationship $${C_{0}(r,s)\cong C_{0}(s,r)}$$ leads to the isomorphism

$$\displaystyle C(r,s-1)\cong C(s,r-1)$$.

One can also show that:

• $${C(r,s)\otimes C(2,0)\cong C(r,s)\otimes\mathbb{R}(2)\cong C(s+2,r)\cong C(r+1,s+1)}$$
• $${C(r,s)\otimes C(0,2)\cong C(r,s)\otimes\mathbb{H}\cong C(s,r+2)}$$
• $${C(r,s)\otimes C(0,4)\cong C(r,s)\otimes\mathbb{H}(2)\cong C\left(r,s+4\right)}$$
• $${C\left(r-4,s+4\right)\cong C\left(r,s\right)}$$
• The periodicity theorem (related to and sometimes referred to as Bott periodicity): $${C\left(r+8,s\right)\cong C\left(r,s+8\right)\cong C\left(r,s\right)\otimes\mathbb{R}\left(16\right)}$$

The first isomorphism $${C(r+1,s+1)\cong C(r,s)\otimes\mathbb{R}(2)}$$ means that we need only consider classifying Clifford algebras based on the values of $${r-s}$$, and the periodicity theorem means that we can focus on values of $${r-s}$$ mod 8.

In physics, the most important signatures are Euclidean and Lorentzian; specific isomorphisms for some of these Clifford algebras are listed in the following table. Note that since the first column covers all values of $${r-s}$$ mod 8, it can be used to easily determine any other Clifford algebra.

\begin{aligned}n\end{aligned}\begin{aligned}C\left(n,0\right) & \cong C\left(1,n-1\right)\\
& \cong C_{0}\left(n,1\right)\\
& \cong C_{0}\left(1,n\right)
\end{aligned}
\begin{aligned}C\left(0,n\right) & \cong C_{0}\left(n+1,0\right)\\
& \cong C_{0}\left(0,n+1\right)
\end{aligned}
\begin{aligned}C\left(n-1,1\right)\end{aligned}
1$${\mathbb{R}\oplus\mathbb{R}}$$$${\mathbb{C}}$$$${\mathbb{C}}$$
2$${\mathbb{R}\left(2\right)}$$$${\mathbb{H}}$$$${\mathbb{R}\left(2\right)}$$
3$${\mathbb{C}\left(2\right)}$$$${\mathbb{H}\oplus\mathbb{H}}$$$${\mathbb{R}\left(2\right)\oplus\mathbb{R}\left(2\right)}$$
4$${\mathbb{H}\left(2\right)}$$$${\mathbb{H}\left(2\right)}$$$${\mathbb{R}\left(4\right)}$$
5$${\mathbb{H}\left(2\right)\oplus\mathbb{H}\left(2\right)}$$$${\mathbb{C}\left(4\right)}$$$${\mathbb{C}\left(4\right)}$$
6$${\mathbb{H}\left(4\right)}$$$${\mathbb{R}\left(8\right)}$$$${\mathbb{H}\left(4\right)}$$
7$${\mathbb{C}\left(8\right)}$$$${\mathbb{R}\left(8\right)\oplus\mathbb{R}\left(8\right)}$$$${\mathbb{H}\left(4\right)\oplus\mathbb{H}\left(4\right)}$$
8$${\mathbb{R}\left(16\right)}$$$${\mathbb{R}\left(16\right)}$$$${\mathbb{H}\left(8\right)}$$

Note: Clifford multiplication corresponds to matrix multiplication in the isomorphic matrix algebra. Recall that our notation denotes e.g. the algebra of $${2\times2}$$ matrices of quaternions as $${\mathbb{H}(2)}$$.

We can also form the complexified version of the Clifford algebra $${C(r,s)}$$, for which the signature is irrelevant and we simply write $${C\mathbb{^{C}}(n)}$$, where $${r+s=n}$$. The complex Clifford algebras can be completely described by the following isomorphisms:

• $${C\mathbb{^{C}}(2n)\cong\mathbb{C}(2^{n})}$$
• $${C\mathbb{^{C}}(2n+1)\cong\mathbb{C}(2^{n})\oplus\mathbb{C}(2^{n})}$$

Note that this yields an isomorphism $${C\mathbb{^{C}}(2n)\cong C(n,n+1)\cong C(n+2,n-1)}$$; in contrast, $${C\mathbb{^{C}}(2n+1)}$$ is not isomorphic to any real Clifford algebra. Also note that $${C_{0}\mathbb{^{C}}(n)\cong C\mathbb{^{C}}(n-1)}$$.

 Δ Note that when complexifying, we have e.g. $${\left(iv\right)\left(iw\right)=\left\langle iv,iw\right\rangle =-vw=-\left\langle v,w\right\rangle}$$, so that $${\left\langle \right\rangle}$$ is not a complex inner product as we have defined it; in particular, $${\left\langle v,v\right\rangle}$$ can have an imaginary part.
 Δ Although the above are all valid algebra isomorphisms, the original formulation of a Clifford algebra includes an extra structure: the generating vector space $${\mathbb{R}^{n}}$$ that is explicitly embedded in $${C(r,s}$$). This extra structure is lost in these isomorphisms, since the choice of such an embedding is not in general unique.


text:
Bio.Structure: Macromolecular Structures

The Bio.Structure module provides functionality to manipulate macromolecular structures, and in particular to read and write Protein Data Bank (PDB) files. It is designed to be used for standard structural analysis tasks, as well as acting as a platform on which others can build to create more specific tools.

Parsing PDB files

downloadpdb("1EN2")

To parse a PDB file into a Structure-Model-Chain-Residue-Atom framework:

julia> struc = read(filepath_1EN2, PDB)
Bio.Structure.ProteinStructure
Name                        -  1EN2.pdb
Number of models            -  1
Chain(s)                    -  A
Number of residues          -  85
Number of point mutations   -  5
Number of other molecules   -  5
Number of water molecules   -  76
Number of atoms             -  614
Number of hydrogens         -  0
Number of disordered atoms  -  27

The elements of struc can be accessed as follows:

Command Returns Return type
struc[1] Model 1 Model
struc[1]['A'] Model 1, chain A Chain
struc['A'] The lowest model (model 1), chain A Chain
struc['A']["50"] Model 1, chain A, residue 50 AbstractResidue
struc['A'][50] Shortcut to above if it is not a hetero residue and the insertion code is blank AbstractResidue
struc['A']["H_90"] Model 1, chain A, hetero residue 90 AbstractResidue
struc['A'][50]["CA"] Model 1, chain A, residue 50, atom name CA AbstractAtom
struc['A'][15]["CG"]['A'] For disordered atoms, access a specific location Atom

Disordered atoms are stored in a DisorderedAtom container but calls fall back to the default atom, so disorder can be ignored if you are not interested in it.

Disordered residues (i.e. point mutations with different residue names) are stored in a DisorderedResidue container.

The idea is that disorder will only bother you if you want it to. See the Biopython discussion for more.

Properties can be retrieved as follows:

Function Returns Return type
serial Serial number of an atom Int
atomname Name of an atom String
altlocid Alternative location ID of an atom Char
x x coordinate of an atom Float64
y y coordinate of an atom Float64
z z coordinate of an atom Float64
coords coordinates of an atom Array{Float64,1}
occupancy Occupancy of an atom (default is 1.0) Float64
tempfactor Temperature factor of an atom (default is 0.0) Float64
element Element of an atom (default is " ") String
charge Charge of an atom (default is " ") String
residue Residue an atom belongs to Residue
ishetero true if the residue or atom is a hetero residue/atom Bool
isdisorderedatom true if the atom is disordered Bool
pdbline PDB ATOM/HETATM record for an atom String
resname Residue name of a residue or atom String
resnumber Residue number of a residue or atom Int
inscode Insertion code of a residue or atom Char
resid Residue ID of an atom or residue (full=true includes chain) String
atomnames Atom names of the atoms in a residue, sorted by serial Array{String,1}
atoms Dictionary of atoms in a residue Dict{String, AbstractAtom}
isdisorderedres true if the residue has multiple residue names Bool
disorderedres Access a particular residue name in a DisorderedResidue Residue
chain Chain a residue or atom belongs to Chain
chainid Chain ID of a chain, residue or atom Char
resids Sorted residue IDs in a chain Array{String,1}
residues Dictionary of residues in a chain Dict{String, AbstractResidue}
model Model a chain, residue or atom belongs to Model
modelnumber Model number of a model, chain, residue or atom Int
chainids Sorted chain IDs in a model or structure Array{Char,1}
chains Dictionary of chains in a model or structure Dict{Char, Chain}
structure Structure a model, chain, residue or atom belongs to ProteinStructure
structurename Name of the structure an element belongs to String
modelnumbers Sorted model numbers in a structure Array{Int,1}
models Dictionary of models in a structure Dict{Int, Model}

The strip keyword argument determines whether surrounding whitespace is stripped for atomname, element, charge, resname and atomnames (default true).

The coordinates of an atom can be set using x!, y!, z! and coords!.

Manipulating structures

Elements can be looped over to reveal the sub-elements in the correct order:

for mod in struc
for ch in mod
for res in ch
for at in res
# Do something
end
end
end
end

Models are ordered numerically; chains are ordered by character, except the empty chain is last; residues are ordered by residue number and insertion code with hetero residues after standard residues; atoms are ordered by atom serial.

collect can be used to get arrays of sub-elements. collectatoms, collectresidues, collectchains and collectmodels return arrays of a particular type from a structural element or element array.

Selectors are functions passed as additional arguments to these functions. Only elements that return true when passed to the selector are retained.

Command Action Return type
collect(struc['A'][50]) Collect the sub-elements of an element, e.g. atoms from a residue Array{AbstractAtom,1}
collectresidues(struc) Collect the residues of an element Array{AbstractResidue,1}
collectatoms(struc) Collect the atoms of an element Array{AbstractAtom,1}
collectatoms(struc, calphaselector) Collect the C-alpha atoms of an element Array{AbstractAtom,1}
collectatoms(struc, calphaselector, disorderselector) Collect the disordered C-alpha atoms of an element Array{AbstractAtom,1}

It is easy to define your own atom, residue, chain or model selectors. The below will collect all atoms with x coordinate less than 0:

xselector(at::AbstractAtom) = x(at) < 0
collectatoms(struc, xselector)

Alternatively, you can use an anonymous function:

collectatoms(struc, at -> x(at) < 0)

countatoms, countresidues, countchains and countmodels can be used to count elements. For example:

julia> countatoms(struc)
754

julia> countatoms(struc, calphaselector)
85

julia> countresidues(struc, standardselector)
85

The sequence of a protein can be retrieved by passing a Chain or array of residues to AminoAcidSequence:

julia> AminoAcidSequence(struc['A'], standardselector)
85aa Amino Acid Sequence:
RCGSQGGGSTCPGLRCCSIWGWCGDSEPYCGRTCENKCWSGERSDHRCGAAVGNPPCGQDRCCSVHGWCGGGNDYCSGGNCQYRC

Writing PDB files

PDB format files can be written:

writepdb("1EN2_out.pdb", struc)

Any element type can be given as input to writepdb. Atom selectors can also be given as additional arguments:

writepdb("1EN2_out.pdb", struc, backboneselector)

Spatial calculations

Various functions are provided to calculate spatial quantities for proteins:

Command Returns
distance Minimum distance between two elements
sqdistance Minimum square distance between two elements
bondangle Angle between three atoms
dihedralangle Dihedral angle defined by four atoms
omegaangle Omega angle between a residue and the previous residue
phiangle Phi angle between a residue and the previous residue
psiangle Psi angle between a residue and the next residue
ramachandranangles Vectors of phi and psi angles of an element
contactmap Contact map of two element, or one element with itself
rmsd RMSD between two elements of the same size - assumes they are superimposed
displacements Vector of displacements between two elements of the same size - assumes they are superimposed

For example:

julia> distance(struc['A'][10], struc['A'][20])
10.782158874733762

110.77765846083398

-177.38288114072924

-177.38288114072924

Examples

A few further examples of Bio.Structure usage are given below.

A) To plot the temperature factors of a protein, if you have Gadfly installed:

using Gadfly
calphas = collectatoms(struc, calphaselector)
plot(x=resnumber.(calphas),
y=tempfactor.(calphas),
Guide.xlabel("Residue number"),
Guide.ylabel("Temperature factor"),
Geom.line)

B) To print the PDB records for all C-alpha atoms within 5 Angstroms of residue 38:

for at in calphas
if distance(struc['A'][38], at) < 5.0 && resnumber(at) != 38
println(pdbline(at))
end
end

D) To view the contact map of a structure:

cbetas = collectatoms(struc, cbetaselector)
contacts = contactmap(cbetas, 7.0)
for i in 1:length(cbetas)
for j in 1:length(cbetas)
if contacts[i,j]
print("█")
else
print(" ")
end
end
println()
end

cbetaselector selects C-beta atoms, or C-alpha atoms for glycine residues. contactmap can also be given two structural elements as arguments, in which case a non-symmetrical 2D array is returned showing contacts between the elements.

E) To show the Ramachandran phi/psi angle plot of a structure, if you have Gadfly installed:

using Gadfly
phi_angles, psi_angles = ramachandranangles(struc, standardselector)

downloadpdb("1SSU")