fast_forward.cgsmiles module¶
- fast_forward.cgsmiles.cgsmiles_to_mapping(univ, cgsmiles_strs, mol_names, mol_matching=True)[source]¶
Given a list of mappings described by cgsmiles strings, maps atom indices to CG beads using graph isomorphism.
- fast_forward.cgsmiles.find_one_graph_match(graph1, graph2)[source]¶
Returns one ISMAGS match when graphs are isomorphic, otherwise []. Matches are done based on element and bond order, which is sufficient to also account for charges implicitly via the orders.
- Parameters:
graph1 (networkx.Graph)
graph2 (networkx.Graph)
- Return type:
abc.Iterator
- fast_forward.cgsmiles.get_mappings(cg, univ, _match, mappings)[source]¶
Assigns each coarse CG node a resname and resid based on the all-atom universe. If a bead is split between residues, the resname and resid of the majority of atoms is used.
- Parameters:
cg (networkx.Graph) – The coarse molecule graph.
univ (
fast_forward.universe_handler.UniverseHandler) – The universe storing the fine-grained molecule information._match (dict) – A dict mapping the coarse atoms to fine-grained atoms.
mappings (dict[
fast_forward.map_file_parser.Mapping]) – A dict of mapping objects.
- Returns:
Updated mappings.
- Return type:
dict[
fast_forward.map_file_parser.Mapping]