Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
T
TooBBA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stelios Karozis
TooBBA
Commits
9b57904e
Commit
9b57904e
authored
May 11, 2020
by
Stelios Karozis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change output of res2grid function
parent
236a9cf9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
CHANGELOG
CHANGELOG
+1
-1
main.py
main.py
+2
-2
tooba_f.py
tooba_f.py
+9
-3
No files found.
CHANGELOG
View file @
9b57904e
...
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [Unreleased]
## [0.0.2] - 2020-05-
05
## [0.0.2] - 2020-05-
11
### Added
### Added
- code for domain decomposition function
- code for domain decomposition function
- code for identify desired atoms
- code for identify desired atoms
...
...
main.py
View file @
9b57904e
...
@@ -13,6 +13,6 @@ box_p=tbf.domain_decomposition(data=data_all,dx=2,dy=2,dz=2)
...
@@ -13,6 +13,6 @@ box_p=tbf.domain_decomposition(data=data_all,dx=2,dy=2,dz=2)
#Find atom type index in lists created above
#Find atom type index in lists created above
group_ndx
=
tbf
.
resid_data
(
atom_type
,
group
=
[
'C1'
])
group_ndx
=
tbf
.
resid_data
(
atom_type
,
group
=
[
'C1'
])
#Assign desired atoms (from above function) to subdomains
#Assign desired atoms (from above function) to subdomains
box_res
=
tbf
.
res2grid
(
data_all
,
atom_num
,
box_p
,
group_ndx
)
_
,
box_res
=
tbf
.
res2grid
(
data_all
,
atom_num
,
box_p
,
group_ndx
)
print
(
box_res
)
\ No newline at end of file
tooba_f.py
View file @
9b57904e
...
@@ -226,12 +226,14 @@ def res2grid(data, atom_num, box_p, ndx):
...
@@ -226,12 +226,14 @@ def res2grid(data, atom_num, box_p, ndx):
box_p = {dictionary input from 'def domain_decomposition'}
box_p = {dictionary input from 'def domain_decomposition'}
ndx = {dictionary input from 'def resid_data'}
ndx = {dictionary input from 'def resid_data'}
output: dictionar
y
output: dictionar
ies
"""
"""
box_res
=
{}
box_res
=
{}
box_res_rev
=
{}
for
step
in
data
.
keys
():
for
step
in
data
.
keys
():
box_res
[
step
]
=
{}
box_res
[
step
]
=
{}
box_res_rev
[
step
]
=
{}
for
key
in
ndx
.
keys
():
for
key
in
ndx
.
keys
():
for
i
in
ndx
[
key
]:
for
i
in
ndx
[
key
]:
#data[step]['x'][atom_num][x(0),y(1),z(2)]
#data[step]['x'][atom_num][x(0),y(1),z(2)]
...
@@ -262,5 +264,9 @@ def res2grid(data, atom_num, box_p, ndx):
...
@@ -262,5 +264,9 @@ def res2grid(data, atom_num, box_p, ndx):
if
zz
<
iz
and
zz
>
prev
:
if
zz
<
iz
and
zz
>
prev
:
prev
=
iz
prev
=
iz
break
break
box_res
[
step
][
atom_num
[
i
]]
=
[
cnt_x
,
cnt_y
,
cnt_z
]
box_res
[
step
][
atom_num
[
i
]]
=
(
cnt_x
,
cnt_y
,
cnt_z
)
return
box_res
#Make subdomain position the key and group the residues
\ No newline at end of file
for
key
,
value
in
sorted
(
box_res
[
step
]
.
items
()):
box_res_rev
[
step
]
.
setdefault
(
value
,
[])
.
append
(
key
.
strip
())
return
box_res
,
box_res_rev
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment