Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
3f5e6201
Unverified
Commit
3f5e6201
authored
Apr 28, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loading compound info, finished with error checking and verbose mode
parent
851a43ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
22 deletions
+19
-22
src/Cif2PDB.cpp
+1
-2
src/Compound.cpp
+18
-4
src/Secondary.cpp
+0
-16
No files found.
src/Cif2PDB.cpp
View file @
3f5e6201
...
...
@@ -3922,8 +3922,7 @@ std::string GetPDBSOURCELine(cif::File& cifFile, std::string::size_type truncate
{
"pdbx_host_org_vector_type"
,
"EXPRESSION_SYSTEM_VECTOR_TYPE"
},
{
"pdbx_host_org_vector"
,
"EXPRESSION_SYSTEM_VECTOR"
},
{
"pdbx_host_org_gene"
,
"EXPRESSION_SYSTEM_GENE"
},
{
"plasmid_name"
,
"EXPRESSION_SYSTEM_PLASMID"
},
{
"details"
,
"OTHER_DETAILS"
}
{
"plasmid_name"
,
"EXPRESSION_SYSTEM_PLASMID"
}
};
for
(
auto
gr
:
gen
.
find
(
cif
::
Key
(
"entity_id"
)
==
entityID
))
...
...
src/Compound.cpp
View file @
3f5e6201
...
...
@@ -621,8 +621,14 @@ CompoundFactory::CompoundFactory()
const
char
*
clibd_mon
=
getenv
(
"CLIBD_MON"
);
if
(
clibd_mon
!=
nullptr
and
fs
::
is_directory
(
clibd_mon
))
mImpl
=
new
CCP4CompoundFactoryImpl
(
clibd_mon
);
else
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"CCP4 monomers library not found, CLIBD_MON is not defined"
<<
std
::
endl
;
mImpl
=
new
CCDCompoundFactoryImpl
(
mImpl
);
auto
ccd
=
cif
::
loadResource
(
"components.cif"
);
if
(
ccd
)
mImpl
=
new
CCDCompoundFactoryImpl
(
mImpl
);
else
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"CCD components.cif file was not found"
<<
std
::
endl
;
}
CompoundFactory
::~
CompoundFactory
()
...
...
@@ -685,17 +691,25 @@ void CompoundFactory::popDictionary()
const
Compound
*
CompoundFactory
::
create
(
std
::
string
id
)
{
return
mImpl
->
get
(
id
);
static
bool
warned
=
false
;
if
(
mImpl
==
nullptr
and
warned
==
false
)
{
std
::
cerr
<<
"Warning: no compound information library was found, resulting data may be incorrect or incomplete"
<<
std
::
endl
;
warned
=
true
;
}
return
mImpl
?
mImpl
->
get
(
id
)
:
nullptr
;
}
bool
CompoundFactory
::
isKnownPeptide
(
const
std
::
string
&
resName
)
const
{
return
mImpl
->
isKnownPeptide
(
resName
)
;
return
mImpl
?
mImpl
->
isKnownPeptide
(
resName
)
:
kAAMap
.
count
(
resName
)
>
0
;
}
bool
CompoundFactory
::
isKnownBase
(
const
std
::
string
&
resName
)
const
{
return
mImpl
->
isKnownBase
(
resName
)
;
return
mImpl
?
mImpl
->
isKnownBase
(
resName
)
:
kBaseMap
.
count
(
resName
)
>
0
;
}
}
// namespace mmcif
src/Secondary.cpp
View file @
3f5e6201
...
...
@@ -512,11 +512,7 @@ double Res::CalculateSurface(const std::vector<Res>& inResidues)
void
CalculateAccessibilities
(
std
::
vector
<
Res
>&
inResidues
,
DSSP_Statistics
&
stats
)
{
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"Calculate accessibilities"
<<
std
::
endl
;
stats
.
accessibleSurface
=
0
;
for
(
auto
&
residue
:
inResidues
)
stats
.
accessibleSurface
+=
residue
.
CalculateSurface
(
inResidues
);
}
...
...
@@ -1186,9 +1182,6 @@ DSSPImpl::DSSPImpl(const Structure& s, int min_poly_proline_stretch_length)
,
mPolymers
(
mStructure
.
polymers
())
,
m_min_poly_proline_stretch_length
(
min_poly_proline_stretch_length
)
{
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"Calculating DSSP "
;
size_t
nRes
=
accumulate
(
mPolymers
.
begin
(),
mPolymers
.
end
(),
0.0
,
[](
double
s
,
auto
&
p
)
{
return
s
+
p
.
size
();
});
...
...
@@ -1266,20 +1259,11 @@ void DSSPImpl::calculateSecondaryStructure()
mSSBonds
.
emplace_back
(
&*
r1
,
&*
r2
);
}
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"."
;
CalculateHBondEnergies
(
mResidues
);
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"."
;
CalculateBetaSheets
(
mResidues
,
mStats
);
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"."
;
CalculateAlphaHelices
(
mResidues
,
mStats
);
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
"."
;
CalculatePPHelices
(
mResidues
,
mStats
,
m_min_poly_proline_stretch_length
);
if
(
cif
::
VERBOSE
)
std
::
cerr
<<
std
::
endl
;
if
(
cif
::
VERBOSE
>
1
)
{
for
(
auto
&
r
:
mResidues
)
...
...
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