Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto77 committed Sep 9, 2022
1 parent 56c1339 commit b332dfe
Show file tree
Hide file tree
Showing 9 changed files with 2,053 additions and 2,036 deletions.
4 changes: 2 additions & 2 deletions CSManager/CSManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2022.09.08.1135</AssemblyVersion>
<FileVersion>2022.09.08.1135</FileVersion>
<AssemblyVersion>2022.09.09.2035</AssemblyVersion>
<FileVersion>2022.09.09.2035</FileVersion>
<ApplicationIcon>App.ico</ApplicationIcon>
</PropertyGroup>

Expand Down
Binary file modified CSManager/StdDb.cdb3
Binary file not shown.
5 changes: 3 additions & 2 deletions CSManager/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ static public string RecentHistory
}
}

static public int AMCSD = 20819;
static public int COD = 476346;
static public int AMCSD = 20997;
static public int COD = 490180;

static public string History =
"History" +
"\r\n ver1.891(2022/09/09) Renewed AMCSD database (contains 20,997) and COD database (490,180)." +
"\r\n ver1.890(2021/11/12) Target framework is changed to .Net 6.0." +
"\r\n ver1.888(2021/07/16) Renewed AMCSD database (contains 20,819)" +
"\r\n ver1.887(2021/07/12) Changed the target framework to .Net 5.0. Improved loading speed of database. Renewed COD database (463,756)" +
Expand Down
4 changes: 2 additions & 2 deletions Crystallography.Controls/Crystallography.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2022.9.8.0234</AssemblyVersion>
<FileVersion>2022.9.8.0234</FileVersion>
<AssemblyVersion>2022.9.9.1118</AssemblyVersion>
<FileVersion>2022.9.9.1118</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
8 changes: 3 additions & 5 deletions Crystallography/Crystal/CrystalMinimum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,15 @@ public static Crystal GetCrystal(Crystal2 c)

var anisoValues = a.IsU ? aniso.Select(an => an.Value / 100).ToArray() : aniso.Select(an => an.Value).ToArray();
var anisoErrors = a.IsU ? aniso.Select(an => an.Error / 100).ToArray() : aniso.Select(an => an.Error).ToArray();

atom.Add(
new Atoms(
var _atom = new Atoms(
a.Label, a.AtomNo, a.SubXray, a.SubElectron, null, c.sym,
new Vector3D(pos[0].Value, pos[1].Value, pos[2].Value, false),
new Vector3D(pos[0].Error, pos[1].Error, pos[2].Error, false),
occ.Value, occ.Error,
new DiffuseScatteringFactor(a.IsU ? DiffuseScatteringFactor.Type.U : DiffuseScatteringFactor.Type.B, a.IsIso,
iso.Value, iso.Error, anisoValues, anisoErrors, cell.Values)
)
);
);
atom.Add(_atom );
atom[^1].ResetVesta();

//AtomNoが255(重水素D)だった時の処理
Expand Down
4 changes: 2 additions & 2 deletions Crystallography/Crystallography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2022.9.8.0234</AssemblyVersion>
<FileVersion>2022.9.8.0234</FileVersion>
<AssemblyVersion>2022.9.9.1118</AssemblyVersion>
<FileVersion>2022.9.9.1118</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
30 changes: 23 additions & 7 deletions Crystallography/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,13 +972,29 @@ public static Vector3D InnerLattice(Vector3D v)
/// <returns></returns>
public Vector3D InnerLattice()
{
double[] d = new double[] { X, Y, Z };
for (int j = 0; j < 3; j++)
{
while (d[j] < 0) { d[j] += 1; }
while (d[j] >= 1) { d[j] -= 1; }
}
return new Vector3D(d[0], d[1], d[2], false);
double x = X, y = Y, z = Z;
while (x < 0) x += 1;
while (x >= 1) x -= 1;
while (y < 0) y += 1;
while (y >= 1) y -= 1;
while (z < 0) z += 1;
while (z >= 1) z -= 1;
return new Vector3D(x, y, z, false);
}

/// <summary>
/// 座標一ずつを加減算し、0から1の範囲内に収める
/// </summary>
/// <param name="v"></param>
/// <returns></returns>
public void InnerLatticeThis()
{
while (X < 0) X += 1;
while (X >= 1) X -= 1;
while (Y < 0) Y += 1;
while (Y >= 1) Y -= 1;
while (Z < 0) Z += 1;
while (Z >= 1) Z -= 1;
}

public override string ToString() => Text != "" ? Text : $"{X}, {Y}, {Z}";
Expand Down
Loading

0 comments on commit b332dfe

Please sign in to comment.