Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
tbgl
tools
mrdna
Commits
5d01a8a5
Commit
5d01a8a5
authored
4 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Updated bondAngle to be two angles, one bond
parent
9f55d328
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mrdna/arbdmodel/__init__.py
+9
-9
9 additions, 9 deletions
mrdna/arbdmodel/__init__.py
with
9 additions
and
9 deletions
mrdna/arbdmodel/__init__.py
+
9
−
9
View file @
5d01a8a5
...
@@ -149,12 +149,12 @@ class Parent():
...
@@ -149,12 +149,12 @@ class Parent():
# for b in (i,j): assert(b in beads)
# for b in (i,j): assert(b in beads)
self
.
exclusions
.
append
(
(
i
,
j
)
)
self
.
exclusions
.
append
(
(
i
,
j
)
)
def
add_bond_angle
(
self
,
i
,
j
,
k
,
bond_angle
,
exclude
=
False
):
def
add_bond_angle
(
self
,
i
,
j
,
k
,
l
,
bond_angle
,
exclude
=
False
):
assert
(
len
(
set
((
i
,
j
,
k
)))
==
3
)
assert
(
len
(
set
((
i
,
j
,
k
,
l
)))
==
4
)
## TODO: how to handle duplicating and cloning bonds
## TODO: how to handle duplicating and cloning bonds
# beads = [b for b in self]
# beads = [b for b in self]
# for b in (i,j): assert(b in beads)
# for b in (i,j): assert(b in beads)
self
.
bond_angles
.
append
(
(
i
,
j
,
k
,
bond_angle
)
)
self
.
bond_angles
.
append
(
(
i
,
j
,
k
,
l
,
bond_angle
)
)
def
get_restraints
(
self
):
def
get_restraints
(
self
):
ret
=
[]
ret
=
[]
...
@@ -219,14 +219,14 @@ class Parent():
...
@@ -219,14 +219,14 @@ class Parent():
def
_get_bond_potentials
(
self
):
def
_get_bond_potentials
(
self
):
bonds
=
[
b
for
i
,
j
,
b
,
ex
in
self
.
get_bonds
()]
bonds
=
[
b
for
i
,
j
,
b
,
ex
in
self
.
get_bonds
()]
bondangles1
=
[
b
[
1
]
for
i
,
j
,
k
,
b
in
self
.
get_bond_angles
()]
bondangles1
=
[
b
[
1
]
for
i
,
j
,
k
,
l
,
b
in
self
.
get_bond_angles
()]
bondangles2
=
[
b
[
2
]
for
i
,
j
,
k
,
b
in
self
.
get_bond_angles
()]
return
list
(
set
(
bonds
+
bondangles1
))
return
list
(
set
(
bonds
+
bondangles1
+
bondangles2
))
def
_get_angle_potentials
(
self
):
def
_get_angle_potentials
(
self
):
angles
=
[
b
for
i
,
j
,
k
,
b
in
self
.
get_angles
()]
angles
=
[
b
for
i
,
j
,
k
,
b
in
self
.
get_angles
()]
bondangles
=
[
b
[
0
]
for
i
,
j
,
k
,
b
in
self
.
get_bond_angles
()]
bondangles1
=
[
b
[
0
]
for
i
,
j
,
k
,
l
,
b
in
self
.
get_bond_angles
()]
return
list
(
set
(
angles
+
bondangles
))
bondangles2
=
[
b
[
2
]
for
i
,
j
,
k
,
l
,
b
in
self
.
get_bond_angles
()]
return
list
(
set
(
angles
+
bondangles1
+
bondangles2
))
## Removed because prohibitively slow
## Removed because prohibitively slow
...
@@ -1240,7 +1240,7 @@ component "data" value 3
...
@@ -1240,7 +1240,7 @@ component "data" value 3
with
open
(
self
.
_bond_angle_filename
,
'
w
'
)
as
fh
:
with
open
(
self
.
_bond_angle_filename
,
'
w
'
)
as
fh
:
for
b
in
self
.
get_bond_angles
():
for
b
in
self
.
get_bond_angles
():
item
=
tuple
([
p
.
idx
for
p
in
b
[:
-
1
]]
+
[
str
(
p
)
for
p
in
b
[
-
1
]])
item
=
tuple
([
p
.
idx
for
p
in
b
[:
-
1
]]
+
[
str
(
p
)
for
p
in
b
[
-
1
]])
fh
.
write
(
"
BONDANGLE %d %d %d %s %s %s
\n
"
%
item
)
fh
.
write
(
"
BONDANGLE %d %d %d
%d
%s %s %s
\n
"
%
item
)
def
dimensions_from_structure
(
self
,
padding_factor
=
1.5
,
isotropic
=
False
):
def
dimensions_from_structure
(
self
,
padding_factor
=
1.5
,
isotropic
=
False
):
## TODO: cache coordinates using numpy arrays for quick min/max
## TODO: cache coordinates using numpy arrays for quick min/max
...
...
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