Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PuReMD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SParTA
PuReMD
Commits
028c7bc9
Commit
028c7bc9
authored
8 years ago
by
Kurt A. O'Hearn
Browse files
Options
Downloads
Patches
Plain Diff
Add more tools. Update water benchmark.
parent
11811c5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
data/benchmarks/water/water_6540.pdb
+1
-1
1 addition, 1 deletion
data/benchmarks/water/water_6540.pdb
tools/geo2lmp_reax.awk
+38
-0
38 additions, 0 deletions
tools/geo2lmp_reax.awk
tools/lmp2pdb.awk
+106
-0
106 additions, 0 deletions
tools/lmp2pdb.awk
with
145 additions
and
1 deletion
data/benchmarks/water/water_6540.pdb
+
1
−
1
View file @
028c7bc9
CRYST1 40.299 40.299 40.299 90.00 90.00 90.00 0
CRYST1 40.299 40.299 40.299 90.00 90.00 90.00 0
ATOM 1 O REX 1 5.690 12.751 11.651 1.00 0.00 0 O
ATOM 2 H REX 1 4.760 12.681 11.281 1.00 0.00 0 H
ATOM 3 H REX 1 5.800 13.641 12.091 1.00 0.00 0 H
...
...
This diff is collapsed.
Click to expand it.
tools/geo2lmp_reax.awk
0 → 100644
+
38
−
0
View file @
028c7bc9
BEGIN
{
comment
=
"water strong scaling test"
;
ntypes
=
2
;
masses
[
1
]
=
1.0080
;
masses
[
2
]
=
15.990
;
types
[
"H"
]
=
1
;
types
[
"O"
]
=
2
;
box
[
0
]
=
box
[
1
]
=
box
[
2
]
=
0
;
}
{
if
(
$1
==
"BOXGEO"
)
{
box
[
0
]
=
$2
;
box
[
1
]
=
$3
;
box
[
2
]
=
$4
;
}
else
if
(
NF
==
1
)
{
natoms
=
$1
;
# print the header
print
"#"
,
comment
,
"\n"
;
print
natoms
,
"atoms"
;
print
ntypes
,
"atom types\n"
;
print
"0"
,
box
[
0
],
"xlo"
,
"xhi"
;
print
"0"
,
box
[
1
],
"ylo"
,
"yhi"
;
print
"0"
,
box
[
2
],
"zlo"
,
"zhi\n"
;
print
"Masses\n"
;
for
(
i
=
1
;
i
<=
ntypes
;
++
i
)
print
i
,
masses
[
i
];
print
"\nAtoms\n"
;
}
else
{
# print the atom info
print
$1
,
types
[
$2
],
"0"
,
$4
,
$5
,
$6
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tools/lmp2pdb.awk
0 → 100644
+
106
−
0
View file @
028c7bc9
BEGIN
{
box_flag
=
0
;
natoms
=
-
1
;
ntypes
=
-
1
;
atom_style
=
"charge"
;
}
{
# num atoms
if
(
$2
==
"atoms"
)
natoms
=
$1
;
# num atom types
else
if
(
$2
==
"atom"
&&
$3
==
"types"
)
ntypes
=
$1
;
# box geometry
else
if
(
$3
==
"xlo"
&&
$4
==
"xhi"
)
{
box
[
0
]
=
$2
-
$1
;
++
box_flag
;
}
else
if
(
$3
==
"ylo"
&&
$4
==
"yhi"
)
{
box
[
1
]
=
$2
-
$1
;
++
box_flag
;
}
else
if
(
$3
==
"zlo"
&&
$4
==
"zhi"
)
{
box
[
2
]
=
$2
-
$1
;
++
box_flag
;
}
# atom masses
else
if
(
$1
==
"Masses"
)
{
if
(
ntypes
<=
0
)
{
printf
(
"number of atom types can not be %d!\n"
,
ntypes
);
exit
;
}
getline
;
# skip the empty line
for
(
i
=
0
;
i
<
ntypes
;
++
i
)
{
getline
;
if
(
NF
!=
2
)
{
# expect one integer, one float
printf
(
"unexpected mass line format: %s!\n"
,
$0
);
exit
;
}
# record the atom type
if
(
$2
==
12.0000
)
types
[
$1
]
=
"C"
;
else
if
(
$2
==
1.0080
)
types
[
$1
]
=
"H"
;
else
if
(
$2
==
15.9990
)
types
[
$1
]
=
"O"
;
else
if
(
$2
==
14.0000
)
types
[
$1
]
=
"N"
;
else
{
printf
(
"unknown atom type!\n"
);
exit
;
}
}
}
# atom info
else
if
(
$1
==
"Atoms"
)
{
if
(
natoms
<=
0
)
{
printf
(
"number of atoms can not be %d!\n"
,
natoms
);
exit
;
}
getline
;
# skip the empty line
for
(
i
=
0
;
i
<
natoms
;
++
i
)
{
getline
;
if
(
NF
!=
6
)
{
# expect 3 ints, 3 floats
printf
(
"unexpected atom line format: %s!\n"
,
$0
);
exit
;
}
atoms
[
i
,
"serial"
]
=
$1
;
atoms
[
i
,
"type"
]
=
types
[
$2
];
atoms
[
i
,
"q"
]
=
$3
;
atoms
[
i
,
"x"
]
=
$4
;
atoms
[
i
,
"y"
]
=
$5
;
atoms
[
i
,
"z"
]
=
$6
;
}
}
else
if
(
$1
==
"#"
)
1
;
# skip the comment
else
if
(
NF
==
0
)
1
;
# skip the empty line
else
{
printf
(
"unexpected line: %s\n"
,
$0
);
exit
;
}
}
END
{
if
(
box_flag
!=
3
)
{
printf
(
"incorrect box geometry!\n"
);
exit
;
}
printf
(
"%6s%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f%11s%4d\n"
,
"CRYST1"
,
box
[
0
],
box
[
1
],
box
[
2
],
90
,
90
,
90
,
"P"
,
1
);
for
(
i
=
0
;
i
<
natoms
;
++
i
)
{
printf
(
"%-6s%5d%5s%c%3s %c%4d%c %8.3f%8.3f%8.3f%6.2f%6.2f "
\
"%-4s%2s%2s\n"
,
"ATOM"
,
atoms
[
i
,
"serial"
],
atoms
[
i
,
"type"
],
" "
,
"REX"
,
" "
,
1
,
" "
,
atoms
[
i
,
"x"
],
atoms
[
i
,
"y"
],
atoms
[
i
,
"z"
],
1.0
,
0.0
,
"0"
,
atoms
[
i
,
"type"
],
" "
);
}
printf
(
"END\n"
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment