Skip to content

Commit

Permalink
updated structure files
Browse files Browse the repository at this point in the history
  • Loading branch information
alec-glisman committed Apr 23, 2024
1 parent 165b786 commit ee91d59
Show file tree
Hide file tree
Showing 130 changed files with 1,163,592 additions and 1,431,545 deletions.
Original file line number Diff line number Diff line change
@@ -1,119 +1,65 @@
REMARK Materials Studio PDB file
REMARK Created: Sat Apr 13 18:54:50 -0500 2024
CRYST1 4.990 4.990 42.700 90.00 90.00 120.00 P1
REMARK Created: Tue Apr 23 14:53:32 -0500 2024
CRYST1 4.990 4.990 25.639 90.00 90.00 120.00 P1
ORIGX1 1.000000 0.000000 0.000000 0.00000
ORIGX2 0.000000 1.000000 0.000000 0.00000
ORIGX3 0.000000 0.000000 1.000000 0.00000
SCALE1 0.200401 0.115701 0.000000 0.00000
SCALE2 0.000000 0.231403 0.000000 0.00000
SCALE3 0.000000 0.000000 0.023419 0.00000
ATOM 1 Ca1 MOL 2 0.000 0.000 15.639 1.00 0.00 Ca2+
ATOM 2 Ca1 MOL 2 0.000 0.000 32.700 1.00 0.00 Ca2+
ATOM 3 Ca1 MOL 2 2.495 1.440 4.265 1.00 0.00 Ca2+
ATOM 4 Ca1 MOL 2 2.495 1.440 21.326 1.00 0.00 Ca2+
ATOM 5 Ca1 MOL 2 -0.000 2.881 9.952 1.00 0.00 Ca2+
ATOM 6 Ca1 MOL 2 -0.000 2.881 27.013 1.00 0.00 Ca2+
ATOM 7 Ca1 MOL 2 0.000 0.000 7.109 1.00 0.00 Ca2+
ATOM 8 Ca1 MOL 2 0.000 0.000 24.170 1.00 0.00 Ca2+
ATOM 9 Ca1 MOL 2 2.495 1.440 12.796 1.00 0.00 Ca2+
ATOM 10 Ca1 MOL 2 2.495 1.440 29.857 1.00 0.00 Ca2+
ATOM 11 Ca1 MOL 2 -0.000 2.881 1.422 1.00 0.00 Ca2+
ATOM 12 Ca1 MOL 2 -0.000 2.881 18.483 1.00 0.00 Ca2+
ATOM 13 C2 MOL 2 0.000 0.000 2.844 1.00 0.00 C
ATOM 14 C2 MOL 2 0.000 0.000 19.905 1.00 0.00 C
ATOM 15 C2 MOL 2 2.495 1.440 8.531 1.00 0.00 C
ATOM 16 C2 MOL 2 2.495 1.440 25.592 1.00 0.00 C
ATOM 17 C2 MOL 2 -0.000 2.881 14.218 1.00 0.00 C
ATOM 18 C2 MOL 2 -0.000 2.881 31.279 1.00 0.00 C
ATOM 19 C2 MOL 2 0.000 0.000 11.374 1.00 0.00 C
ATOM 20 C2 MOL 2 0.000 0.000 28.435 1.00 0.00 C
ATOM 21 C2 MOL 2 2.495 1.440 0.000 1.00 0.00 C
ATOM 22 C2 MOL 2 2.495 1.440 17.061 1.00 0.00 C
ATOM 23 C2 MOL 2 -0.000 2.881 5.687 1.00 0.00 C
ATOM 24 C2 MOL 2 -0.000 2.881 22.748 1.00 0.00 C
ATOM 25 O3 MOL 2 1.282 -0.000 2.844 1.00 0.00 O
ATOM 26 O3 MOL 2 1.282 -0.000 19.905 1.00 0.00 O
ATOM 27 O3 MOL 2 3.777 1.440 8.531 1.00 0.00 O
ATOM 28 O3 MOL 2 3.777 1.440 25.592 1.00 0.00 O
ATOM 29 O3 MOL 2 1.282 2.881 14.218 1.00 0.00 O
ATOM 30 O3 MOL 2 1.282 2.881 31.279 1.00 0.00 O
ATOM 31 O3 MOL 2 -0.641 1.110 2.844 1.00 0.00 O
ATOM 32 O3 MOL 2 -0.641 1.110 19.905 1.00 0.00 O
ATOM 33 O3 MOL 2 1.854 2.550 8.531 1.00 0.00 O
ATOM 34 O3 MOL 2 1.854 2.550 25.592 1.00 0.00 O
ATOM 35 O3 MOL 2 -0.641 3.991 14.218 1.00 0.00 O
ATOM 36 O3 MOL 2 -0.641 3.991 31.279 1.00 0.00 O
ATOM 37 O3 MOL 2 -0.641 -1.110 2.844 1.00 0.00 O
ATOM 38 O3 MOL 2 -0.641 -1.110 19.905 1.00 0.00 O
ATOM 39 O3 MOL 2 1.854 0.331 8.531 1.00 0.00 O
ATOM 40 O3 MOL 2 1.854 0.331 25.592 1.00 0.00 O
ATOM 41 O3 MOL 2 -0.641 1.771 14.218 1.00 0.00 O
ATOM 42 O3 MOL 2 -0.641 1.771 31.279 1.00 0.00 O
ATOM 43 O3 MOL 2 -1.282 0.000 11.374 1.00 0.00 O
ATOM 44 O3 MOL 2 -1.282 0.000 28.435 1.00 0.00 O
ATOM 45 O3 MOL 2 1.213 1.440 0.000 1.00 0.00 O
ATOM 46 O3 MOL 2 1.213 1.440 17.061 1.00 0.00 O
ATOM 47 O3 MOL 2 -1.282 2.881 5.687 1.00 0.00 O
ATOM 48 O3 MOL 2 -1.282 2.881 22.748 1.00 0.00 O
ATOM 49 O3 MOL 2 0.641 -1.110 11.374 1.00 0.00 O
ATOM 50 O3 MOL 2 0.641 -1.110 28.435 1.00 0.00 O
ATOM 51 O3 MOL 2 3.136 0.331 0.000 1.00 0.00 O
ATOM 52 O3 MOL 2 3.136 0.331 17.061 1.00 0.00 O
ATOM 53 O3 MOL 2 0.641 1.771 5.687 1.00 0.00 O
ATOM 54 O3 MOL 2 0.641 1.771 22.748 1.00 0.00 O
ATOM 55 O3 MOL 2 0.641 1.110 11.374 1.00 0.00 O
ATOM 56 O3 MOL 2 0.641 1.110 28.435 1.00 0.00 O
ATOM 57 O3 MOL 2 3.136 2.550 0.000 1.00 0.00 O
ATOM 58 O3 MOL 2 3.136 2.550 17.061 1.00 0.00 O
ATOM 59 O3 MOL 2 0.641 3.991 5.687 1.00 0.00 O
ATOM 60 O3 MOL 2 0.641 3.991 22.748 1.00 0.00 O
TER 61
CONECT 13 25 31 37
CONECT 14 26 32 38
CONECT 15 27 33 39
CONECT 16 28 34 40
CONECT 17 29 35 41
CONECT 18 30 36 42
CONECT 19 43 49 55
CONECT 20 44 50 56
CONECT 21 45 51 57
CONECT 22 46 52 58
CONECT 23 47 53 59
CONECT 24 48 54 60
CONECT 25 13
CONECT 26 14
CONECT 27 15
CONECT 28 16
CONECT 29 17
CONECT 30 18
CONECT 31 13
CONECT 32 14
CONECT 33 15
CONECT 34 16
CONECT 35 17
CONECT 36 18
CONECT 37 13
CONECT 38 14
CONECT 39 15
CONECT 40 16
CONECT 41 17
CONECT 42 18
CONECT 43 19
CONECT 44 20
CONECT 45 21
CONECT 46 22
CONECT 47 23
CONECT 48 24
CONECT 49 19
CONECT 50 20
CONECT 51 21
CONECT 52 22
CONECT 53 23
CONECT 54 24
CONECT 55 19
CONECT 56 20
CONECT 57 21
CONECT 58 22
CONECT 59 23
CONECT 60 24
SCALE3 0.000000 0.000000 0.039003 0.00000
ATOM 1 Ca1 MOL 2 0.290 0.121 15.639 1.00 0.00 Ca2+
ATOM 2 Ca1 MOL 2 2.785 1.561 4.265 1.00 0.00 Ca2+
ATOM 3 Ca1 MOL 2 0.290 3.002 9.952 1.00 0.00 Ca2+
ATOM 4 Ca1 MOL 2 0.290 0.121 7.109 1.00 0.00 Ca2+
ATOM 5 Ca1 MOL 2 2.785 1.561 12.796 1.00 0.00 Ca2+
ATOM 6 Ca1 MOL 2 0.290 3.002 1.422 1.00 0.00 Ca2+
ATOM 7 C2 MOL 2 0.290 0.121 2.844 1.00 0.00 C
ATOM 8 C2 MOL 2 2.785 1.561 8.530 1.00 0.00 C
ATOM 9 C2 MOL 2 0.290 3.002 14.218 1.00 0.00 C
ATOM 10 C2 MOL 2 0.290 0.121 11.374 1.00 0.00 C
ATOM 11 C2 MOL 2 2.785 1.561 0.000 1.00 0.00 C
ATOM 12 C2 MOL 2 0.290 3.002 5.687 1.00 0.00 C
ATOM 13 O3 MOL 2 1.571 0.121 2.844 1.00 0.00 O
ATOM 14 O3 MOL 2 4.066 1.561 8.530 1.00 0.00 O
ATOM 15 O3 MOL 2 1.571 3.002 14.218 1.00 0.00 O
ATOM 16 O3 MOL 2 -0.351 1.231 2.844 1.00 0.00 O
ATOM 17 O3 MOL 2 2.144 2.671 8.530 1.00 0.00 O
ATOM 18 O3 MOL 2 -0.351 4.112 14.218 1.00 0.00 O
ATOM 19 O3 MOL 2 -0.351 -0.989 2.844 1.00 0.00 O
ATOM 20 O3 MOL 2 2.144 0.451 8.530 1.00 0.00 O
ATOM 21 O3 MOL 2 -0.351 1.892 14.218 1.00 0.00 O
ATOM 22 O3 MOL 2 -0.992 0.121 11.374 1.00 0.00 O
ATOM 23 O3 MOL 2 1.503 1.561 0.000 1.00 0.00 O
ATOM 24 O3 MOL 2 -0.992 3.002 5.687 1.00 0.00 O
ATOM 25 O3 MOL 2 0.931 -0.989 11.374 1.00 0.00 O
ATOM 26 O3 MOL 2 3.426 0.451 0.000 1.00 0.00 O
ATOM 27 O3 MOL 2 0.931 1.892 5.687 1.00 0.00 O
ATOM 28 O3 MOL 2 0.931 1.231 11.374 1.00 0.00 O
ATOM 29 O3 MOL 2 3.426 2.671 0.000 1.00 0.00 O
ATOM 30 O3 MOL 2 0.931 4.112 5.687 1.00 0.00 O
TER 31
CONECT 7 13 16 19
CONECT 8 14 17 20
CONECT 9 15 18 21
CONECT 10 22 25 28
CONECT 11 23 26 29
CONECT 12 24 27 30
CONECT 13 7
CONECT 14 8
CONECT 15 9
CONECT 16 7
CONECT 17 8
CONECT 18 9
CONECT 19 7
CONECT 20 8
CONECT 21 9
CONECT 22 10
CONECT 23 11
CONECT 24 12
CONECT 25 10
CONECT 26 11
CONECT 27 12
CONECT 28 10
CONECT 29 11
CONECT 30 12
END
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ def clean_pdb(input_file: Path, output_file: Path) -> None:
ag = u.atoms

