示例#1
0
void CrfSaver::saveReaction (Reaction &reaction)
{
   _writeReactionInfo(reaction);

   int i;

   _atom_stereo_flags = 0;
   _bond_rc_flags = 0;
   _aam = 0;

   for (i = reaction.reactantBegin(); i < reaction.reactantEnd(); i = reaction.reactantNext(i))
   {
      _atom_stereo_flags = reaction.getInversionArray(i).ptr();
      _bond_rc_flags = reaction.getReactingCenterArray(i).ptr();
      _aam = reaction.getAAMArray(i).ptr();
      _writeMolecule(reaction.getMolecule(i));
   }

   for (i = reaction.productBegin(); i < reaction.productEnd(); i = reaction.productNext(i))
   {
      _atom_stereo_flags = reaction.getInversionArray(i).ptr();
      _bond_rc_flags = reaction.getReactingCenterArray(i).ptr();
      _aam = reaction.getAAMArray(i).ptr();
      _writeMolecule(reaction.getMolecule(i));
   }

   if (_encoder.get() != 0)
      _encoder->finish();
}
示例#2
0
文件: crf_saver.cpp 项目: cambDI/camb
void CrfSaver::_writeReactionMolecule (Reaction &reaction, int i)
{
   _atom_stereo_flags = reaction.getInversionArray(i).ptr();
   _bond_rc_flags = reaction.getReactingCenterArray(i).ptr();
   _aam = reaction.getAAMArray(i).ptr();
   _writeMolecule(reaction.getMolecule(i));
}
示例#3
0
void CrfLoader::_loadReactionMolecule (Reaction &reaction, int index, bool have_aam)
{
   _bond_rc_flags = &reaction.getReactingCenterArray(index);
   _atom_stereo_flags = &reaction.getInversionArray(index);
   if (have_aam)
      _aam = &reaction.getAAMArray(index);

   _loadMolecule(reaction.getMolecule(index));
}