<commit_before>"""
This contains the base class for the geometry engine, which proposes new positions
for each additional atom that must be added.
"""
from collections import namedtuple
AtomicPositionProposal = namedtuple("PositionProposal",['atom_index','logp','cartesian_coord'])

NewPositionsProposal = namedtuple('NewPositionsProposal',['new_coordinates','logp_ratio'])

class GeometryEngine(object):
    """
    This is the base class for the geometry engine.
    
    Arguments
    ---------
    topology_proposal : TopologyProposal namedtuple
        The result of the topology proposal, containing the atom mapping and topologies.
    """
    
    def __init__(self, topology_proposal, current_positions):
        self.topology_proposal = topology_proposal   
        self.atoms_for_proposal = []
        self.atoms_for_reverse_proposal = []
    def _transfer_positions(self):
        for a in self.topology_proposal.new_topology.atoms:
              if a.index in self.topology_proposal.new_to_old_atom_mapping.values():
                  self.new_positions[a.index] = self.current_positions[self.topology_proposal.atom_mapping[a.index]]
              else:
                  self.atoms_for_proposal.append(a.index)

    def propose_new_geometry(self):
        """
        Proposes a new geometry for each atom in the list of atoms requiring proposal.
        Additionally calculates probability of reverse proposal.

        Returns
        -------
        new_positions : namedtuple of type NewPositionsProposal
             The new positions, as well as the jacobian-corrected log-probability ratio (logp difference) 
        """
        pass

                  
<commit_msg>changed name of propose method in GeometryEngine<commit_after>"""
This contains the base class for the geometry engine, which proposes new positions
for each additional atom that must be added.
"""
from collections import namedtuple
AtomicPositionProposal = namedtuple("PositionProposal",['atom_index','logp','cartesian_coord'])

GeometryProposal = namedtuple('NewPositionsProposal',['new_coordinates','logp_ratio'])

class GeometryEngine(object):
    """
    This is the base class for the geometry engine.
    
    Arguments
    ---------
    topology_proposal : TopologyProposal namedtuple
        The result of the topology proposal, containing the atom mapping and topologies.
    """
    
    def __init__(self, topology_proposal, current_positions):
        self.topology_proposal = topology_proposal   
        self.atoms_for_proposal = []
        self.atoms_for_reverse_proposal = []
    def _transfer_positions(self):
        for a in self.topology_proposal.new_topology.atoms:
              if a.index in self.topology_proposal.new_to_old_atom_mapping.values():
                  self.new_positions[a.index] = self.current_positions[self.topology_proposal.atom_mapping[a.index]]
              else:
                  self.atoms_for_proposal.append(a.index)

    def propose(self):
        """
        Proposes a new geometry for each atom in the list of atoms requiring proposal.
        Additionally calculates probability of reverse proposal.

        Returns
        -------
        new_positions : namedtuple of type NewPositionsProposal
             The new positions, as well as the jacobian-corrected log-probability ratio (logp difference) 
        """
        pass

                  

{'fraction_non_alphanumeric': 0.07900943396226415, 'fraction_numerical': 0.0, 'mean_word_length': 2.8777142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1411798', 'n_tokens_mistral': 917, 'n_tokens_neox': 873, 'n_words': 246}