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
d4972542
Unverified
Commit
d4972542
authored
Nov 18, 2021
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-added group to Compound. Seems to be important
parent
b7330c07
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
include/cif++/Compound.hpp
+3
-1
src/Compound.cpp
+6
-3
src/PDB2Cif.cpp
+0
-0
No files found.
include/cif++/Compound.hpp
View file @
d4972542
...
...
@@ -104,6 +104,7 @@ class Compound
std
::
string
id
()
const
{
return
mID
;
}
std
::
string
name
()
const
{
return
mName
;
}
std
::
string
type
()
const
{
return
mType
;
}
std
::
string
group
()
const
{
return
mGroup
;
}
std
::
string
formula
()
const
{
return
mFormula
;
}
float
formulaWeight
()
const
{
return
mFormulaWeight
;
}
int
formalCharge
()
const
{
return
mFormalCharge
;
}
...
...
@@ -130,11 +131,12 @@ class Compound
friend
class
CCP4CompoundFactoryImpl
;
Compound
(
cif
::
Datablock
&
db
);
Compound
(
cif
::
Datablock
&
db
,
const
std
::
string
&
id
,
const
std
::
string
&
name
,
const
std
::
string
&
type
);
Compound
(
cif
::
Datablock
&
db
,
const
std
::
string
&
id
,
const
std
::
string
&
name
,
const
std
::
string
&
type
,
const
std
::
string
&
group
);
std
::
string
mID
;
std
::
string
mName
;
std
::
string
mType
;
std
::
string
mGroup
;
std
::
string
mFormula
;
float
mFormulaWeight
=
0
;
int
mFormalCharge
=
0
;
...
...
src/Compound.cpp
View file @
d4972542
...
...
@@ -127,6 +127,8 @@ Compound::Compound(cif::Datablock &db)
ba
::
replace_all
(
mName
,
"
\n
"
,
""
);
mGroup
=
"non-polymer"
;
auto
&
chemCompAtom
=
db
[
"chem_comp_atom"
];
for
(
auto
row
:
chemCompAtom
)
{
...
...
@@ -150,10 +152,11 @@ Compound::Compound(cif::Datablock &db)
}
}
Compound
::
Compound
(
cif
::
Datablock
&
db
,
const
std
::
string
&
id
,
const
std
::
string
&
name
,
const
std
::
string
&
type
)
Compound
::
Compound
(
cif
::
Datablock
&
db
,
const
std
::
string
&
id
,
const
std
::
string
&
name
,
const
std
::
string
&
type
,
const
std
::
string
&
group
)
:
mID
(
id
)
,
mName
(
name
)
,
mType
(
type
)
,
mGroup
(
group
)
{
auto
&
chemCompAtom
=
db
[
"chem_comp_atom"
];
for
(
auto
row
:
chemCompAtom
)
...
...
@@ -410,7 +413,7 @@ CompoundFactoryImpl::CompoundFactoryImpl(const std::filesystem::path &file, std:
auto
&
db
=
cifFile
[
"comp_"
+
id
];
mCompounds
.
push_back
(
new
Compound
(
db
,
id
,
name
,
type
));
mCompounds
.
push_back
(
new
Compound
(
db
,
id
,
name
,
type
,
group
));
}
}
else
...
...
@@ -616,7 +619,7 @@ Compound *CCP4CompoundFactoryImpl::create(const std::string &id)
else
type
=
"non-polymer"
;
mCompounds
.
push_back
(
new
Compound
(
db
,
id
,
name
,
type
));
mCompounds
.
push_back
(
new
Compound
(
db
,
id
,
name
,
type
,
group
));
result
=
mCompounds
.
back
();
}
}
...
...
src/PDB2Cif.cpp
View file @
d4972542
This diff is collapsed.
Click to expand it.
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