File: interfaces.cc

package info (click to toggle)
coot 1.1.18%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220,004 kB
  • sloc: cpp: 495,934; python: 35,043; ansic: 26,143; lisp: 22,768; sh: 13,186; makefile: 2,746; awk: 441; xml: 245; csh: 14
file content (29 lines) | stat: -rw-r--r-- 876 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#include "interfaces.hh"

#include "coot-utils/atom-selection-container.hh"
#include "ideal/pepflip.hh"

std::string flipPeptide(const std::string &pdb_file_name_in, const coot::residue_spec_t &rs,
                        const std::string &pdb_file_name_out) {

   std::string s;
   std::string alt_conf; // this should be an argument

   bool use_gemmi = false;
   atom_selection_container_t asc = get_atom_selection(pdb_file_name_in, use_gemmi);
   int result = coot::pepflip(asc.mol, rs.chain_id, rs.res_no, rs.ins_code, alt_conf);
   if (result != 0) {
      asc.mol->WritePDBASCII(pdb_file_name_out.c_str());
      s = pdb_file_name_out;
   }

   return s;
}

int flipPeptide_mmdb(mmdb::Manager *mol, const coot::residue_spec_t &rs, const std::string &alt_conf) {

   int result = coot::pepflip(mol, rs.chain_id, rs.res_no, rs.ins_code, alt_conf);
   return result;

}