コード例 #1
0
ファイル: crf_saver.cpp プロジェクト: mojca/indigo
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));
}