Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
4455bab6
Commit
4455bab6
authored
2 years ago
by
dsehnal
Browse files
Options
Downloads
Patches
Plain Diff
Fix struct_conn bond assignment for ions
parent
b21fb270
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/mol-model/structure/structure/unit/bonds/inter-compute.ts
+19
-4
19 additions, 4 deletions
...mol-model/structure/structure/unit/bonds/inter-compute.ts
with
20 additions
and
4 deletions
CHANGELOG.md
+
1
−
0
View file @
4455bab6
...
@@ -16,6 +16,7 @@ Note that since we don't clearly distinguish between a public and private interf
...
@@ -16,6 +16,7 @@ Note that since we don't clearly distinguish between a public and private interf
-
Add per-pixel object clipping
-
Add per-pixel object clipping
-
Fix
`QualityAssessment`
assignment bug for structures with different auth vs label sequence numbering
-
Fix
`QualityAssessment`
assignment bug for structures with different auth vs label sequence numbering
-
Refresh
`ApplyActionControl`
's param definition when toggling expanded state
-
Refresh
`ApplyActionControl`
's param definition when toggling expanded state
-
Fix
`struct_conn`
bond assignment for ions
## [v3.26.0] - 2022-12-04
## [v3.26.0] - 2022-12-04
...
...
This diff is collapsed.
Click to expand it.
src/mol-model/structure/structure/unit/bonds/inter-compute.ts
+
19
−
4
View file @
4455bab6
...
@@ -20,6 +20,7 @@ import { InterUnitGraph } from '../../../../../mol-math/graph/inter-unit-graph';
...
@@ -20,6 +20,7 @@ import { InterUnitGraph } from '../../../../../mol-math/graph/inter-unit-graph';
import
{
StructConn
}
from
'
../../../../../mol-model-formats/structure/property/bonds/struct_conn
'
;
import
{
StructConn
}
from
'
../../../../../mol-model-formats/structure/property/bonds/struct_conn
'
;
import
{
equalEps
}
from
'
../../../../../mol-math/linear-algebra/3d/common
'
;
import
{
equalEps
}
from
'
../../../../../mol-math/linear-algebra/3d/common
'
;
import
{
Model
}
from
'
../../../model
'
;
import
{
Model
}
from
'
../../../model
'
;
import
{
StructureProperties
}
from
'
../../properties
'
;
// avoiding namespace lookup improved performance in Chrome (Aug 2020)
// avoiding namespace lookup improved performance in Chrome (Aug 2020)
const
v3distance
=
Vec3
.
distance
;
const
v3distance
=
Vec3
.
distance
;
...
@@ -249,13 +250,27 @@ function computeInterUnitBonds(structure: Structure, props?: Partial<InterBondCo
...
@@ -249,13 +250,27 @@ function computeInterUnitBonds(structure: Structure, props?: Partial<InterBondCo
(
!
Unit
.
isAtomic
(
a
)
||
mtA
[
a
.
residueIndex
[
a
.
elements
[
0
]]]
!==
MoleculeType
.
Water
)
&&
(
!
Unit
.
isAtomic
(
a
)
||
mtA
[
a
.
residueIndex
[
a
.
elements
[
0
]]]
!==
MoleculeType
.
Water
)
&&
(
!
Unit
.
isAtomic
(
b
)
||
mtB
[
b
.
residueIndex
[
b
.
elements
[
0
]]]
!==
MoleculeType
.
Water
)
(
!
Unit
.
isAtomic
(
b
)
||
mtB
[
b
.
residueIndex
[
b
.
elements
[
0
]]]
!==
MoleculeType
.
Water
)
);
);
const
notIon
=
(
(
!
Unit
.
isAtomic
(
a
)
||
mtA
[
a
.
residueIndex
[
a
.
elements
[
0
]]]
!==
MoleculeType
.
Ion
)
&&
const
sameModel
=
a
.
model
===
b
.
model
;
(
!
Unit
.
isAtomic
(
b
)
||
mtB
[
b
.
residueIndex
[
b
.
elements
[
0
]]]
!==
MoleculeType
.
Ion
)
const
notIonA
=
(
!
Unit
.
isAtomic
(
a
)
||
mtA
[
a
.
residueIndex
[
a
.
elements
[
0
]]]
!==
MoleculeType
.
Ion
)
||
(
sameModel
&&
hasStructConnRecord
(
a
));
);
const
notIonB
=
(
!
Unit
.
isAtomic
(
b
)
||
mtB
[
b
.
residueIndex
[
b
.
elements
[
0
]]]
!==
MoleculeType
.
Ion
)
||
(
sameModel
&&
hasStructConnRecord
(
b
));
const
notIon
=
notIonA
&&
notIonB
;
return
Structure
.
validUnitPair
(
s
,
a
,
b
)
&&
(
notWater
||
!
p
.
ignoreWater
)
&&
(
notIon
||
!
p
.
ignoreIon
);
return
Structure
.
validUnitPair
(
s
,
a
,
b
)
&&
(
notWater
||
!
p
.
ignoreWater
)
&&
(
notIon
||
!
p
.
ignoreIon
);
}),
}),
});
});
}
}
function
hasStructConnRecord
(
unit
:
Unit
)
{
const
elements
=
unit
.
elements
;
const
structConn
=
StructConn
.
Provider
.
get
(
unit
.
model
);
if
(
structConn
)
{
for
(
let
i
=
0
,
_i
=
elements
.
length
;
i
<
_i
;
i
++
)
{
if
(
structConn
.
byAtomIndex
.
get
(
elements
[
i
]))
{
return
true
;
}
}
}
return
false
;
}
export
{
computeInterUnitBonds
};
export
{
computeInterUnitBonds
};
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