Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
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
schwede
openstructure
Commits
e9d77d5b
Commit
e9d77d5b
authored
1 year ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
OMF: rotamer compression
parent
13054c14
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/io/pymod/export_omf_io.cc
+1
-0
1 addition, 0 deletions
modules/io/pymod/export_omf_io.cc
modules/io/src/mol/omf.cc
+706
-30
706 additions, 30 deletions
modules/io/src/mol/omf.cc
modules/io/src/mol/omf.hh
+52
-5
52 additions, 5 deletions
modules/io/src/mol/omf.hh
with
759 additions
and
35 deletions
modules/io/pymod/export_omf_io.cc
+
1
−
0
View file @
e9d77d5b
...
...
@@ -61,6 +61,7 @@ void export_omf_io() {
.
value
(
"ROUND_BFACTORS"
,
OMF
::
ROUND_BFACTORS
)
.
value
(
"SKIP_SS"
,
OMF
::
SKIP_SS
)
.
value
(
"INFER_PEP_BONDS"
,
OMF
::
INFER_PEP_BONDS
)
.
value
(
"INFER_AA_POS"
,
OMF
::
INFER_AA_POS
)
;
class_
<
OMF
,
OMFPtr
>
(
"OMF"
,
no_init
)
...
...
This diff is collapsed.
Click to expand it.
modules/io/src/mol/omf.cc
+
706
−
30
View file @
e9d77d5b
This diff is collapsed.
Click to expand it.
modules/io/src/mol/omf.hh
+
52
−
5
View file @
e9d77d5b
...
...
@@ -39,9 +39,29 @@ typedef boost::shared_ptr<OMF> OMFPtr;
typedef
boost
::
shared_ptr
<
ChainData
>
ChainDataPtr
;
typedef
boost
::
shared_ptr
<
BioUnitData
>
BioUnitDataPtr
;
struct
SidechainAtomRule
{
int
sidechain_atom_idx
;
int
anchor_idx
[
3
];
Real
bond_length
;
Real
angle
;
// 0: chi1, 1: chi2, 2: chi3, 3: chi4, 4: 0.0
int
dihedral_idx
;
// the value of the dihedral above will be added to base_dihedral to get
// the final diheral angle. If you want to have the effect of chi3 + M_PI
// you define dihedral_idx as 2 and base_dihedral = M_PI.
Real
base_dihedral
;
};
struct
ChiDefinition
{
int
idx_one
;
int
idx_two
;
int
idx_three
;
int
idx_four
;
};
struct
ResidueDefinition
{
ResidueDefinition
()
{
};
ResidueDefinition
()
:
rotamer_setup
(
false
)
{
};
ResidueDefinition
(
const
ost
::
mol
::
ResidueHandle
&
res
);
...
...
@@ -65,6 +85,28 @@ struct ResidueDefinition {
void
FromStream
(
std
::
istream
&
stream
);
int
GetIdx
(
const
String
&
aname
)
const
;
const
std
::
set
<
int
>&
GetRotamericAtoms
()
const
;
const
std
::
vector
<
ChiDefinition
>&
GetChiDefinitions
()
const
;
const
std
::
vector
<
SidechainAtomRule
>&
GetSidechainAtomRules
()
const
;
int
GetNChiAngles
()
const
;
void
_InitIdxMapper
()
const
;
void
_InitRotamer
()
const
;
void
_AddChiDefinition
(
int
idx_one
,
int
idx_two
,
int
idx_three
,
int
idx_four
)
const
;
void
_AddAtomRule
(
int
a_idx
,
int
anch_one_idx
,
int
anch_two_idx
,
int
anch_three_idx
,
Real
bond_length
,
Real
angle
,
int
dihedral_idx
,
Real
base_dihedral
)
const
;
String
name
;
char
olc
;
char
chem_type
;
...
...
@@ -74,6 +116,11 @@ struct ResidueDefinition {
std
::
vector
<
bool
>
is_hetatm
;
std
::
vector
<
int
>
bonds
;
std
::
vector
<
int
>
bond_orders
;
mutable
bool
rotamer_setup
;
mutable
std
::
map
<
String
,
int
>
idx_mapper
;
mutable
std
::
set
<
int
>
rotameric_atoms
;
mutable
std
::
vector
<
ChiDefinition
>
chi_definitions
;
mutable
std
::
vector
<
SidechainAtomRule
>
sidechain_atom_rules
;
};
...
...
@@ -108,12 +155,12 @@ struct ChainData {
void
ToStream
(
std
::
ostream
&
stream
,
const
std
::
vector
<
ResidueDefinition
>&
res_def
,
bool
lossy
,
bool
avg_bfactors
,
bool
round_bfactors
,
bool
skip_ss
)
const
;
bool
skip_ss
,
bool
infer_aa_pos
)
const
;
void
FromStream
(
std
::
istream
&
stream
,
const
std
::
vector
<
ResidueDefinition
>&
res_def
,
int
version
,
bool
lossy
,
bool
avg_bfactors
,
bool
round_bfactors
,
bool
skip_ss
);
bool
round_bfactors
,
bool
skip_ss
,
bool
infer_aa_pos
);
// chain features
String
ch_name
;
...
...
@@ -151,13 +198,13 @@ private:
DefaultPepLib
&
operator
=
(
DefaultPepLib
const
&
copy
);
};
class
OMF
{
public:
enum
OMFOption
{
DEFAULT_PEPLIB
=
1
,
LOSSY
=
2
,
AVG_BFACTORS
=
4
,
ROUND_BFACTORS
=
8
,
SKIP_SS
=
16
,
INFER_PEP_BONDS
=
32
};
ROUND_BFACTORS
=
8
,
SKIP_SS
=
16
,
INFER_PEP_BONDS
=
32
,
INFER_AA_POS
=
64
};
bool
OptionSet
(
OMFOption
opt
)
const
{
return
(
opt
&
options_
)
==
opt
;
...
...
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