# rigid body transformations to remove empty space
z_min = np.nanmin(u.atoms.positions[:, 2])
z_min = np.nanmin(u.atoms.positions[:, 2]) + 0.1
z_max = np.nanmax(u.atoms.positions[:, 2])
trans = [0, 0, -z_min]
dim = u.dimensions
dim[2] = z_max - z_min
transform = [
transformations.translate(trans),
transformations.boxdimensions.set_dimensions(dim),
transformations.unwrap(u.atoms),
]
u.trajectory.add_transformations(*transform)

Expand Down Expand Up @@ -141,12 +142,6 @@ def clean_pdb(input_file: Path, output_file: Path) -> None:

# update indices and unwrap atoms in pdb file
u = mda.Universe(f"{output_file}")
transform = [
transformations.unwrap(u.atoms),
transformations.center_in_box(u.atoms),
transformations.wrap(u.atoms, compound="residues"),
]
u.trajectory.add_transformations(*transform)
u.atoms.write(
f"{output_file}",
remarks="CaCO3 crystal structure generated with MDAnalysis",
Expand All @@ -169,9 +164,8 @@ def replicates(filename: Path, size_nm: int) -> tuple:
def replicate_pdb(filename: Path, replicate: tuple) -> None:
uni = mda.Universe(f"{filename}")
box = uni.dimensions[:3]
angles = uni.dimensions[3:]
copied = []

copied = []
for x in range(replicate[0]):
for y in range(replicate[1]):
for z in range(replicate[2]):
Expand All @@ -182,7 +176,8 @@ def replicate_pdb(filename: Path, replicate: tuple) -> None:

new_universe = mda.Merge(*copied)
new_box = box * (replicate[0], replicate[1], replicate[2])
new_universe.dimensions = list(new_box) + list(angles)
new_universe.dimensions = list(new_box) + [90] * 3

# write the new structure
new_universe.atoms.write(
f"{filename}",
Expand Down
Loading

0 comments on commit ee91d59

Please sign in to comment.