예제 #1
0
void AtomsBuilder::addAtom(const t_atoms &atoms, int i)
{
    const int index = atoms_->nr;
    atoms_->atom[index]        = atoms.atom[i];
    atoms_->atomname[index]    = symtabString(atoms.atomname[i]);
    atoms_->atom[index].resind = currentResidueIndex_;
    ++atoms_->nr;
}
예제 #2
0
void AtomsBuilder::startResidue(const t_resinfo &resinfo)
{
    if (nextResidueNumber_ == -1)
    {
        nextResidueNumber_ = resinfo.nr;
    }
    const int index = atoms_->nres;
    atoms_->resinfo[index]      = resinfo;
    atoms_->resinfo[index].nr   = nextResidueNumber_;
    atoms_->resinfo[index].name = symtabString(resinfo.name);
    ++nextResidueNumber_;
    currentResidueIndex_      = index;
    ++atoms_->nres;
}
예제 #3
0
void AtomsBuilder::addAtom(const t_atoms &atoms, int i)
{
    const int index = atoms_->nr;
    atoms_->atom[index]        = atoms.atom[i];
    atoms_->atomname[index]    = symtabString(atoms.atomname[i]);
    atoms_->atom[index].resind = currentResidueIndex_;
    if (atoms_->pdbinfo != nullptr)
    {
        if (atoms.pdbinfo != nullptr)
        {
            atoms_->pdbinfo[index]  = atoms.pdbinfo[i];
        }
        else
        {
            gmx_pdbinfo_init_default(&atoms_->pdbinfo[index]);
        }
    }
    ++atoms_->nr;
}