Skip to content
Snippets Groups Projects
Commit a9b23646 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

mmcif writer: introduce _atom_site.pdbx_PDB_model_num

required by prody/biotite
parent fb045eb9
Branches
Tags
No related merge requests found
...@@ -684,6 +684,7 @@ namespace { ...@@ -684,6 +684,7 @@ namespace {
desc.Add("auth_asym_id"); desc.Add("auth_asym_id");
desc.Add("id"); desc.Add("id");
desc.Add("pdbx_PDB_ins_code"); desc.Add("pdbx_PDB_ins_code");
desc.Add("pdbx_PDB_model_num");
ost::io::StarWriterLoopPtr sl(new ost::io::StarWriterLoop(desc)); ost::io::StarWriterLoopPtr sl(new ost::io::StarWriterLoop(desc));
return sl; return sl;
} }
...@@ -849,7 +850,7 @@ namespace { ...@@ -849,7 +850,7 @@ namespace {
} }
const std::vector<String>& aln = it->second; const std::vector<String>& aln = it->second;
int label_seq_id = 0; // 0-based index int label_seq_id = 0; // 0-based index
std::vector<ost::io::StarWriterValue> at_data(17); std::vector<ost::io::StarWriterValue> at_data(18);
for(auto res: res_list) { for(auto res: res_list) {
String comp_id = res.GetName(); String comp_id = res.GetName();
...@@ -920,6 +921,10 @@ namespace { ...@@ -920,6 +921,10 @@ namespace {
at_data[15] = ost::io::StarWriterValue::FromInt(atom_site_ptr->GetN()); at_data[15] = ost::io::StarWriterValue::FromInt(atom_site_ptr->GetN());
// pdbx_PDB_ins_code // pdbx_PDB_ins_code
at_data[16] = ost::io::StarWriterValue::FromString(ins_code); at_data[16] = ost::io::StarWriterValue::FromString(ins_code);
// pdbx_PDB_model_num
// always 1 for now, value must be updated if MMCifWriter supports
// writing of multiple models
at_data[17] = ost::io::StarWriterValue::FromInt(1);
atom_site_ptr->AddData(at_data); atom_site_ptr->AddData(at_data);
} }
++label_seq_id; ++label_seq_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment